package au.gov.amsa.detection;

import java.io.File;

import xuml.tools.miuml.metamodel.jaxb.Domains;
import xuml.tools.miuml.metamodel.jaxb.Marshaller;
import xuml.tools.model.compiler.CodeGeneratorJava;

public class GeneratorMain {

    public static void main(String[] args) {

        Domains domains = new Marshaller()
                .unmarshal(GeneratorMain.class.getResourceAsStream("/domains.xml"));

        CodeGeneratorJava.builder().domains(domains).domainName("detection-domain")
                .domainSchema("DETECTION").domainPackageName("au.gov.amsa.detection.model")
                .generatedSourcesDirectory(new File("target/generated-sources"))
                .generatedResourcesDirectory(new File("target/generated-resources"))
                .generatePersistenceXml(false).build().generate();
    }

}

@@ -29,30 +29,8 @@
 n;%0A%0A
-import java.io.File;%0A%0A
 impo
@@ -597,33 +597,24 @@
 esDirectory(
-new File(
 %22target/gene
@@ -620,33 +620,32 @@
 erated-sources%22)
-)
 %0A               
@@ -678,17 +678,8 @@
 ory(
-new File(
 %22tar
@@ -703,17 +703,16 @@
 ources%22)
-)
 %0A       

simplify CodeGeneratorJava call