@Test public void testGenerateVgrPicsara2melior() throws IOException { if (DEPRECATE_V1_GENERATORS) return; String grp = "se.vgregion.pilot"; String name = "picsara2melior-sas-003"; SystemUtil.delDirs(TEST_OUT_FOLDER + "/" + name); assertEquals(0, SystemUtil.countFiles(TEST_OUT_FOLDER + "/" + name)); new IntegrationComponentGenerator(System.out, grp, name, "1.0-SNAPSHOT", MULE_VERSION, STANDALONE_DEPLOY, TRANSPORTS, TEST_OUT_FOLDER).startGenerator(); assertEquals("Missmatch in expected number of created files and folders", EXPECTED_NO_OF_IC_FILES_CREATED - 2, SystemUtil.countFiles(TEST_OUT_FOLDER + "/" + name)); SystemUtil.executeCommand(BUILD_COMMAND, TEST_OUT_FOLDER + "/" + name); }
public void startGenerator() { gu.generateContentAndCreateFile("pom.xml.gt"); gu.generateContentAndCreateFile("mule-project.xml.gt"); gu.generateFolder("src/main/java/__javaPackageFilepath__"); gu.generateFolder("src/environment"); gu.generateFolder("mappings"); gu.generateFolder("flows"); gu.generateContentAndCreateFileUsingGroovyGenerator(getClass().getResource("GenerateMinimalMflow.groovy"), "flows/__artifactId__-common.mflow"); gu.generateContentAndCreateFile("src/main/app/__artifactId__-common.xml.gt"); gu.generateContentAndCreateFile("src/main/app/mule-deploy.properties.gt"); if (gu.getModel().isJdbc()) { gu.generateContentAndCreateFile("src/main/app/__artifactId__-jdbc-connector.xml.gt"); gu.generateContentAndCreateFile("src/environment/setup/__artifactId__-db-create-tables.sql.gt"); gu.generateContentAndCreateFile("src/environment/setup/__artifactId__-db-drop-tables.sql.gt"); gu.generateContentAndCreateFile("src/environment/setup/__artifactId__-db-insert-testdata.sql.gt"); } gu.generateContentAndCreateFile("src/test/java/__javaPackageFilepath__/__capitalizedJavaArtifactId__MuleServer.java.gt"); gu.generateFolder("src/test/resources/testfiles"); gu.generateFolder("src/test/resources/teststub-services"); if (muleVersion.isVersionEqualOrGreater(MuleVersionEnum.MULE_3_6_1)) { gu.generateContentAndCreateFile("src/main/resources/log4j2.xml.gt"); gu.generateContentAndCreateFile("src/environment/log4j2.xml.gt"); } else { gu.generateContentAndCreateFile("src/main/resources/log4j.dtd.gt"); gu.generateContentAndCreateFile("src/main/resources/log4j.xml.gt"); gu.generateContentAndCreateFile("src/environment/log4j.dtd.gt"); gu.generateContentAndCreateFile("src/environment/log4j.xml.gt"); } gu.generateContentAndCreateFile("src/main/resources/__configPropertyFile__.properties.gt"); }
IntegrationComponentGenerator implements Generator { public void startGenerator() { gu.generateContentAndCreateFile("pom.xml.gt"); gu.generateContentAndCreateFile("mule-project.xml.gt"); gu.generateFolder("src/main/java/__javaPackageFilepath__"); gu.generateFolder("src/environment"); gu.generateFolder("mappings"); gu.generateFolder("flows"); gu.generateContentAndCreateFileUsingGroovyGenerator(getClass().getResource("GenerateMinimalMflow.groovy"), "flows/__artifactId__-common.mflow"); gu.generateContentAndCreateFile("src/main/app/__artifactId__-common.xml.gt"); gu.generateContentAndCreateFile("src/main/app/mule-deploy.properties.gt"); if (gu.getModel().isJdbc()) { gu.generateContentAndCreateFile("src/main/app/__artifactId__-jdbc-connector.xml.gt"); gu.generateContentAndCreateFile("src/environment/setup/__artifactId__-db-create-tables.sql.gt"); gu.generateContentAndCreateFile("src/environment/setup/__artifactId__-db-drop-tables.sql.gt"); gu.generateContentAndCreateFile("src/environment/setup/__artifactId__-db-insert-testdata.sql.gt"); } gu.generateContentAndCreateFile("src/test/java/__javaPackageFilepath__/__capitalizedJavaArtifactId__MuleServer.java.gt"); gu.generateFolder("src/test/resources/testfiles"); gu.generateFolder("src/test/resources/teststub-services"); if (muleVersion.isVersionEqualOrGreater(MuleVersionEnum.MULE_3_6_1)) { gu.generateContentAndCreateFile("src/main/resources/log4j2.xml.gt"); gu.generateContentAndCreateFile("src/environment/log4j2.xml.gt"); } else { gu.generateContentAndCreateFile("src/main/resources/log4j.dtd.gt"); gu.generateContentAndCreateFile("src/main/resources/log4j.xml.gt"); gu.generateContentAndCreateFile("src/environment/log4j.dtd.gt"); gu.generateContentAndCreateFile("src/environment/log4j.xml.gt"); } gu.generateContentAndCreateFile("src/main/resources/__configPropertyFile__.properties.gt"); } }
IntegrationComponentGenerator implements Generator { public void startGenerator() { gu.generateContentAndCreateFile("pom.xml.gt"); gu.generateContentAndCreateFile("mule-project.xml.gt"); gu.generateFolder("src/main/java/__javaPackageFilepath__"); gu.generateFolder("src/environment"); gu.generateFolder("mappings"); gu.generateFolder("flows"); gu.generateContentAndCreateFileUsingGroovyGenerator(getClass().getResource("GenerateMinimalMflow.groovy"), "flows/__artifactId__-common.mflow"); gu.generateContentAndCreateFile("src/main/app/__artifactId__-common.xml.gt"); gu.generateContentAndCreateFile("src/main/app/mule-deploy.properties.gt"); if (gu.getModel().isJdbc()) { gu.generateContentAndCreateFile("src/main/app/__artifactId__-jdbc-connector.xml.gt"); gu.generateContentAndCreateFile("src/environment/setup/__artifactId__-db-create-tables.sql.gt"); gu.generateContentAndCreateFile("src/environment/setup/__artifactId__-db-drop-tables.sql.gt"); gu.generateContentAndCreateFile("src/environment/setup/__artifactId__-db-insert-testdata.sql.gt"); } gu.generateContentAndCreateFile("src/test/java/__javaPackageFilepath__/__capitalizedJavaArtifactId__MuleServer.java.gt"); gu.generateFolder("src/test/resources/testfiles"); gu.generateFolder("src/test/resources/teststub-services"); if (muleVersion.isVersionEqualOrGreater(MuleVersionEnum.MULE_3_6_1)) { gu.generateContentAndCreateFile("src/main/resources/log4j2.xml.gt"); gu.generateContentAndCreateFile("src/environment/log4j2.xml.gt"); } else { gu.generateContentAndCreateFile("src/main/resources/log4j.dtd.gt"); gu.generateContentAndCreateFile("src/main/resources/log4j.xml.gt"); gu.generateContentAndCreateFile("src/environment/log4j.dtd.gt"); gu.generateContentAndCreateFile("src/environment/log4j.xml.gt"); } gu.generateContentAndCreateFile("src/main/resources/__configPropertyFile__.properties.gt"); } IntegrationComponentGenerator(PrintStream ps, String groupId, String artifactId, String version, MuleVersionEnum muleVersion, DeploymentModelEnum deploymentModel, List<TransportEnum> transports, String outputFolder); }
IntegrationComponentGenerator implements Generator { public void startGenerator() { gu.generateContentAndCreateFile("pom.xml.gt"); gu.generateContentAndCreateFile("mule-project.xml.gt"); gu.generateFolder("src/main/java/__javaPackageFilepath__"); gu.generateFolder("src/environment"); gu.generateFolder("mappings"); gu.generateFolder("flows"); gu.generateContentAndCreateFileUsingGroovyGenerator(getClass().getResource("GenerateMinimalMflow.groovy"), "flows/__artifactId__-common.mflow"); gu.generateContentAndCreateFile("src/main/app/__artifactId__-common.xml.gt"); gu.generateContentAndCreateFile("src/main/app/mule-deploy.properties.gt"); if (gu.getModel().isJdbc()) { gu.generateContentAndCreateFile("src/main/app/__artifactId__-jdbc-connector.xml.gt"); gu.generateContentAndCreateFile("src/environment/setup/__artifactId__-db-create-tables.sql.gt"); gu.generateContentAndCreateFile("src/environment/setup/__artifactId__-db-drop-tables.sql.gt"); gu.generateContentAndCreateFile("src/environment/setup/__artifactId__-db-insert-testdata.sql.gt"); } gu.generateContentAndCreateFile("src/test/java/__javaPackageFilepath__/__capitalizedJavaArtifactId__MuleServer.java.gt"); gu.generateFolder("src/test/resources/testfiles"); gu.generateFolder("src/test/resources/teststub-services"); if (muleVersion.isVersionEqualOrGreater(MuleVersionEnum.MULE_3_6_1)) { gu.generateContentAndCreateFile("src/main/resources/log4j2.xml.gt"); gu.generateContentAndCreateFile("src/environment/log4j2.xml.gt"); } else { gu.generateContentAndCreateFile("src/main/resources/log4j.dtd.gt"); gu.generateContentAndCreateFile("src/main/resources/log4j.xml.gt"); gu.generateContentAndCreateFile("src/environment/log4j.dtd.gt"); gu.generateContentAndCreateFile("src/environment/log4j.xml.gt"); } gu.generateContentAndCreateFile("src/main/resources/__configPropertyFile__.properties.gt"); } IntegrationComponentGenerator(PrintStream ps, String groupId, String artifactId, String version, MuleVersionEnum muleVersion, DeploymentModelEnum deploymentModel, List<TransportEnum> transports, String outputFolder); void startGenerator(); }
IntegrationComponentGenerator implements Generator { public void startGenerator() { gu.generateContentAndCreateFile("pom.xml.gt"); gu.generateContentAndCreateFile("mule-project.xml.gt"); gu.generateFolder("src/main/java/__javaPackageFilepath__"); gu.generateFolder("src/environment"); gu.generateFolder("mappings"); gu.generateFolder("flows"); gu.generateContentAndCreateFileUsingGroovyGenerator(getClass().getResource("GenerateMinimalMflow.groovy"), "flows/__artifactId__-common.mflow"); gu.generateContentAndCreateFile("src/main/app/__artifactId__-common.xml.gt"); gu.generateContentAndCreateFile("src/main/app/mule-deploy.properties.gt"); if (gu.getModel().isJdbc()) { gu.generateContentAndCreateFile("src/main/app/__artifactId__-jdbc-connector.xml.gt"); gu.generateContentAndCreateFile("src/environment/setup/__artifactId__-db-create-tables.sql.gt"); gu.generateContentAndCreateFile("src/environment/setup/__artifactId__-db-drop-tables.sql.gt"); gu.generateContentAndCreateFile("src/environment/setup/__artifactId__-db-insert-testdata.sql.gt"); } gu.generateContentAndCreateFile("src/test/java/__javaPackageFilepath__/__capitalizedJavaArtifactId__MuleServer.java.gt"); gu.generateFolder("src/test/resources/testfiles"); gu.generateFolder("src/test/resources/teststub-services"); if (muleVersion.isVersionEqualOrGreater(MuleVersionEnum.MULE_3_6_1)) { gu.generateContentAndCreateFile("src/main/resources/log4j2.xml.gt"); gu.generateContentAndCreateFile("src/environment/log4j2.xml.gt"); } else { gu.generateContentAndCreateFile("src/main/resources/log4j.dtd.gt"); gu.generateContentAndCreateFile("src/main/resources/log4j.xml.gt"); gu.generateContentAndCreateFile("src/environment/log4j.dtd.gt"); gu.generateContentAndCreateFile("src/environment/log4j.xml.gt"); } gu.generateContentAndCreateFile("src/main/resources/__configPropertyFile__.properties.gt"); } IntegrationComponentGenerator(PrintStream ps, String groupId, String artifactId, String version, MuleVersionEnum muleVersion, DeploymentModelEnum deploymentModel, List<TransportEnum> transports, String outputFolder); void startGenerator();  }