|
4 | 4 | import br.com.generator.core.GeneratorOptions; |
5 | 5 | import br.com.templates_java.ComposeTemplate; |
6 | 6 | import br.com.templates_java.config.jms_aws_sqs.*; |
| 7 | +import br.com.templates_java.config.openj9.OpenJ9DockerfileGenerator; |
7 | 8 | import joptsimple.OptionSet; |
8 | 9 | import joptsimple.OptionSpec; |
9 | 10 | import org.springframework.boot.cli.command.options.OptionHandler; |
10 | 11 | import org.springframework.boot.cli.command.status.ExitStatus; |
11 | 12 |
|
12 | 13 | import java.io.IOException; |
13 | 14 | import java.net.URISyntaxException; |
14 | | -import java.util.Collections; |
15 | 15 | import java.util.HashMap; |
16 | 16 | import java.util.List; |
17 | 17 |
|
@@ -55,6 +55,21 @@ private ExitStatus executeTemplate(String template) { |
55 | 55 | if (template.equals("jms-aws-sqs")) { |
56 | 56 | return generateJmsAwsSQS(); |
57 | 57 | } |
| 58 | + if (template.equals("openj9")) { |
| 59 | + return generateOpenJ9(); |
| 60 | + } |
| 61 | + return ExitStatus.OK; |
| 62 | + } |
| 63 | + |
| 64 | + private ExitStatus generateOpenJ9() { |
| 65 | + try { |
| 66 | + GeneratorOptions generatorOptions = new GeneratorOptions(); |
| 67 | + generatorOptions.setDestination(scaffoldInfo.getUserDir().concat("/deploy")); |
| 68 | + ComposeTemplate.runAll(scaffoldInfo.getPathPackage(), asList(new OpenJ9DockerfileGenerator(generatorOptions))); |
| 69 | + } catch (Exception e) { |
| 70 | + System.out.println("ERROR: ".concat(e.getMessage())); |
| 71 | + return ExitStatus.ERROR; |
| 72 | + } |
58 | 73 | return ExitStatus.OK; |
59 | 74 | } |
60 | 75 |
|
|
0 commit comments