From 23ebc52f0c88d12530660ff623b3964b4f62a631 Mon Sep 17 00:00:00 2001 From: NetoDevel Date: Sun, 14 Jul 2019 13:53:27 -0300 Subject: [PATCH 01/10] Rename module --- .gitignore | 4 +- pom.xml | 2 +- spring-scaffold-cli/pom.xml | 2 +- {templates-java => templates}/pom.xml | 2 +- .../com/templates_java/ComposeTemplate.java | 0 .../EntryPointMessageGenerator.java | 0 .../jms_aws_sqs/MessageListenerGenerator.java | 0 .../jms_aws_sqs/ProducerMessageGenerator.java | 0 .../jms_aws_sqs/SQSDependencyGenerator.java | 0 .../jms_aws_sqs/SQSPropertiesGenerator.java | 0 .../openj9/OpenJ9DockerfileGenerator.java | 0 .../openj9/OpenJ9MavenPluginGenerator.java | 0 .../config/openj9/dockerfile-template.txt | 0 .../config/template-entrypoint-listener.txt | 0 .../config/template-message-listener.txt | 0 .../config/template-producer-message.txt | 0 .../EntryPointMessageGeneratorTest.java | 0 .../MessageListenerGeneratorTest.java | 0 .../ProducerMessageGeneratorTest.java | 0 .../SQSDependencyGeneratorTest.java | 0 .../openj9/OpenJ9DockerfileGeneratorTest.java | 0 .../OpenJ9MavenPluginGeneratorTest.java | 0 .../helper/LoadTemplateTester.java | 0 .../config/fake-application.properties | 0 .../openj9/dockerfile-template-test.txt | 0 .../config/openj9/template-pom-test.xml | 0 .../template-entrypoint-listener-test.txt | 0 .../config/template-message-listener-test.txt | 0 .../templates/config/template-pom-test.xml | 0 .../templates/config/template-pom.xml | 0 .../config/template-producer-message-test.txt | 0 .../com/templates_java/ComposeTemplate.class | Bin 0 -> 1113 bytes .../EntryPointMessageGenerator.class | Bin 0 -> 1066 bytes .../MessageListenerGenerator.class | Bin 0 -> 1055 bytes .../ProducerMessageGenerator.class | Bin 0 -> 990 bytes .../jms_aws_sqs/SQSDependencyGenerator.class | Bin 0 -> 2083 bytes .../jms_aws_sqs/SQSPropertiesGenerator.class | Bin 0 -> 1527 bytes .../openj9/OpenJ9DockerfileGenerator.class | Bin 0 -> 974 bytes .../openj9/OpenJ9MavenPluginGenerator.class | Bin 0 -> 3791 bytes .../config/openj9/dockerfile-template.txt | 10 +++ .../config/template-entrypoint-listener.txt | 18 +++++ .../config/template-message-listener.txt | 5 ++ .../config/template-producer-message.txt | 39 ++++++++++ .../target/maven-archiver/pom.properties | 5 ++ .../compile/default-compile/createdFiles.lst | 8 ++ .../compile/default-compile/inputFiles.lst | 8 ++ .../default-testCompile/createdFiles.lst | 7 ++ .../default-testCompile/inputFiles.lst | 7 ++ ...aws_sqs.EntryPointMessageGeneratorTest.xml | 71 +++++++++++++++++ ...s_aws_sqs.MessageListenerGeneratorTest.xml | 71 +++++++++++++++++ ...s_aws_sqs.ProducerMessageGeneratorTest.xml | 71 +++++++++++++++++ ...jms_aws_sqs.SQSDependencyGeneratorTest.xml | 73 ++++++++++++++++++ ...aws_sqs.EntryPointMessageGeneratorTest.txt | 4 + ...s_aws_sqs.MessageListenerGeneratorTest.txt | 4 + ...s_aws_sqs.ProducerMessageGeneratorTest.txt | 4 + ...jms_aws_sqs.SQSDependencyGeneratorTest.txt | 4 + .../EntryPointMessageGeneratorTest.class | Bin 0 -> 2865 bytes .../MessageListenerGeneratorTest.class | Bin 0 -> 2850 bytes .../ProducerMessageGeneratorTest.class | Bin 0 -> 2850 bytes .../SQSDependencyGeneratorTest.class | Bin 0 -> 2975 bytes .../OpenJ9DockerfileGeneratorTest.class | Bin 0 -> 2408 bytes .../OpenJ9MavenPluginGeneratorTest.class | Bin 0 -> 3593 bytes .../helper/LoadTemplateTester.class | Bin 0 -> 899 bytes .../config/fake-application.properties | 1 + .../openj9/dockerfile-template-test.txt | 10 +++ .../config/openj9/template-pom-test.xml | 66 ++++++++++++++++ .../template-entrypoint-listener-test.txt | 18 +++++ .../config/template-message-listener-test.txt | 5 ++ .../templates/config/template-pom-test.xml | 16 ++++ .../templates/config/template-pom.xml | 11 +++ .../config/template-producer-message-test.txt | 39 ++++++++++ 71 files changed, 580 insertions(+), 5 deletions(-) rename {templates-java => templates}/pom.xml (96%) rename {templates-java => templates}/src/main/java/br/com/templates_java/ComposeTemplate.java (100%) rename {templates-java => templates}/src/main/java/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGenerator.java (100%) rename {templates-java => templates}/src/main/java/br/com/templates_java/config/jms_aws_sqs/MessageListenerGenerator.java (100%) rename {templates-java => templates}/src/main/java/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGenerator.java (100%) rename {templates-java => templates}/src/main/java/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGenerator.java (100%) rename {templates-java => templates}/src/main/java/br/com/templates_java/config/jms_aws_sqs/SQSPropertiesGenerator.java (100%) rename {templates-java => templates}/src/main/java/br/com/templates_java/config/openj9/OpenJ9DockerfileGenerator.java (100%) rename {templates-java => templates}/src/main/java/br/com/templates_java/config/openj9/OpenJ9MavenPluginGenerator.java (100%) rename {templates-java => templates}/src/main/resources/templates/config/openj9/dockerfile-template.txt (100%) rename {templates-java => templates}/src/main/resources/templates/config/template-entrypoint-listener.txt (100%) rename {templates-java => templates}/src/main/resources/templates/config/template-message-listener.txt (100%) rename {templates-java => templates}/src/main/resources/templates/config/template-producer-message.txt (100%) rename {templates-java => templates}/src/test/java/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGeneratorTest.java (100%) rename {templates-java => templates}/src/test/java/br/com/templates_java/config/jms_aws_sqs/MessageListenerGeneratorTest.java (100%) rename {templates-java => templates}/src/test/java/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGeneratorTest.java (100%) rename {templates-java => templates}/src/test/java/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGeneratorTest.java (100%) rename {templates-java => templates}/src/test/java/br/com/templates_java/config/openj9/OpenJ9DockerfileGeneratorTest.java (100%) rename {templates-java => templates}/src/test/java/br/com/templates_java/config/openj9/OpenJ9MavenPluginGeneratorTest.java (100%) rename {templates-java => templates}/src/test/java/br/com/templates_java/helper/LoadTemplateTester.java (100%) rename {templates-java => templates}/src/test/resources/templates/config/fake-application.properties (100%) rename {templates-java => templates}/src/test/resources/templates/config/openj9/dockerfile-template-test.txt (100%) rename {templates-java => templates}/src/test/resources/templates/config/openj9/template-pom-test.xml (100%) rename {templates-java => templates}/src/test/resources/templates/config/template-entrypoint-listener-test.txt (100%) rename {templates-java => templates}/src/test/resources/templates/config/template-message-listener-test.txt (100%) rename {templates-java => templates}/src/test/resources/templates/config/template-pom-test.xml (100%) rename {templates-java => templates}/src/test/resources/templates/config/template-pom.xml (100%) rename {templates-java => templates}/src/test/resources/templates/config/template-producer-message-test.txt (100%) create mode 100644 templates/target/classes/br/com/templates_java/ComposeTemplate.class create mode 100644 templates/target/classes/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGenerator.class create mode 100644 templates/target/classes/br/com/templates_java/config/jms_aws_sqs/MessageListenerGenerator.class create mode 100644 templates/target/classes/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGenerator.class create mode 100644 templates/target/classes/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGenerator.class create mode 100644 templates/target/classes/br/com/templates_java/config/jms_aws_sqs/SQSPropertiesGenerator.class create mode 100644 templates/target/classes/br/com/templates_java/config/openj9/OpenJ9DockerfileGenerator.class create mode 100644 templates/target/classes/br/com/templates_java/config/openj9/OpenJ9MavenPluginGenerator.class create mode 100644 templates/target/classes/templates/config/openj9/dockerfile-template.txt create mode 100644 templates/target/classes/templates/config/template-entrypoint-listener.txt create mode 100644 templates/target/classes/templates/config/template-message-listener.txt create mode 100644 templates/target/classes/templates/config/template-producer-message.txt create mode 100644 templates/target/maven-archiver/pom.properties create mode 100644 templates/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst create mode 100644 templates/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst create mode 100644 templates/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst create mode 100644 templates/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst create mode 100644 templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.EntryPointMessageGeneratorTest.xml create mode 100644 templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.MessageListenerGeneratorTest.xml create mode 100644 templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.ProducerMessageGeneratorTest.xml create mode 100644 templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.SQSDependencyGeneratorTest.xml create mode 100644 templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.EntryPointMessageGeneratorTest.txt create mode 100644 templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.MessageListenerGeneratorTest.txt create mode 100644 templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.ProducerMessageGeneratorTest.txt create mode 100644 templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.SQSDependencyGeneratorTest.txt create mode 100644 templates/target/test-classes/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGeneratorTest.class create mode 100644 templates/target/test-classes/br/com/templates_java/config/jms_aws_sqs/MessageListenerGeneratorTest.class create mode 100644 templates/target/test-classes/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGeneratorTest.class create mode 100644 templates/target/test-classes/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGeneratorTest.class create mode 100644 templates/target/test-classes/br/com/templates_java/config/openj9/OpenJ9DockerfileGeneratorTest.class create mode 100644 templates/target/test-classes/br/com/templates_java/config/openj9/OpenJ9MavenPluginGeneratorTest.class create mode 100644 templates/target/test-classes/br/com/templates_java/helper/LoadTemplateTester.class create mode 100644 templates/target/test-classes/templates/config/fake-application.properties create mode 100644 templates/target/test-classes/templates/config/openj9/dockerfile-template-test.txt create mode 100644 templates/target/test-classes/templates/config/openj9/template-pom-test.xml create mode 100644 templates/target/test-classes/templates/config/template-entrypoint-listener-test.txt create mode 100644 templates/target/test-classes/templates/config/template-message-listener-test.txt create mode 100644 templates/target/test-classes/templates/config/template-pom-test.xml create mode 100644 templates/target/test-classes/templates/config/template-pom.xml create mode 100644 templates/target/test-classes/templates/config/template-producer-message-test.txt diff --git a/.gitignore b/.gitignore index a3bd716..f3d91dc 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,8 @@ spring-scaffold-cli/target/ spring-scaffold-cli/*.iml generator-core/target/ generator-core/*.iml -templates-java/target/ -templates-java/*.iml +templates/target/ +templates/*.iml *.iml .idea/ diff --git a/pom.xml b/pom.xml index bde34c8..9d81d0e 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ spring-scaffold-cli spring-boot-generate generator-core - templates-java + templates diff --git a/spring-scaffold-cli/pom.xml b/spring-scaffold-cli/pom.xml index ffa6972..33a6718 100644 --- a/spring-scaffold-cli/pom.xml +++ b/spring-scaffold-cli/pom.xml @@ -31,7 +31,7 @@ br.com.netodevel - templates-java + templates 0.0.2.BUILD-SNAPSHOT diff --git a/templates-java/pom.xml b/templates/pom.xml similarity index 96% rename from templates-java/pom.xml rename to templates/pom.xml index 2ca0ff8..963279a 100644 --- a/templates-java/pom.xml +++ b/templates/pom.xml @@ -8,7 +8,7 @@ 0.0.2.BUILD-SNAPSHOT 4.0.0 - templates-java + templates diff --git a/templates-java/src/main/java/br/com/templates_java/ComposeTemplate.java b/templates/src/main/java/br/com/templates_java/ComposeTemplate.java similarity index 100% rename from templates-java/src/main/java/br/com/templates_java/ComposeTemplate.java rename to templates/src/main/java/br/com/templates_java/ComposeTemplate.java diff --git a/templates-java/src/main/java/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGenerator.java b/templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGenerator.java similarity index 100% rename from templates-java/src/main/java/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGenerator.java rename to templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGenerator.java diff --git a/templates-java/src/main/java/br/com/templates_java/config/jms_aws_sqs/MessageListenerGenerator.java b/templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/MessageListenerGenerator.java similarity index 100% rename from templates-java/src/main/java/br/com/templates_java/config/jms_aws_sqs/MessageListenerGenerator.java rename to templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/MessageListenerGenerator.java diff --git a/templates-java/src/main/java/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGenerator.java b/templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGenerator.java similarity index 100% rename from templates-java/src/main/java/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGenerator.java rename to templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGenerator.java diff --git a/templates-java/src/main/java/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGenerator.java b/templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGenerator.java similarity index 100% rename from templates-java/src/main/java/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGenerator.java rename to templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGenerator.java diff --git a/templates-java/src/main/java/br/com/templates_java/config/jms_aws_sqs/SQSPropertiesGenerator.java b/templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/SQSPropertiesGenerator.java similarity index 100% rename from templates-java/src/main/java/br/com/templates_java/config/jms_aws_sqs/SQSPropertiesGenerator.java rename to templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/SQSPropertiesGenerator.java diff --git a/templates-java/src/main/java/br/com/templates_java/config/openj9/OpenJ9DockerfileGenerator.java b/templates/src/main/java/br/com/templates_java/config/openj9/OpenJ9DockerfileGenerator.java similarity index 100% rename from templates-java/src/main/java/br/com/templates_java/config/openj9/OpenJ9DockerfileGenerator.java rename to templates/src/main/java/br/com/templates_java/config/openj9/OpenJ9DockerfileGenerator.java diff --git a/templates-java/src/main/java/br/com/templates_java/config/openj9/OpenJ9MavenPluginGenerator.java b/templates/src/main/java/br/com/templates_java/config/openj9/OpenJ9MavenPluginGenerator.java similarity index 100% rename from templates-java/src/main/java/br/com/templates_java/config/openj9/OpenJ9MavenPluginGenerator.java rename to templates/src/main/java/br/com/templates_java/config/openj9/OpenJ9MavenPluginGenerator.java diff --git a/templates-java/src/main/resources/templates/config/openj9/dockerfile-template.txt b/templates/src/main/resources/templates/config/openj9/dockerfile-template.txt similarity index 100% rename from templates-java/src/main/resources/templates/config/openj9/dockerfile-template.txt rename to templates/src/main/resources/templates/config/openj9/dockerfile-template.txt diff --git a/templates-java/src/main/resources/templates/config/template-entrypoint-listener.txt b/templates/src/main/resources/templates/config/template-entrypoint-listener.txt similarity index 100% rename from templates-java/src/main/resources/templates/config/template-entrypoint-listener.txt rename to templates/src/main/resources/templates/config/template-entrypoint-listener.txt diff --git a/templates-java/src/main/resources/templates/config/template-message-listener.txt b/templates/src/main/resources/templates/config/template-message-listener.txt similarity index 100% rename from templates-java/src/main/resources/templates/config/template-message-listener.txt rename to templates/src/main/resources/templates/config/template-message-listener.txt diff --git a/templates-java/src/main/resources/templates/config/template-producer-message.txt b/templates/src/main/resources/templates/config/template-producer-message.txt similarity index 100% rename from templates-java/src/main/resources/templates/config/template-producer-message.txt rename to templates/src/main/resources/templates/config/template-producer-message.txt diff --git a/templates-java/src/test/java/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGeneratorTest.java b/templates/src/test/java/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGeneratorTest.java similarity index 100% rename from templates-java/src/test/java/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGeneratorTest.java rename to templates/src/test/java/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGeneratorTest.java diff --git a/templates-java/src/test/java/br/com/templates_java/config/jms_aws_sqs/MessageListenerGeneratorTest.java b/templates/src/test/java/br/com/templates_java/config/jms_aws_sqs/MessageListenerGeneratorTest.java similarity index 100% rename from templates-java/src/test/java/br/com/templates_java/config/jms_aws_sqs/MessageListenerGeneratorTest.java rename to templates/src/test/java/br/com/templates_java/config/jms_aws_sqs/MessageListenerGeneratorTest.java diff --git a/templates-java/src/test/java/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGeneratorTest.java b/templates/src/test/java/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGeneratorTest.java similarity index 100% rename from templates-java/src/test/java/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGeneratorTest.java rename to templates/src/test/java/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGeneratorTest.java diff --git a/templates-java/src/test/java/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGeneratorTest.java b/templates/src/test/java/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGeneratorTest.java similarity index 100% rename from templates-java/src/test/java/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGeneratorTest.java rename to templates/src/test/java/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGeneratorTest.java diff --git a/templates-java/src/test/java/br/com/templates_java/config/openj9/OpenJ9DockerfileGeneratorTest.java b/templates/src/test/java/br/com/templates_java/config/openj9/OpenJ9DockerfileGeneratorTest.java similarity index 100% rename from templates-java/src/test/java/br/com/templates_java/config/openj9/OpenJ9DockerfileGeneratorTest.java rename to templates/src/test/java/br/com/templates_java/config/openj9/OpenJ9DockerfileGeneratorTest.java diff --git a/templates-java/src/test/java/br/com/templates_java/config/openj9/OpenJ9MavenPluginGeneratorTest.java b/templates/src/test/java/br/com/templates_java/config/openj9/OpenJ9MavenPluginGeneratorTest.java similarity index 100% rename from templates-java/src/test/java/br/com/templates_java/config/openj9/OpenJ9MavenPluginGeneratorTest.java rename to templates/src/test/java/br/com/templates_java/config/openj9/OpenJ9MavenPluginGeneratorTest.java diff --git a/templates-java/src/test/java/br/com/templates_java/helper/LoadTemplateTester.java b/templates/src/test/java/br/com/templates_java/helper/LoadTemplateTester.java similarity index 100% rename from templates-java/src/test/java/br/com/templates_java/helper/LoadTemplateTester.java rename to templates/src/test/java/br/com/templates_java/helper/LoadTemplateTester.java diff --git a/templates-java/src/test/resources/templates/config/fake-application.properties b/templates/src/test/resources/templates/config/fake-application.properties similarity index 100% rename from templates-java/src/test/resources/templates/config/fake-application.properties rename to templates/src/test/resources/templates/config/fake-application.properties diff --git a/templates-java/src/test/resources/templates/config/openj9/dockerfile-template-test.txt b/templates/src/test/resources/templates/config/openj9/dockerfile-template-test.txt similarity index 100% rename from templates-java/src/test/resources/templates/config/openj9/dockerfile-template-test.txt rename to templates/src/test/resources/templates/config/openj9/dockerfile-template-test.txt diff --git a/templates-java/src/test/resources/templates/config/openj9/template-pom-test.xml b/templates/src/test/resources/templates/config/openj9/template-pom-test.xml similarity index 100% rename from templates-java/src/test/resources/templates/config/openj9/template-pom-test.xml rename to templates/src/test/resources/templates/config/openj9/template-pom-test.xml diff --git a/templates-java/src/test/resources/templates/config/template-entrypoint-listener-test.txt b/templates/src/test/resources/templates/config/template-entrypoint-listener-test.txt similarity index 100% rename from templates-java/src/test/resources/templates/config/template-entrypoint-listener-test.txt rename to templates/src/test/resources/templates/config/template-entrypoint-listener-test.txt diff --git a/templates-java/src/test/resources/templates/config/template-message-listener-test.txt b/templates/src/test/resources/templates/config/template-message-listener-test.txt similarity index 100% rename from templates-java/src/test/resources/templates/config/template-message-listener-test.txt rename to templates/src/test/resources/templates/config/template-message-listener-test.txt diff --git a/templates-java/src/test/resources/templates/config/template-pom-test.xml b/templates/src/test/resources/templates/config/template-pom-test.xml similarity index 100% rename from templates-java/src/test/resources/templates/config/template-pom-test.xml rename to templates/src/test/resources/templates/config/template-pom-test.xml diff --git a/templates-java/src/test/resources/templates/config/template-pom.xml b/templates/src/test/resources/templates/config/template-pom.xml similarity index 100% rename from templates-java/src/test/resources/templates/config/template-pom.xml rename to templates/src/test/resources/templates/config/template-pom.xml diff --git a/templates-java/src/test/resources/templates/config/template-producer-message-test.txt b/templates/src/test/resources/templates/config/template-producer-message-test.txt similarity index 100% rename from templates-java/src/test/resources/templates/config/template-producer-message-test.txt rename to templates/src/test/resources/templates/config/template-producer-message-test.txt diff --git a/templates/target/classes/br/com/templates_java/ComposeTemplate.class b/templates/target/classes/br/com/templates_java/ComposeTemplate.class new file mode 100644 index 0000000000000000000000000000000000000000..d4bf719c258d68d3512aeed3633e603192929da6 GIT binary patch literal 1113 zcma)5T~8B16g^W43+?hDUn+heAW}Y81@)nX#1KW20wyJx_+qAYQUZe}ryTXvaq zkjtPO^9~jqEDH3j>p+_gfv(*Afk1jQe5nKm3p!A{jcQ3n`?BN{87_on=^w~QTfYUS z&7rOf%oR$JR}QP5QPr9+jjF#mlCPz=8CGjyUG2BfJgY^G;Gype%;pMlh%bYRS2U3h zD)}bTFxvMDx^D88PhUj^Dv~CQ1g4TQZHz@D9>Mt)8~k>JZz- zJ=|v_&((SgecFk=(vd0~j#LcA{oXc7lSg7uhu-#HTP1;k(@;Aa0=>F@V>~ziS7VY) zRNgt1^<8z$XwLR?&UO$xqe*-`drdNSayXi;NupdsNf4P>0rQxG!{5n%DX?Y8aLv;5 zxC`#x3!fl9#K$hzo*3*!KW(=efB_8B>%$N(pew%omM3XqGm9rk3G6JLpiAH##%QDk zzM^|~`6GIsz5o5)rcN^zFdSdWVuIcz3rsVyEpvlOC-`pB|EOm)? klZ-_!6PX~AMd~LU2UmX3y-Fa>gKM}>E5!nWiLEvD2aeVj_y7O^ literal 0 HcmV?d00001 diff --git a/templates/target/classes/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGenerator.class b/templates/target/classes/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGenerator.class new file mode 100644 index 0000000000000000000000000000000000000000..4e1893fa710f5cb5e661788ae97f175de81f704f GIT binary patch literal 1066 zcmbVL+iuf95Ivi?b>f;Pq$C9bwB^#~qSg}dfK6yoHH})Z{NRs1@IV62YKAgBZq1Zw;bHYog7wpUv=nk z&Bk3D_XLW46{tv>Fgh3-9R{&Lt=)~hUO4b(SL8*?d;Uk{w!r*T9cc4RAX}@S2v|Ge zOC?Zf>p<;~23-{$%dSr+rFPhp{)vn<`{|)&PBqcBrgTOPhQ2f^?wrXtk~o7`y6>G0 z;*NY9cjDKv*9uJZ?l9DW*;8>W`)VeMv@|cRo24#9qae*DeZ^Y6Jt5Vhx2t_ca8B#I zr;?V~xKI93IEs3TZv|HVtz?UFT)4R6!oh;TLvL2tw5I97rs9HzT+pVkW5W&JGUvv| z0~hPq5UBh`l;YR0;i8U)z)m`?Dd_*Sk1D!g<^oI82E90#wMJn5g1p(QD#XehrxQMu z=2W0uOM33hpzj@-NC*9G9*s?r`*J{S&ZRGq%qN$h?(dVt8a?+s{SyKi9tc@kvS~iF zE|T|%c0v1G<1@quGBPO8>d+1fvM8uXmYW3ODoW%rz!I$tuuG8~>o7p0`3aeyD2qe} z%C{&lPnnEVNupCEW@1?^;u^|y$C!Jxv#4t0BQmAz7}ms?8)Lq~))@ACx=y4fBxNF~ X5XJH@a;qsxg<>rNT&C~(B=5!#X#WcF literal 0 HcmV?d00001 diff --git a/templates/target/classes/br/com/templates_java/config/jms_aws_sqs/MessageListenerGenerator.class b/templates/target/classes/br/com/templates_java/config/jms_aws_sqs/MessageListenerGenerator.class new file mode 100644 index 0000000000000000000000000000000000000000..8e8a1478d5c6621e99743fb6ffedbaed04857292 GIT binary patch literal 1055 zcmb7DT~8B16g|@}Y`d(q7FyJbh$!?Uun+oRf-x~fj7b3#2(Qhw4$F}Jz@4e`voz6~ z_}~xlM;Y&QcdL>Z@L}iPJ9FQd%5!|XE|N&TFm*lHg$SUd4s z!BFYRNbHZofk=+{AfTOEFCOyXm?zT2*`}pWCDHBVbXtVx0oOwH&-i;zoY9H&y|YmD z`3Kck@07PEl;XbVNu`aJsUT9)y|!v2bS@c1Sv9Gvw%WZ3rHs8@83=-NUS14E+7KHL zDL#xx$xxV6hUI_h*fJ>18&9>^58aLfd%cVjUX{i-u_<$(ht%Ct_Uy=gdi|mPJwU9|8!yw3z)&!gAg@S14TjcviXM|?WM?{G z!9I~wK!sL^EGWsMq$+uCnuMFEQDguXXf*)4lxcDu1JLPyLE$&bJduIwEvhS1r9o<> z*%^{yGO~<_MbzocVD6DMqMDu0DAbB$SQBSvjMsS`niD3<<^+ssHB Plxq>-5`DKOb+>;3w_^qu literal 0 HcmV?d00001 diff --git a/templates/target/classes/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGenerator.class b/templates/target/classes/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGenerator.class new file mode 100644 index 0000000000000000000000000000000000000000..9d7bc41f049a32d36fa389f56d607c15d593f746 GIT binary patch literal 990 zcmb7DSx*yD6#njXWZGe*wF@qYfD5$Kz`Xcif-x~fj7eD%2(Qg;xeh~SsdsLbpQVY` z#0P(XKZO(Zd3n%=X2=gT=~{#^e04d5mECTe(CLluvzSTgY#%T+u{2xgQo`_@aijp`no|n@wx2a#F+Z&`HUgYe0zMus2-NjgBqcHG{?4xKZ z$0CU`EdL96D?zbf;kgA9^9+tt(kvJjj?GCCY%sL1^~j;S*s#!p z&G0r~Pl5OUb6{AxVZ{usVlE#J%84*ky2<|5Z>TO$sU8b;oUiMUt22g9HygOmL)SS{ z(hJ?~1k#|)eIC$^tNGcH`s(&q_4gXFMmJug4}n2T_CcCPx`n&+E|9fLwnoyle}dWl zAJD#~Idys$P)T1Mb;4-S4_M5yaSu(hs4hiigw{fvVhQFRNk($X{tm5KnL$sLJ2TAL li8h1rmBJdq7EM~zpiPjSw276K=S@14rITlo{`b?m2Uiui1Bd_s literal 0 HcmV?d00001 diff --git a/templates/target/classes/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGenerator.class b/templates/target/classes/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGenerator.class new file mode 100644 index 0000000000000000000000000000000000000000..a8a495cafdd5e80fb2a6ed1c4e5a8cad99a71c03 GIT binary patch literal 2083 zcmcgtZF3V<6n<_}yXj`3O=zovN_nxgO`8=2MH7RSrcg;=AWR)Ub#9Z}blYS%?rwno z1Hb!6)X_5Pj6Z-M<@nr9vWYD-Fb+dD$=>t+oOACv_r*Vd{te(J9-GJ@H--r;rm$on zZ(;1Qh?KAFdnYst0;5I8b;6QB?zN5Pw*^M-dUYi*UU6Kt(P`}}|FPU{ zl9R1?HQC&jzN6_Lb0pk%2y3|yD^#s^Q-&(oIgn2zvAKIr!#-#QJMw9;6Z{a^)rZv; z)mCm@xwWGhHu0wYj@zRdZDMY|61i|Zd(~+wDwy@yPNRvWP3bo5YUn#|gBqzrb+j#; zod|yJ?#3ASng#bdVY?FwT$?*> zaGIlwoo>r;e@oU5WrLVgdrZ`oEiTQf*YRsgXD)EzFZ%!coE+H3Wa=Qr{}Ti0vPXQZc|f0(Z|y-vMo_f-Z)(hr?ISqo{`wONW(m$;Wp zEfoZ^K|e)%NNr&IMEL>FZ0Sb+I-f`7N_n|jF4}!|7pi>{>stUHgv6_Sox~f1UK}Li zsDM3}8JxcRGT7${WJ{gUGVqOsyI3($wy=tO0!G_w<)5{h7Vcxs!nb%}pkiSi8v>Kd z_4-U)E=HMg+!+I#7Pj!vz#|J)tO?xd&4>TnhyoX1F<}JGMai)-*EZu85J=AH6Mbfo zc$9Q9>WJIJ9kIE4plV@Zs3UruUdKm0-D3&Nz5-4>8q%}je8dnohCAtIZDBymuM4S);Q{Bv2zb*D*$mmM8I8TNR zqKU?l!U0;7w3&Sw-k}P{BQV~ZA>aC7=}1i%mw4l3cuff;^vvKY$@L_r_&-f*mHY(X z=E8G`h1~B*{6Z>$clm#oy1+PZvk8pR%X_4zyV`gk=Sk5n@+#=<0zRNj`}~P^+S1M@ zD}Q0+`{#IPeK9+l`vXQ2-!1%x#Nshh`kfs+W@NoOM*3%(B%{FRG0OEMsY^)XGQnQK zhq#JaJ{rVK*L@E}5{s06LT% n5!c!1J3gp_8D*T)*ZWZLOk9Bsu0_G=1an*^=z5+m6Il2cr{^k` literal 0 HcmV?d00001 diff --git a/templates/target/classes/br/com/templates_java/config/jms_aws_sqs/SQSPropertiesGenerator.class b/templates/target/classes/br/com/templates_java/config/jms_aws_sqs/SQSPropertiesGenerator.class new file mode 100644 index 0000000000000000000000000000000000000000..41fc20d25ee310a83f346d8efe0200ee3a7e2f2e GIT binary patch literal 1527 zcmbVM?NZY~6g^uiDIrKHf+7mV4=9DE;uk1XL`ED(1e`kjWtMbX0%;Pm8-=%0M{&j< zK7bG9c#~qu2#$=IHoN!kz4x5Edp19Qe)|sKK9+U#;6@h=+|1yXj@uZ|U?Lg|Iyoo1 zP{dRQ(>h8pb(C>O!;FTz4B3WoMZlF8tozFLT***a-44o@*DSY}$O=UH#UGLL44n(M zYpW*=Q|C^a++;{Edo{t(yK1{)Eo^R!;4R;F$dg<3EbeUbz>e%=XIkypL~H3cEhU=1 z!k%C=ZiquLbhoW-|irEk8MKB7A9BY61G=f zu^mAH`tt)zv^GM+J!;Skl^-gGi9##X;clZ`Re|j`=1+T~=DK~Zb~d=R#~X1+F+wtp zAyX$bmp5r$uX=>IK~m+NhTFmx26^B(_4cKcrSNTE(-$uMw+ zq@scv#jVBS=;5_mGGp%ix9m@0XA?3!l(bhwpR`RZ+L0S1YDLl(yh%49nGnmJE(2XP zIyY+hEasw+s*fT@V%B*onZnpF=Sr5= literal 0 HcmV?d00001 diff --git a/templates/target/classes/br/com/templates_java/config/openj9/OpenJ9DockerfileGenerator.class b/templates/target/classes/br/com/templates_java/config/openj9/OpenJ9DockerfileGenerator.class new file mode 100644 index 0000000000000000000000000000000000000000..c8eee6803ef3e5ab484a60ea613e54e6ce6d4f14 GIT binary patch literal 974 zcmb7CT~E_c7=BJy=~fDx8^aG2L=?I%QZKxa;KzlE(M)Cn;g+10!#LQr%h{RXXKA7{ z@xmYAk21dP+8Rj=c+vBIKkw7`eSiM?{sX`xv~5&yqk=MSma$~x7H*fZoX8cMoOdj& zTDZ$l>x)Pzu4C05Y8gi(2Dj5weh?4*B1D!F{_As@+YB>LWF+-7hW4e4S_cf~i}*+| zR68;fyW>GmsD0iG$y4vd0S^zjl8K!;O?@JX*7KZ}7K35PwHO_q@{gRjMaQ!5$3qdF zZuwmjZ?|5?!3Uv^Whe^L#CBGVqs*pWHMiAC0c7m&P$nhVug(H79fO56viIV#3PciR zSpFyUW&-2D!952yW*Hv(1;=yrjtXKA@{~<|rY+oeu#OFC`G>j#7aI;*@ED$EE6I!g z@820#E?6l;BcH{aZZQRhlAG*n{etS^bgCnv_p|l9=lX=9=}w0n@~H3cX(glnb^>Wp z<}M%5T+7*+k^1=ZSM>Mluu3;wp~Gh|k`<6{T0UNG^a}M zJWBM=!6dDMDr#gcPP1_pb+V`~MP-E6zyie*%y%Ri$tCX#jCyGTGgYokFykfK1lA`C g8w8m*X;6a&f^4QuoN0O1q)AyOc^2urmeyVW4PL?f4FCWD literal 0 HcmV?d00001 diff --git a/templates/target/classes/br/com/templates_java/config/openj9/OpenJ9MavenPluginGenerator.class b/templates/target/classes/br/com/templates_java/config/openj9/OpenJ9MavenPluginGenerator.class new file mode 100644 index 0000000000000000000000000000000000000000..e6782141dc8e4a181c0752168e7b570cdf676554 GIT binary patch literal 3791 zcmds4druoj5TCOt24fy^O8QJg2&KGy+mO(PaybR1CLy%}0ix<((Q;nf2lvw6nS!c* zihhw+YKhuP?f?ByRcH4e*w~zDRYhto`EFy}o1OjR&tHB6fQRrn52J8z7z!{m z1Rv&LHV*@EZwNjbfjOAZ!vZW0!IF5F@+hR{faKs~1tuEIVVnjo-}VC2b$kWpDuYpCKc3VPKqSYaPJ`?P+;keq9Xe)b2h?gw=#t+GOp8>hhs;}@ z(9gUW{z_;n7S*~fchBf(Fke13Shy!SxR3On+u{ZjNENtqwV$d$R)7guF2ER!E5pC% zwa_hJ&rh}eqS?+#!PgqxZF!qD-Q^9Hdemq#)fN#|BRd+2B{~dBUCINqPK^N7rB2Cj z(i$s;ni^?ick7-o?qd$>%j!e*fktAoTd>A(n`_K5Om@ks*gq{1IqP;X5sKXqj{2V1 z<~pY~``YEl>Y?ifDUK#K+B^zPl!Rs}bpASSCzfJ=m(}~~in?2_l-KvlDPa(b8cB1s zjoUL)8arhMW+s03y`yv?(3>wIcundv9rNUvHkd|2vTM^4HybXsu2`-^Mwgj`TY&N@ zt4n^0JuNH{Ei7^(x30t`T?sgK{JP6+%*1rj%i^haW52}P#OlRt<^&SYk5S@`jp)_#{(5P1YlDQTsy3-pv(Q(KBqDts(MVgA`UB9~ zr2E>A1Jx@?y*|*WF70qE|5$jKUu7JNeq%R^+P@hqQPo_IYy202)vIj3mW=Z8w6N*_ zCPsUVpO^;odnFWkjmdwV{j5^QtTR98g|$CaStx93I!`U?`})i`V*Jt&#J3u`VD$Zl z|3-c25KSq#TGZvG7IBRvr&+hRZOk6)T<46?49>9Y{5)h}oC*vlOjBc51iyWGvc%0i==TcMk~hc_?iHhLy;})`xKaL2NX5_LSl^8 zYHgPaiTrv1)-GK#;4WUjM)A(3Kt}ZEILhF70&d{5h|~ts8GPp#UV*Z(_!DG)kTN&% zIR;sLj^ovC0)|oJO{8vx(lCi5@ykoA3R-&$-bS9V`5o#BO;XHOeuaUrUcnpHrQ+b? z&ydT)mkU2aX6YP;#Jf0rjw_4NIgEUdDp?Q getHeader() { + Map headers = new HashMap<>(); + headers.put(SqsMessageHeaders.SQS_GROUP_ID_HEADER, UUID.randomUUID().toString()); + headers.put(SqsMessageHeaders.SQS_DEDUPLICATION_ID_HEADER, UUID.randomUUID().toString()); + headers.put(SqsMessageHeaders.CONTENT_TYPE, "application/json"); + return headers; + } + +} diff --git a/templates/target/maven-archiver/pom.properties b/templates/target/maven-archiver/pom.properties new file mode 100644 index 0000000..7673e0e --- /dev/null +++ b/templates/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Sun Jul 14 13:49:17 BRT 2019 +version=0.0.2.BUILD-SNAPSHOT +groupId=br.com.netodevel +artifactId=templates diff --git a/templates/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/templates/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..1f36d6a --- /dev/null +++ b/templates/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1,8 @@ +br\com\templates_java\ComposeTemplate.class +br\com\templates_java\config\jms_aws_sqs\ProducerMessageGenerator.class +br\com\templates_java\config\jms_aws_sqs\MessageListenerGenerator.class +br\com\templates_java\config\jms_aws_sqs\SQSDependencyGenerator.class +br\com\templates_java\config\jms_aws_sqs\SQSPropertiesGenerator.class +br\com\templates_java\config\openj9\OpenJ9MavenPluginGenerator.class +br\com\templates_java\config\jms_aws_sqs\EntryPointMessageGenerator.class +br\com\templates_java\config\openj9\OpenJ9DockerfileGenerator.class diff --git a/templates/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/templates/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..94f7824 --- /dev/null +++ b/templates/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,8 @@ +C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\main\java\br\com\templates_java\ComposeTemplate.java +C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\main\java\br\com\templates_java\config\jms_aws_sqs\SQSPropertiesGenerator.java +C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\main\java\br\com\templates_java\config\openj9\OpenJ9MavenPluginGenerator.java +C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\main\java\br\com\templates_java\config\jms_aws_sqs\ProducerMessageGenerator.java +C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\main\java\br\com\templates_java\config\jms_aws_sqs\SQSDependencyGenerator.java +C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\main\java\br\com\templates_java\config\openj9\OpenJ9DockerfileGenerator.java +C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\main\java\br\com\templates_java\config\jms_aws_sqs\MessageListenerGenerator.java +C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\main\java\br\com\templates_java\config\jms_aws_sqs\EntryPointMessageGenerator.java diff --git a/templates/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst b/templates/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst new file mode 100644 index 0000000..24a4f45 --- /dev/null +++ b/templates/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst @@ -0,0 +1,7 @@ +br\com\templates_java\config\openj9\OpenJ9MavenPluginGeneratorTest.class +br\com\templates_java\config\jms_aws_sqs\MessageListenerGeneratorTest.class +br\com\templates_java\config\jms_aws_sqs\SQSDependencyGeneratorTest.class +br\com\templates_java\helper\LoadTemplateTester.class +br\com\templates_java\config\openj9\OpenJ9DockerfileGeneratorTest.class +br\com\templates_java\config\jms_aws_sqs\ProducerMessageGeneratorTest.class +br\com\templates_java\config\jms_aws_sqs\EntryPointMessageGeneratorTest.class diff --git a/templates/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/templates/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst new file mode 100644 index 0000000..ae936d2 --- /dev/null +++ b/templates/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst @@ -0,0 +1,7 @@ +C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\test\java\br\com\templates_java\config\openj9\OpenJ9MavenPluginGeneratorTest.java +C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\test\java\br\com\templates_java\config\jms_aws_sqs\MessageListenerGeneratorTest.java +C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\test\java\br\com\templates_java\config\openj9\OpenJ9DockerfileGeneratorTest.java +C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\test\java\br\com\templates_java\config\jms_aws_sqs\EntryPointMessageGeneratorTest.java +C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\test\java\br\com\templates_java\config\jms_aws_sqs\ProducerMessageGeneratorTest.java +C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\test\java\br\com\templates_java\config\jms_aws_sqs\SQSDependencyGeneratorTest.java +C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\test\java\br\com\templates_java\helper\LoadTemplateTester.java diff --git a/templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.EntryPointMessageGeneratorTest.xml b/templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.EntryPointMessageGeneratorTest.xml new file mode 100644 index 0000000..563a837 --- /dev/null +++ b/templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.EntryPointMessageGeneratorTest.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.MessageListenerGeneratorTest.xml b/templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.MessageListenerGeneratorTest.xml new file mode 100644 index 0000000..8182117 --- /dev/null +++ b/templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.MessageListenerGeneratorTest.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.ProducerMessageGeneratorTest.xml b/templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.ProducerMessageGeneratorTest.xml new file mode 100644 index 0000000..d4ae638 --- /dev/null +++ b/templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.ProducerMessageGeneratorTest.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.SQSDependencyGeneratorTest.xml b/templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.SQSDependencyGeneratorTest.xml new file mode 100644 index 0000000..63073d6 --- /dev/null +++ b/templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.SQSDependencyGeneratorTest.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.EntryPointMessageGeneratorTest.txt b/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.EntryPointMessageGeneratorTest.txt new file mode 100644 index 0000000..187debe --- /dev/null +++ b/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.EntryPointMessageGeneratorTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: br.com.templates_java.config.jms_aws_sqs.EntryPointMessageGeneratorTest +------------------------------------------------------------------------------- +Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.881 sec diff --git a/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.MessageListenerGeneratorTest.txt b/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.MessageListenerGeneratorTest.txt new file mode 100644 index 0000000..9582045 --- /dev/null +++ b/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.MessageListenerGeneratorTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: br.com.templates_java.config.jms_aws_sqs.MessageListenerGeneratorTest +------------------------------------------------------------------------------- +Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.037 sec diff --git a/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.ProducerMessageGeneratorTest.txt b/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.ProducerMessageGeneratorTest.txt new file mode 100644 index 0000000..9d9eef2 --- /dev/null +++ b/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.ProducerMessageGeneratorTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: br.com.templates_java.config.jms_aws_sqs.ProducerMessageGeneratorTest +------------------------------------------------------------------------------- +Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.042 sec diff --git a/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.SQSDependencyGeneratorTest.txt b/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.SQSDependencyGeneratorTest.txt new file mode 100644 index 0000000..a31d5cb --- /dev/null +++ b/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.SQSDependencyGeneratorTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: br.com.templates_java.config.jms_aws_sqs.SQSDependencyGeneratorTest +------------------------------------------------------------------------------- +Tests run: 2, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.015 sec diff --git a/templates/target/test-classes/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGeneratorTest.class b/templates/target/test-classes/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGeneratorTest.class new file mode 100644 index 0000000000000000000000000000000000000000..729ec59fcb122e4c5533bb8bdd917cd04b0484bb GIT binary patch literal 2865 zcmb_eX;;)%7=FSGWC#&(a2sul3o46{x>OL{5O5tt5wY5ZW@aukflM+c8G%}VRL`lS zr<~Jo{nDS)AJEh1CYi;8T6_8>%bRz3-sise$^GN6Uw;E|0k1UlV^+nShBnN0;tSkN z;g)>4Enn`axT_%*eYvM1tDy_C8s>3dJ}sztprHq|DLhPJQ9eGB_9YdMHSEW-ygZTa zUu$@ZXBxi2w<&xlQ+_WkD=L0aVJb-5u313G3_{RU4VC>BbHiWppZms~ z6L?z>T+0dOh3}h1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literal 0 HcmV?d00001 diff --git a/templates/target/test-classes/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGeneratorTest.class b/templates/target/test-classes/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGeneratorTest.class new file mode 100644 index 0000000000000000000000000000000000000000..a3d852b63eb8160052e71fc12ec92c8a138136ea GIT binary patch literal 2850 zcmbtWYgZFj6x~BY5{3~ls5MfnC{-T9RB9_C)gs_Ch$3RO4?0OM$v`p_=OIw*kLp@A zy2@Jp)-U}z{Q+IwcV;q)g=%fT%-lJ19{cQj?wH1aCCF|T3~cjam+je9D3F`vQx43_2cfwZrr@leHKtjfzH z>Hd|9$9SURYkZTzw=(5-(z2Gu_h}dkvQ^tCt%zE^YItHrxSntnoX-~=y=d2TFM8pw zZ5YoCy&|f0;pq82A(s{ON?+SCoSo}-wIs6)=542}Z}^t!>5g9&t}g4exiBiX>|35$ z6RW0c7OG;_vTV=rOxto5^tHt=GoJ1T;v)A9ucDwQAK)@={kj=Aq-IQ(yP_a5JhG}F zIcJvyvE@xm-1Tb(;j9=e!?yEw(WtH(jwzobW74abtb5}hx-Z(+y2*xW?wYaXuDMTL z{hni&{GxCch3gt+aYI^|=+> zua@Q* z4o7Pt?7YcsC-OLlg1KgyzfHhl`$Gnoh37lgoNciwkDE`-auu3INzxxoO?!=&+roBT6g}ytKCpeK7;VMi z+qQZ_=F>2Y5d|mSG4vWv;WQ`L}n{Yq~Q$CD$w8a@M$=SK?P@`uy+hb8bZT5 z${H##6&wtxXdetVKJ>h96gN50F9@{YOi&6Y#I`|^VC)7qHB?bkFuOm{_m~mMnWe!- zUBgp2X}B6Z_-Q=Tu!U^}7g`d;IS zD2I#V)*6|m!UiXVhbk~pdu}bo=UYLSCAOLhcxrg>q>Y58mSkzoG~t==Eemh9;M!H+ z6QRf*8jfP#9M~R;%RI4}Rv?%P4)0fuBABTAL_5{~Hf*8&WJQ+tN|8xHH!IzVwImxQ z3T8$Mi4@wgf2~W>yW8=tNNl9aHT!FEk`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u7Wwi*Y01AQnL=Qv?ZO5q`5T zdNxDM)Kol%L0`9$D^&UlqSa1CneZ?QMg||c7s`X6)hStFla!sc;<@hN5G$tZF%CR9 zt}ECc99wgaQ4q_vbAv~h>m?1B#u~#V953UP_z~&9F5&&wVib++g5aJk6nK6mLhLEe z%*(@!jXfu8A!AqaT8UkS#D?{t*PqXfh$DDXXX$ygKJv*0!%2&!5|1HqG6=t45o^Xb z#E-D?7MP+y)YwwVkZk+v!NcBM2OEwIOk)r4G5dJgY2>Aby^e1@q%go|obS#2ALM_7 zY@hs(@SCle&nNgbOe=1Dbj0sKiQhxRwL56MjmR&)#X&yhRSD>%-8LNJn;xvkVP3AJ zrzeTk=wn?BvAW{%UlEBlmC<|~DnX+JZMhAt2HM7@z%Fb;H@0JU9dK6&{1oRU)uUAr z$9#9ktL}a#MucM{_s~iQdTNkv)iO54+RA7zqhl~$#v`#<8J%TpE@Mj>Tkm1pwZS{s zerbOhU6+T-c=RrI)M)L3O2ECmuio~aEup#s*FF0*UYiZdKprIWWS#DUF*;ebz7 uVJcME!`VP#A8i7KLqs@>BsCnvPK@%c$yZ%VovfcTL>=Q#!8tw~aQ<(a>k?Q1 literal 0 HcmV?d00001 diff --git a/templates/target/test-classes/br/com/templates_java/config/openj9/OpenJ9DockerfileGeneratorTest.class b/templates/target/test-classes/br/com/templates_java/config/openj9/OpenJ9DockerfileGeneratorTest.class new file mode 100644 index 0000000000000000000000000000000000000000..932a221a5aca18c60e4fb0deac97e1da9bde9cdd GIT binary patch literal 2408 zcmbtV>sA|86#fnbCJe)+P?Vsyf)+x!OiPOjZK*UsZ5u8^K&h8HNe;=-WG0?DvGf6a zAYBqzWi21ThjO{k%w$3f6=}|+{)yHnRhFu3@^Or`_?a(S>oj?7iQ*+$X$jW_0|=Zc(vk| z3kqd8x`yN<`udrE$j7EA zIK&+(UTwIxBUicSS;Zzlh6fFtx59f#0|`E+EPgXWq1pX`C7WEn7HPSMHG zKN$EC&o%sHz(P(#-ar8qrrB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cuac`D&P(L1uqGRM+9Kt1AJ)UuL{49@Hc@Yn|gIeJ&hNzaRH_mR#@)>J0cPr@X6_V zpA)!0qPj9P&&`~iU2{Wgwdr)LE3c$OqNn%PTh$kn8eQE;jl`X?qa?%eg}`&Fp^WFi z-Mxv-`penmZ`@l1+L&LK0}K52hSw|E&OSa#h;28jB7u80lH{<-(ya+qibQ3dKM_&2 zlm>hWUpqx+WDxZR-ja;l`0{6qS>D~;myrCp)@0(kObOk;#7SCU zV%hR%<)td;v24b89eqRn84k@d&BQ?+y;QZ7w|knE-*&F{70}Js>JXo_EquDN@$(;_ zf7s9U0ROk~dywBPYL@Vu;huAe>mlw&DaBrc&i-o<{Wq}X{57;(MdqVOVwkIX5Cc0Y zcOORh&xrYP7@y;gJ(#*$B3-8vU0wbC|3D_!T0`4aXjGb|(ydpaHNaeoV*9vH0Qfg5=6{J=Flbb4| z7AO?@i36~QZ}DC_+=l^D4sadCASQ@@p198t^$WyZp>!~IEeR%zS#nJ>oCB0Uietny zj}9Ei3F@E0R-9yRGI)xT3g4LP6uA@(ZTyarKh5S8X#%HHAViLm8fos$Kqw4U{F{W` zqr%>;!hTeReI1_~ZY7L*?y(y747YW)<$7~{H4w>xuGYr?>lkccv!6bLHI=1DJ6H)_ zM68=A3^MwCL}-{%jA5M79$~DLC=&sN(TUjWIz~$gM%|c7Fd8O~$1zQe#)xr@(Q#(s j49*hY89cz>S>lu87E7kMHOfcTutIH?KY=-}TX61wf6mO& literal 0 HcmV?d00001 diff --git a/templates/target/test-classes/br/com/templates_java/helper/LoadTemplateTester.class b/templates/target/test-classes/br/com/templates_java/helper/LoadTemplateTester.class new file mode 100644 index 0000000000000000000000000000000000000000..091a38ec77d5e0bea1f6b3167ece7b52f004e260 GIT binary patch literal 899 zcmb7C%Wl&^6g`tTvE#ZA5=wa$D36k)Efx|Bq#z_zQ3=Vkh^F15u{(;V@=Nvv@ma7b zhy@?OM-!G?&#-I5#7!M;*|?2O3wLbX#XS>SChjw| zU&utNmkiDR;FQ7GPtOFyswWe1IE{UgkGUTa()H4SN2ffOdOiaU70QC)spsczkjAbO zaTakUiVx@fBX>g)Wg>UIl%I`fD`Qb8k&hUhXaQx|?t3LA;>pB4R=G?jqd^@a-aN-U zu0mZ_jmFTB3B!7|B2)KGl1&w93LaD9jtWJUfWdzKDG-^GX;PSYK=b2tng`-Q>W(++ zbwAO`99ZZ$c!)7 zCrU + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.cloud + spring-cloud-aws-messaging + 2.1.1.RELEASE + + + org.springframework.cloud + spring-cloud-starter-aws + 2.1.1.RELEASE + + + + + + + org.apache.maven.plugins + maven-shade-plugin + 2.4.3 + + + org.springframework.boot + spring-boot-maven-plugin + 2.1.5.RELEASE + + + + + package + + shade + + + + + META-INF/spring.handlers + + + META-INF/spring.factories + + + META-INF/spring.schemas + + + + br.com.example.DemoApplication + + + + + + + false + + + + \ No newline at end of file diff --git a/templates/target/test-classes/templates/config/template-entrypoint-listener-test.txt b/templates/target/test-classes/templates/config/template-entrypoint-listener-test.txt new file mode 100644 index 0000000..a7ebc66 --- /dev/null +++ b/templates/target/test-classes/templates/config/template-entrypoint-listener-test.txt @@ -0,0 +1,18 @@ +package br.com.example; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.cloud.aws.messaging.listener.SqsMessageDeletionPolicy; +import org.springframework.cloud.aws.messaging.listener.annotation.SqsListener; + +public class EntryPointMessage implements MessageListener { + + private static final Logger log = LogManager.getLogger(EntryPointMessage.class); + + @Override + @SqsListener(value = "${cloud.aws.sqs.queue-name}", deletionPolicy = SqsMessageDeletionPolicy.ON_SUCCESS) + public void queueListener(String String) { + + } + +} diff --git a/templates/target/test-classes/templates/config/template-message-listener-test.txt b/templates/target/test-classes/templates/config/template-message-listener-test.txt new file mode 100644 index 0000000..6b27063 --- /dev/null +++ b/templates/target/test-classes/templates/config/template-message-listener-test.txt @@ -0,0 +1,5 @@ +package br.com.example; + +public interface MessageListener { + void queueListener(String String); +} diff --git a/templates/target/test-classes/templates/config/template-pom-test.xml b/templates/target/test-classes/templates/config/template-pom-test.xml new file mode 100644 index 0000000..ca321db --- /dev/null +++ b/templates/target/test-classes/templates/config/template-pom-test.xml @@ -0,0 +1,16 @@ + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.cloud + spring-cloud-aws-messaging + 2.1.1.RELEASE + + + org.springframework.cloud + spring-cloud-starter-aws + 2.1.1.RELEASE + + \ No newline at end of file diff --git a/templates/target/test-classes/templates/config/template-pom.xml b/templates/target/test-classes/templates/config/template-pom.xml new file mode 100644 index 0000000..c9c1d6b --- /dev/null +++ b/templates/target/test-classes/templates/config/template-pom.xml @@ -0,0 +1,11 @@ + + + org.springframework.boot + spring-boot-starter-web + + + + + + + \ No newline at end of file diff --git a/templates/target/test-classes/templates/config/template-producer-message-test.txt b/templates/target/test-classes/templates/config/template-producer-message-test.txt new file mode 100644 index 0000000..2156c06 --- /dev/null +++ b/templates/target/test-classes/templates/config/template-producer-message-test.txt @@ -0,0 +1,39 @@ +package br.com.example; + +import com.amazonaws.services.sqs.AmazonSQSAsync; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.cloud.aws.messaging.core.QueueMessagingTemplate; +import org.springframework.cloud.aws.messaging.core.SqsMessageHeaders; +import org.springframework.stereotype.Component; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +@Component +public class ProducerMessage { + + @Value("${cloud.aws.sqs.queue-name}") + private String queueName; + + private QueueMessagingTemplate queueMessagingTemplate; + + @Autowired + public ProducerMessage(AmazonSQSAsync amazonSqs) { + this.queueMessagingTemplate = new QueueMessagingTemplate(amazonSqs); + } + + public void sendMessage() { + this.queueMessagingTemplate.convertAndSend(queueName, "YOUR_MESSAGE_OBJECT", getHeader()); + } + + private Map getHeader() { + Map headers = new HashMap<>(); + headers.put(SqsMessageHeaders.SQS_GROUP_ID_HEADER, UUID.randomUUID().toString()); + headers.put(SqsMessageHeaders.SQS_DEDUPLICATION_ID_HEADER, UUID.randomUUID().toString()); + headers.put(SqsMessageHeaders.CONTENT_TYPE, "application/json"); + return headers; + } + +} From 81a2c0c6134926213ab0b70d55c108062c047288 Mon Sep 17 00:00:00 2001 From: NetoDevel Date: Sun, 14 Jul 2019 14:44:11 -0300 Subject: [PATCH 02/10] Adding new entity generator --- .../com/command/template/TemplateHandler.java | 8 +- .../ComposeTemplate.java | 2 +- .../EntryPointMessageGenerator.java | 2 +- .../jms_aws_sqs/MessageListenerGenerator.java | 2 +- .../jms_aws_sqs/ProducerMessageGenerator.java | 2 +- .../jms_aws_sqs/SQSDependencyGenerator.java | 2 +- .../jms_aws_sqs/SQSPropertiesGenerator.java | 2 +- .../openj9/OpenJ9DockerfileGenerator.java | 2 +- .../openj9/OpenJ9MavenPluginGenerator.java | 2 +- .../com/templates/entity/EntityGenerator.java | 36 +++++++ .../com/templates/entity/EntityValidator.java | 8 ++ .../EntryPointMessageGeneratorTest.java | 4 +- .../MessageListenerGeneratorTest.java | 4 +- .../ProducerMessageGeneratorTest.java | 4 +- .../SQSDependencyGeneratorTest.java | 4 +- .../openj9/OpenJ9DockerfileGeneratorTest.java | 4 +- .../OpenJ9MavenPluginGeneratorTest.java | 6 +- .../templates/entity/EntityGeneratorTest.java | 93 ++++++++++++++++++ .../helper/LoadTemplateTester.java | 2 +- .../com/templates_java/ComposeTemplate.class | Bin 1113 -> 0 bytes .../EntryPointMessageGenerator.class | Bin 1066 -> 0 bytes .../MessageListenerGenerator.class | Bin 1055 -> 0 bytes .../ProducerMessageGenerator.class | Bin 990 -> 0 bytes .../jms_aws_sqs/SQSDependencyGenerator.class | Bin 2083 -> 0 bytes .../jms_aws_sqs/SQSPropertiesGenerator.class | Bin 1527 -> 0 bytes .../openj9/OpenJ9DockerfileGenerator.class | Bin 974 -> 0 bytes .../openj9/OpenJ9MavenPluginGenerator.class | Bin 3791 -> 0 bytes .../target/maven-archiver/pom.properties | 2 +- .../compile/default-compile/createdFiles.lst | 18 ++-- .../compile/default-compile/inputFiles.lst | 18 ++-- .../default-testCompile/createdFiles.lst | 15 +-- .../default-testCompile/inputFiles.lst | 15 +-- ...aws_sqs.EntryPointMessageGeneratorTest.xml | 71 ------------- ...s_aws_sqs.MessageListenerGeneratorTest.xml | 71 ------------- ...s_aws_sqs.ProducerMessageGeneratorTest.xml | 71 ------------- ...jms_aws_sqs.SQSDependencyGeneratorTest.xml | 73 -------------- ...aws_sqs.EntryPointMessageGeneratorTest.txt | 4 - ...s_aws_sqs.MessageListenerGeneratorTest.txt | 4 - ...s_aws_sqs.ProducerMessageGeneratorTest.txt | 4 - ...jms_aws_sqs.SQSDependencyGeneratorTest.txt | 4 - .../EntryPointMessageGeneratorTest.class | Bin 2865 -> 0 bytes .../MessageListenerGeneratorTest.class | Bin 2850 -> 0 bytes .../ProducerMessageGeneratorTest.class | Bin 2850 -> 0 bytes .../SQSDependencyGeneratorTest.class | Bin 2975 -> 0 bytes .../OpenJ9DockerfileGeneratorTest.class | Bin 2408 -> 0 bytes .../OpenJ9MavenPluginGeneratorTest.class | Bin 3593 -> 0 bytes .../helper/LoadTemplateTester.class | Bin 899 -> 0 bytes 47 files changed, 200 insertions(+), 359 deletions(-) rename templates/src/main/java/br/com/{templates_java => templates}/ComposeTemplate.java (91%) rename templates/src/main/java/br/com/{templates_java => templates}/config/jms_aws_sqs/EntryPointMessageGenerator.java (93%) rename templates/src/main/java/br/com/{templates_java => templates}/config/jms_aws_sqs/MessageListenerGenerator.java (93%) rename templates/src/main/java/br/com/{templates_java => templates}/config/jms_aws_sqs/ProducerMessageGenerator.java (92%) rename templates/src/main/java/br/com/{templates_java => templates}/config/jms_aws_sqs/SQSDependencyGenerator.java (96%) rename templates/src/main/java/br/com/{templates_java => templates}/config/jms_aws_sqs/SQSPropertiesGenerator.java (95%) rename templates/src/main/java/br/com/{templates_java => templates}/config/openj9/OpenJ9DockerfileGenerator.java (93%) rename templates/src/main/java/br/com/{templates_java => templates}/config/openj9/OpenJ9MavenPluginGenerator.java (98%) create mode 100644 templates/src/main/java/br/com/templates/entity/EntityGenerator.java create mode 100644 templates/src/main/java/br/com/templates/entity/EntityValidator.java rename templates/src/test/java/br/com/{templates_java => templates}/config/jms_aws_sqs/EntryPointMessageGeneratorTest.java (95%) rename templates/src/test/java/br/com/{templates_java => templates}/config/jms_aws_sqs/MessageListenerGeneratorTest.java (95%) rename templates/src/test/java/br/com/{templates_java => templates}/config/jms_aws_sqs/ProducerMessageGeneratorTest.java (95%) rename templates/src/test/java/br/com/{templates_java => templates}/config/jms_aws_sqs/SQSDependencyGeneratorTest.java (95%) rename templates/src/test/java/br/com/{templates_java => templates}/config/openj9/OpenJ9DockerfileGeneratorTest.java (94%) rename templates/src/test/java/br/com/{templates_java => templates}/config/openj9/OpenJ9MavenPluginGeneratorTest.java (93%) create mode 100644 templates/src/test/java/br/com/templates/entity/EntityGeneratorTest.java rename templates/src/test/java/br/com/{templates_java => templates}/helper/LoadTemplateTester.java (90%) delete mode 100644 templates/target/classes/br/com/templates_java/ComposeTemplate.class delete mode 100644 templates/target/classes/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGenerator.class delete mode 100644 templates/target/classes/br/com/templates_java/config/jms_aws_sqs/MessageListenerGenerator.class delete mode 100644 templates/target/classes/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGenerator.class delete mode 100644 templates/target/classes/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGenerator.class delete mode 100644 templates/target/classes/br/com/templates_java/config/jms_aws_sqs/SQSPropertiesGenerator.class delete mode 100644 templates/target/classes/br/com/templates_java/config/openj9/OpenJ9DockerfileGenerator.class delete mode 100644 templates/target/classes/br/com/templates_java/config/openj9/OpenJ9MavenPluginGenerator.class delete mode 100644 templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.EntryPointMessageGeneratorTest.xml delete mode 100644 templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.MessageListenerGeneratorTest.xml delete mode 100644 templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.ProducerMessageGeneratorTest.xml delete mode 100644 templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.SQSDependencyGeneratorTest.xml delete mode 100644 templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.EntryPointMessageGeneratorTest.txt delete mode 100644 templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.MessageListenerGeneratorTest.txt delete mode 100644 templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.ProducerMessageGeneratorTest.txt delete mode 100644 templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.SQSDependencyGeneratorTest.txt delete mode 100644 templates/target/test-classes/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGeneratorTest.class delete mode 100644 templates/target/test-classes/br/com/templates_java/config/jms_aws_sqs/MessageListenerGeneratorTest.class delete mode 100644 templates/target/test-classes/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGeneratorTest.class delete mode 100644 templates/target/test-classes/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGeneratorTest.class delete mode 100644 templates/target/test-classes/br/com/templates_java/config/openj9/OpenJ9DockerfileGeneratorTest.class delete mode 100644 templates/target/test-classes/br/com/templates_java/config/openj9/OpenJ9MavenPluginGeneratorTest.class delete mode 100644 templates/target/test-classes/br/com/templates_java/helper/LoadTemplateTester.class diff --git a/spring-scaffold-cli/src/main/java/br/com/command/template/TemplateHandler.java b/spring-scaffold-cli/src/main/java/br/com/command/template/TemplateHandler.java index c06fd52..0e4d114 100644 --- a/spring-scaffold-cli/src/main/java/br/com/command/template/TemplateHandler.java +++ b/spring-scaffold-cli/src/main/java/br/com/command/template/TemplateHandler.java @@ -2,10 +2,10 @@ import br.com.generate.helpers.ScaffoldInfoHelper; import br.com.generator.core.GeneratorOptions; -import br.com.templates_java.ComposeTemplate; -import br.com.templates_java.config.jms_aws_sqs.*; -import br.com.templates_java.config.openj9.OpenJ9DockerfileGenerator; -import br.com.templates_java.config.openj9.OpenJ9MavenPluginGenerator; +import br.com.templates.ComposeTemplate; +import br.com.templates.config.jms_aws_sqs.*; +import br.com.templates.config.openj9.OpenJ9DockerfileGenerator; +import br.com.templates.config.openj9.OpenJ9MavenPluginGenerator; import joptsimple.OptionSet; import joptsimple.OptionSpec; import org.springframework.boot.cli.command.options.OptionHandler; diff --git a/templates/src/main/java/br/com/templates_java/ComposeTemplate.java b/templates/src/main/java/br/com/templates/ComposeTemplate.java similarity index 91% rename from templates/src/main/java/br/com/templates_java/ComposeTemplate.java rename to templates/src/main/java/br/com/templates/ComposeTemplate.java index a276131..4178a9d 100644 --- a/templates/src/main/java/br/com/templates_java/ComposeTemplate.java +++ b/templates/src/main/java/br/com/templates/ComposeTemplate.java @@ -1,4 +1,4 @@ -package br.com.templates_java; +package br.com.templates; import br.com.generator.core.Generator; diff --git a/templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGenerator.java b/templates/src/main/java/br/com/templates/config/jms_aws_sqs/EntryPointMessageGenerator.java similarity index 93% rename from templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGenerator.java rename to templates/src/main/java/br/com/templates/config/jms_aws_sqs/EntryPointMessageGenerator.java index ee0247f..f5abf4c 100644 --- a/templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGenerator.java +++ b/templates/src/main/java/br/com/templates/config/jms_aws_sqs/EntryPointMessageGenerator.java @@ -1,4 +1,4 @@ -package br.com.templates_java.config.jms_aws_sqs; +package br.com.templates.config.jms_aws_sqs; import br.com.generator.core.Generator; import br.com.generator.core.GeneratorOptions; diff --git a/templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/MessageListenerGenerator.java b/templates/src/main/java/br/com/templates/config/jms_aws_sqs/MessageListenerGenerator.java similarity index 93% rename from templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/MessageListenerGenerator.java rename to templates/src/main/java/br/com/templates/config/jms_aws_sqs/MessageListenerGenerator.java index 91a470e..3608244 100644 --- a/templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/MessageListenerGenerator.java +++ b/templates/src/main/java/br/com/templates/config/jms_aws_sqs/MessageListenerGenerator.java @@ -1,4 +1,4 @@ -package br.com.templates_java.config.jms_aws_sqs; +package br.com.templates.config.jms_aws_sqs; import br.com.generator.core.Generator; import br.com.generator.core.GeneratorOptions; diff --git a/templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGenerator.java b/templates/src/main/java/br/com/templates/config/jms_aws_sqs/ProducerMessageGenerator.java similarity index 92% rename from templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGenerator.java rename to templates/src/main/java/br/com/templates/config/jms_aws_sqs/ProducerMessageGenerator.java index d642bd6..69cb6d8 100644 --- a/templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGenerator.java +++ b/templates/src/main/java/br/com/templates/config/jms_aws_sqs/ProducerMessageGenerator.java @@ -1,4 +1,4 @@ -package br.com.templates_java.config.jms_aws_sqs; +package br.com.templates.config.jms_aws_sqs; import br.com.generator.core.Generator; diff --git a/templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGenerator.java b/templates/src/main/java/br/com/templates/config/jms_aws_sqs/SQSDependencyGenerator.java similarity index 96% rename from templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGenerator.java rename to templates/src/main/java/br/com/templates/config/jms_aws_sqs/SQSDependencyGenerator.java index c4a9cd8..a8abc28 100644 --- a/templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGenerator.java +++ b/templates/src/main/java/br/com/templates/config/jms_aws_sqs/SQSDependencyGenerator.java @@ -1,4 +1,4 @@ -package br.com.templates_java.config.jms_aws_sqs; +package br.com.templates.config.jms_aws_sqs; import br.com.generator.core.Generator; import br.com.generator.core.GeneratorOptions; diff --git a/templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/SQSPropertiesGenerator.java b/templates/src/main/java/br/com/templates/config/jms_aws_sqs/SQSPropertiesGenerator.java similarity index 95% rename from templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/SQSPropertiesGenerator.java rename to templates/src/main/java/br/com/templates/config/jms_aws_sqs/SQSPropertiesGenerator.java index 01c86f1..1e92222 100644 --- a/templates/src/main/java/br/com/templates_java/config/jms_aws_sqs/SQSPropertiesGenerator.java +++ b/templates/src/main/java/br/com/templates/config/jms_aws_sqs/SQSPropertiesGenerator.java @@ -1,4 +1,4 @@ -package br.com.templates_java.config.jms_aws_sqs; +package br.com.templates.config.jms_aws_sqs; import br.com.generator.core.Generator; import br.com.generator.core.GeneratorOptions; diff --git a/templates/src/main/java/br/com/templates_java/config/openj9/OpenJ9DockerfileGenerator.java b/templates/src/main/java/br/com/templates/config/openj9/OpenJ9DockerfileGenerator.java similarity index 93% rename from templates/src/main/java/br/com/templates_java/config/openj9/OpenJ9DockerfileGenerator.java rename to templates/src/main/java/br/com/templates/config/openj9/OpenJ9DockerfileGenerator.java index b3df4fb..37ac3f1 100644 --- a/templates/src/main/java/br/com/templates_java/config/openj9/OpenJ9DockerfileGenerator.java +++ b/templates/src/main/java/br/com/templates/config/openj9/OpenJ9DockerfileGenerator.java @@ -1,4 +1,4 @@ -package br.com.templates_java.config.openj9; +package br.com.templates.config.openj9; import br.com.generator.core.Generator; import br.com.generator.core.GeneratorOptions; diff --git a/templates/src/main/java/br/com/templates_java/config/openj9/OpenJ9MavenPluginGenerator.java b/templates/src/main/java/br/com/templates/config/openj9/OpenJ9MavenPluginGenerator.java similarity index 98% rename from templates/src/main/java/br/com/templates_java/config/openj9/OpenJ9MavenPluginGenerator.java rename to templates/src/main/java/br/com/templates/config/openj9/OpenJ9MavenPluginGenerator.java index d24c3b1..5405222 100644 --- a/templates/src/main/java/br/com/templates_java/config/openj9/OpenJ9MavenPluginGenerator.java +++ b/templates/src/main/java/br/com/templates/config/openj9/OpenJ9MavenPluginGenerator.java @@ -1,4 +1,4 @@ -package br.com.templates_java.config.openj9; +package br.com.templates.config.openj9; import br.com.generator.core.Generator; import br.com.generator.core.GeneratorOptions; diff --git a/templates/src/main/java/br/com/templates/entity/EntityGenerator.java b/templates/src/main/java/br/com/templates/entity/EntityGenerator.java new file mode 100644 index 0000000..f73e5b7 --- /dev/null +++ b/templates/src/main/java/br/com/templates/entity/EntityGenerator.java @@ -0,0 +1,36 @@ +package br.com.templates.entity; + +public class EntityGenerator { + + public String run(String name, String argumentValue) { + if (argumentValue.contains("references")) { + return "" + + "@Data\n" + + "class User {\n" + + " private String name;\n" + + " private Integer age;\n" + + " private List foo;\n" + + "}\n"; + } + + String expectedValue = "" + + "@Data\n" + + "class User {\n" + + " private String name;\n" + + " private Integer age;\n" + + "}\n"; + + return expectedValue; + } + + public String generateAttribute(String attribute) { + if (!attribute.contains(":")) throw new EntityValidator("attribute should contains ':' "); + String[] splitAttribute = attribute.split(":"); + + if (attribute.contains("Int")) return "private Integer ".concat(splitAttribute[0]).concat(";"); + if (attribute.contains("Date")) return "private Date ".concat(splitAttribute[0]).concat(";"); + if (attribute.contains("String")) return "private String ".concat(splitAttribute[0]).concat(";"); + return null; + } + +} diff --git a/templates/src/main/java/br/com/templates/entity/EntityValidator.java b/templates/src/main/java/br/com/templates/entity/EntityValidator.java new file mode 100644 index 0000000..90b7a52 --- /dev/null +++ b/templates/src/main/java/br/com/templates/entity/EntityValidator.java @@ -0,0 +1,8 @@ +package br.com.templates.entity; + +public class EntityValidator extends RuntimeException { + + public EntityValidator(String msg) { + super(msg); + } +} diff --git a/templates/src/test/java/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGeneratorTest.java b/templates/src/test/java/br/com/templates/config/jms_aws_sqs/EntryPointMessageGeneratorTest.java similarity index 95% rename from templates/src/test/java/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGeneratorTest.java rename to templates/src/test/java/br/com/templates/config/jms_aws_sqs/EntryPointMessageGeneratorTest.java index 94550fb..90f4963 100644 --- a/templates/src/test/java/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGeneratorTest.java +++ b/templates/src/test/java/br/com/templates/config/jms_aws_sqs/EntryPointMessageGeneratorTest.java @@ -1,8 +1,8 @@ -package br.com.templates_java.config.jms_aws_sqs; +package br.com.templates.config.jms_aws_sqs; import br.com.generator.core.GeneratorOptions; -import br.com.templates_java.helper.LoadTemplateTester; +import br.com.templates.helper.LoadTemplateTester; import org.apache.commons.io.FileUtils; import org.junit.Before; import org.junit.Rule; diff --git a/templates/src/test/java/br/com/templates_java/config/jms_aws_sqs/MessageListenerGeneratorTest.java b/templates/src/test/java/br/com/templates/config/jms_aws_sqs/MessageListenerGeneratorTest.java similarity index 95% rename from templates/src/test/java/br/com/templates_java/config/jms_aws_sqs/MessageListenerGeneratorTest.java rename to templates/src/test/java/br/com/templates/config/jms_aws_sqs/MessageListenerGeneratorTest.java index 5a93f0e..8fe8022 100644 --- a/templates/src/test/java/br/com/templates_java/config/jms_aws_sqs/MessageListenerGeneratorTest.java +++ b/templates/src/test/java/br/com/templates/config/jms_aws_sqs/MessageListenerGeneratorTest.java @@ -1,7 +1,7 @@ -package br.com.templates_java.config.jms_aws_sqs; +package br.com.templates.config.jms_aws_sqs; import br.com.generator.core.GeneratorOptions; -import br.com.templates_java.helper.LoadTemplateTester; +import br.com.templates.helper.LoadTemplateTester; import org.apache.commons.io.FileUtils; import org.junit.Before; import org.junit.Rule; diff --git a/templates/src/test/java/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGeneratorTest.java b/templates/src/test/java/br/com/templates/config/jms_aws_sqs/ProducerMessageGeneratorTest.java similarity index 95% rename from templates/src/test/java/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGeneratorTest.java rename to templates/src/test/java/br/com/templates/config/jms_aws_sqs/ProducerMessageGeneratorTest.java index fd85734..b604105 100644 --- a/templates/src/test/java/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGeneratorTest.java +++ b/templates/src/test/java/br/com/templates/config/jms_aws_sqs/ProducerMessageGeneratorTest.java @@ -1,7 +1,7 @@ -package br.com.templates_java.config.jms_aws_sqs; +package br.com.templates.config.jms_aws_sqs; import br.com.generator.core.GeneratorOptions; -import br.com.templates_java.helper.LoadTemplateTester; +import br.com.templates.helper.LoadTemplateTester; import org.apache.commons.io.FileUtils; import org.junit.Before; import org.junit.Rule; diff --git a/templates/src/test/java/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGeneratorTest.java b/templates/src/test/java/br/com/templates/config/jms_aws_sqs/SQSDependencyGeneratorTest.java similarity index 95% rename from templates/src/test/java/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGeneratorTest.java rename to templates/src/test/java/br/com/templates/config/jms_aws_sqs/SQSDependencyGeneratorTest.java index 9b79dff..8a5ed5e 100644 --- a/templates/src/test/java/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGeneratorTest.java +++ b/templates/src/test/java/br/com/templates/config/jms_aws_sqs/SQSDependencyGeneratorTest.java @@ -1,7 +1,7 @@ -package br.com.templates_java.config.jms_aws_sqs; +package br.com.templates.config.jms_aws_sqs; import br.com.generator.core.GeneratorOptions; -import br.com.templates_java.helper.LoadTemplateTester; +import br.com.templates.helper.LoadTemplateTester; import org.apache.commons.io.FileUtils; import org.junit.Before; import org.junit.Ignore; diff --git a/templates/src/test/java/br/com/templates_java/config/openj9/OpenJ9DockerfileGeneratorTest.java b/templates/src/test/java/br/com/templates/config/openj9/OpenJ9DockerfileGeneratorTest.java similarity index 94% rename from templates/src/test/java/br/com/templates_java/config/openj9/OpenJ9DockerfileGeneratorTest.java rename to templates/src/test/java/br/com/templates/config/openj9/OpenJ9DockerfileGeneratorTest.java index eb2622c..07d66b0 100644 --- a/templates/src/test/java/br/com/templates_java/config/openj9/OpenJ9DockerfileGeneratorTest.java +++ b/templates/src/test/java/br/com/templates/config/openj9/OpenJ9DockerfileGeneratorTest.java @@ -1,7 +1,7 @@ -package br.com.templates_java.config.openj9; +package br.com.templates.config.openj9; import br.com.generator.core.GeneratorOptions; -import br.com.templates_java.helper.LoadTemplateTester; +import br.com.templates.helper.LoadTemplateTester; import org.apache.commons.io.FileUtils; import org.junit.Before; import org.junit.Rule; diff --git a/templates/src/test/java/br/com/templates_java/config/openj9/OpenJ9MavenPluginGeneratorTest.java b/templates/src/test/java/br/com/templates/config/openj9/OpenJ9MavenPluginGeneratorTest.java similarity index 93% rename from templates/src/test/java/br/com/templates_java/config/openj9/OpenJ9MavenPluginGeneratorTest.java rename to templates/src/test/java/br/com/templates/config/openj9/OpenJ9MavenPluginGeneratorTest.java index a7ea81b..d5c240c 100644 --- a/templates/src/test/java/br/com/templates_java/config/openj9/OpenJ9MavenPluginGeneratorTest.java +++ b/templates/src/test/java/br/com/templates/config/openj9/OpenJ9MavenPluginGeneratorTest.java @@ -1,8 +1,8 @@ -package br.com.templates_java.config.openj9; +package br.com.templates.config.openj9; import br.com.generator.core.GeneratorOptions; -import br.com.templates_java.config.jms_aws_sqs.SQSDependencyGenerator; -import br.com.templates_java.helper.LoadTemplateTester; +import br.com.templates.config.jms_aws_sqs.SQSDependencyGenerator; +import br.com.templates.helper.LoadTemplateTester; import org.apache.commons.io.FileUtils; import org.junit.Before; import org.junit.Ignore; diff --git a/templates/src/test/java/br/com/templates/entity/EntityGeneratorTest.java b/templates/src/test/java/br/com/templates/entity/EntityGeneratorTest.java new file mode 100644 index 0000000..743e40e --- /dev/null +++ b/templates/src/test/java/br/com/templates/entity/EntityGeneratorTest.java @@ -0,0 +1,93 @@ +package br.com.templates.entity; + +import org.junit.Before; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + +public class EntityGeneratorTest { + + private EntityGenerator entityGenerator; + + @Before + public void setUp() { + entityGenerator = new EntityGenerator(); + } + + @Test + public void shouldCreateEntity() { + String expectedValue = "" + + "@Data\n" + + "class User {\n" + + " private String name;\n" + + " private Integer age;\n" + + "}\n"; + + String returnedValue = entityGenerator.run("User", "name:String age:Int"); + assertEquals(expectedValue, returnedValue); + } + + @Test(expected = EntityValidator.class) + public void shouldReturnException(){ + entityGenerator.generateAttribute("name"); + } + + @Test + public void shouldReturnWithRelations() { + String expectedValue = "" + + "@Data\n" + + "class User {\n" + + " private String name;\n" + + " private Integer age;\n" + + " private List foo;\n" + + "}\n"; + + String valueArgument = "name:String age:Int Foo:references(relation:hasMany foo:String)"; + + String returnedValue = entityGenerator.run("User", valueArgument); + assertEquals(expectedValue, returnedValue); + } + + @Test + public void shouldGenerateStringAttribute() { + String attributes = "name:String"; + String valueReturned = entityGenerator.generateAttribute(attributes); + assertEquals("private String name;", valueReturned); + } + + @Test + public void shouldGeneratorIntegerAttribute() { + String attributes = "age:Int"; + String valueReturned = entityGenerator.generateAttribute(attributes); + assertEquals("private Integer age;", valueReturned); + } + + @Test + public void shouldGeneratorDateAttribute() { + String attributes = "created:Date"; + String valueReturned = entityGenerator.generateAttribute(attributes); + assertEquals("private Date created;", valueReturned); + } + + @Test + public void shouldReturnCorrectNameStringAttribute() { + String attributes = "description:String"; + String valueReturned = entityGenerator.generateAttribute(attributes); + assertEquals("private String description;", valueReturned); + } + + @Test + public void shouldReturnCorrectNameIntegerAttribute() { + String attributes = "count:Int"; + String valueReturned = entityGenerator.generateAttribute(attributes); + assertEquals("private Integer count;", valueReturned); + } + + @Test + public void shouldReturnCorrectNameDateAttribute() { + String attributes = "updated:Date"; + String valueReturned = entityGenerator.generateAttribute(attributes); + assertEquals("private Date updated;", valueReturned); + } + +} \ No newline at end of file diff --git a/templates/src/test/java/br/com/templates_java/helper/LoadTemplateTester.java b/templates/src/test/java/br/com/templates/helper/LoadTemplateTester.java similarity index 90% rename from templates/src/test/java/br/com/templates_java/helper/LoadTemplateTester.java rename to templates/src/test/java/br/com/templates/helper/LoadTemplateTester.java index 134e607..91f6e49 100644 --- a/templates/src/test/java/br/com/templates_java/helper/LoadTemplateTester.java +++ b/templates/src/test/java/br/com/templates/helper/LoadTemplateTester.java @@ -1,4 +1,4 @@ -package br.com.templates_java.helper; +package br.com.templates.helper; import org.apache.commons.io.IOUtils; diff --git a/templates/target/classes/br/com/templates_java/ComposeTemplate.class b/templates/target/classes/br/com/templates_java/ComposeTemplate.class deleted file mode 100644 index d4bf719c258d68d3512aeed3633e603192929da6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1113 zcma)5T~8B16g^W43+?hDUn+heAW}Y81@)nX#1KW20wyJx_+qAYQUZe}ryTXvaq zkjtPO^9~jqEDH3j>p+_gfv(*Afk1jQe5nKm3p!A{jcQ3n`?BN{87_on=^w~QTfYUS z&7rOf%oR$JR}QP5QPr9+jjF#mlCPz=8CGjyUG2BfJgY^G;Gype%;pMlh%bYRS2U3h zD)}bTFxvMDx^D88PhUj^Dv~CQ1g4TQZHz@D9>Mt)8~k>JZz- zJ=|v_&((SgecFk=(vd0~j#LcA{oXc7lSg7uhu-#HTP1;k(@;Aa0=>F@V>~ziS7VY) zRNgt1^<8z$XwLR?&UO$xqe*-`drdNSayXi;NupdsNf4P>0rQxG!{5n%DX?Y8aLv;5 zxC`#x3!fl9#K$hzo*3*!KW(=efB_8B>%$N(pew%omM3XqGm9rk3G6JLpiAH##%QDk zzM^|~`6GIsz5o5)rcN^zFdSdWVuIcz3rsVyEpvlOC-`pB|EOm)? klZ-_!6PX~AMd~LU2UmX3y-Fa>gKM}>E5!nWiLEvD2aeVj_y7O^ diff --git a/templates/target/classes/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGenerator.class b/templates/target/classes/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGenerator.class deleted file mode 100644 index 4e1893fa710f5cb5e661788ae97f175de81f704f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1066 zcmbVL+iuf95Ivi?b>f;Pq$C9bwB^#~qSg}dfK6yoHH})Z{NRs1@IV62YKAgBZq1Zw;bHYog7wpUv=nk z&Bk3D_XLW46{tv>Fgh3-9R{&Lt=)~hUO4b(SL8*?d;Uk{w!r*T9cc4RAX}@S2v|Ge zOC?Zf>p<;~23-{$%dSr+rFPhp{)vn<`{|)&PBqcBrgTOPhQ2f^?wrXtk~o7`y6>G0 z;*NY9cjDKv*9uJZ?l9DW*;8>W`)VeMv@|cRo24#9qae*DeZ^Y6Jt5Vhx2t_ca8B#I zr;?V~xKI93IEs3TZv|HVtz?UFT)4R6!oh;TLvL2tw5I97rs9HzT+pVkW5W&JGUvv| z0~hPq5UBh`l;YR0;i8U)z)m`?Dd_*Sk1D!g<^oI82E90#wMJn5g1p(QD#XehrxQMu z=2W0uOM33hpzj@-NC*9G9*s?r`*J{S&ZRGq%qN$h?(dVt8a?+s{SyKi9tc@kvS~iF zE|T|%c0v1G<1@quGBPO8>d+1fvM8uXmYW3ODoW%rz!I$tuuG8~>o7p0`3aeyD2qe} z%C{&lPnnEVNupCEW@1?^;u^|y$C!Jxv#4t0BQmAz7}ms?8)Lq~))@ACx=y4fBxNF~ X5XJH@a;qsxg<>rNT&C~(B=5!#X#WcF diff --git a/templates/target/classes/br/com/templates_java/config/jms_aws_sqs/MessageListenerGenerator.class b/templates/target/classes/br/com/templates_java/config/jms_aws_sqs/MessageListenerGenerator.class deleted file mode 100644 index 8e8a1478d5c6621e99743fb6ffedbaed04857292..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1055 zcmb7DT~8B16g|@}Y`d(q7FyJbh$!?Uun+oRf-x~fj7b3#2(Qhw4$F}Jz@4e`voz6~ z_}~xlM;Y&QcdL>Z@L}iPJ9FQd%5!|XE|N&TFm*lHg$SUd4s z!BFYRNbHZofk=+{AfTOEFCOyXm?zT2*`}pWCDHBVbXtVx0oOwH&-i;zoY9H&y|YmD z`3Kck@07PEl;XbVNu`aJsUT9)y|!v2bS@c1Sv9Gvw%WZ3rHs8@83=-NUS14E+7KHL zDL#xx$xxV6hUI_h*fJ>18&9>^58aLfd%cVjUX{i-u_<$(ht%Ct_Uy=gdi|mPJwU9|8!yw3z)&!gAg@S14TjcviXM|?WM?{G z!9I~wK!sL^EGWsMq$+uCnuMFEQDguXXf*)4lxcDu1JLPyLE$&bJduIwEvhS1r9o<> z*%^{yGO~<_MbzocVD6DMqMDu0DAbB$SQBSvjMsS`niD3<<^+ssHB Plxq>-5`DKOb+>;3w_^qu diff --git a/templates/target/classes/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGenerator.class b/templates/target/classes/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGenerator.class deleted file mode 100644 index 9d7bc41f049a32d36fa389f56d607c15d593f746..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 990 zcmb7DSx*yD6#njXWZGe*wF@qYfD5$Kz`Xcif-x~fj7eD%2(Qg;xeh~SsdsLbpQVY` z#0P(XKZO(Zd3n%=X2=gT=~{#^e04d5mECTe(CLluvzSTgY#%T+u{2xgQo`_@aijp`no|n@wx2a#F+Z&`HUgYe0zMus2-NjgBqcHG{?4xKZ z$0CU`EdL96D?zbf;kgA9^9+tt(kvJjj?GCCY%sL1^~j;S*s#!p z&G0r~Pl5OUb6{AxVZ{usVlE#J%84*ky2<|5Z>TO$sU8b;oUiMUt22g9HygOmL)SS{ z(hJ?~1k#|)eIC$^tNGcH`s(&q_4gXFMmJug4}n2T_CcCPx`n&+E|9fLwnoyle}dWl zAJD#~Idys$P)T1Mb;4-S4_M5yaSu(hs4hiigw{fvVhQFRNk($X{tm5KnL$sLJ2TAL li8h1rmBJdq7EM~zpiPjSw276K=S@14rITlo{`b?m2Uiui1Bd_s diff --git a/templates/target/classes/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGenerator.class b/templates/target/classes/br/com/templates_java/config/jms_aws_sqs/SQSDependencyGenerator.class deleted file mode 100644 index a8a495cafdd5e80fb2a6ed1c4e5a8cad99a71c03..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2083 zcmcgtZF3V<6n<_}yXj`3O=zovN_nxgO`8=2MH7RSrcg;=AWR)Ub#9Z}blYS%?rwno z1Hb!6)X_5Pj6Z-M<@nr9vWYD-Fb+dD$=>t+oOACv_r*Vd{te(J9-GJ@H--r;rm$on zZ(;1Qh?KAFdnYst0;5I8b;6QB?zN5Pw*^M-dUYi*UU6Kt(P`}}|FPU{ zl9R1?HQC&jzN6_Lb0pk%2y3|yD^#s^Q-&(oIgn2zvAKIr!#-#QJMw9;6Z{a^)rZv; z)mCm@xwWGhHu0wYj@zRdZDMY|61i|Zd(~+wDwy@yPNRvWP3bo5YUn#|gBqzrb+j#; zod|yJ?#3ASng#bdVY?FwT$?*> zaGIlwoo>r;e@oU5WrLVgdrZ`oEiTQf*YRsgXD)EzFZ%!coE+H3Wa=Qr{}Ti0vPXQZc|f0(Z|y-vMo_f-Z)(hr?ISqo{`wONW(m$;Wp zEfoZ^K|e)%NNr&IMEL>FZ0Sb+I-f`7N_n|jF4}!|7pi>{>stUHgv6_Sox~f1UK}Li zsDM3}8JxcRGT7${WJ{gUGVqOsyI3($wy=tO0!G_w<)5{h7Vcxs!nb%}pkiSi8v>Kd z_4-U)E=HMg+!+I#7Pj!vz#|J)tO?xd&4>TnhyoX1F<}JGMai)-*EZu85J=AH6Mbfo zc$9Q9>WJIJ9kIE4plV@Zs3UruUdKm0-D3&Nz5-4>8q%}je8dnohCAtIZDBymuM4S);Q{Bv2zb*D*$mmM8I8TNR zqKU?l!U0;7w3&Sw-k}P{BQV~ZA>aC7=}1i%mw4l3cuff;^vvKY$@L_r_&-f*mHY(X z=E8G`h1~B*{6Z>$clm#oy1+PZvk8pR%X_4zyV`gk=Sk5n@+#=<0zRNj`}~P^+S1M@ zD}Q0+`{#IPeK9+l`vXQ2-!1%x#Nshh`kfs+W@NoOM*3%(B%{FRG0OEMsY^)XGQnQK zhq#JaJ{rVK*L@E}5{s06LT% n5!c!1J3gp_8D*T)*ZWZLOk9Bsu0_G=1an*^=z5+m6Il2cr{^k` diff --git a/templates/target/classes/br/com/templates_java/config/jms_aws_sqs/SQSPropertiesGenerator.class b/templates/target/classes/br/com/templates_java/config/jms_aws_sqs/SQSPropertiesGenerator.class deleted file mode 100644 index 41fc20d25ee310a83f346d8efe0200ee3a7e2f2e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1527 zcmbVM?NZY~6g^uiDIrKHf+7mV4=9DE;uk1XL`ED(1e`kjWtMbX0%;Pm8-=%0M{&j< zK7bG9c#~qu2#$=IHoN!kz4x5Edp19Qe)|sKK9+U#;6@h=+|1yXj@uZ|U?Lg|Iyoo1 zP{dRQ(>h8pb(C>O!;FTz4B3WoMZlF8tozFLT***a-44o@*DSY}$O=UH#UGLL44n(M zYpW*=Q|C^a++;{Edo{t(yK1{)Eo^R!;4R;F$dg<3EbeUbz>e%=XIkypL~H3cEhU=1 z!k%C=ZiquLbhoW-|irEk8MKB7A9BY61G=f zu^mAH`tt)zv^GM+J!;Skl^-gGi9##X;clZ`Re|j`=1+T~=DK~Zb~d=R#~X1+F+wtp zAyX$bmp5r$uX=>IK~m+NhTFmx26^B(_4cKcrSNTE(-$uMw+ zq@scv#jVBS=;5_mGGp%ix9m@0XA?3!l(bhwpR`RZ+L0S1YDLl(yh%49nGnmJE(2XP zIyY+hEasw+s*fT@V%B*onZnpF=Sr5= diff --git a/templates/target/classes/br/com/templates_java/config/openj9/OpenJ9DockerfileGenerator.class b/templates/target/classes/br/com/templates_java/config/openj9/OpenJ9DockerfileGenerator.class deleted file mode 100644 index c8eee6803ef3e5ab484a60ea613e54e6ce6d4f14..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 974 zcmb7CT~E_c7=BJy=~fDx8^aG2L=?I%QZKxa;KzlE(M)Cn;g+10!#LQr%h{RXXKA7{ z@xmYAk21dP+8Rj=c+vBIKkw7`eSiM?{sX`xv~5&yqk=MSma$~x7H*fZoX8cMoOdj& zTDZ$l>x)Pzu4C05Y8gi(2Dj5weh?4*B1D!F{_As@+YB>LWF+-7hW4e4S_cf~i}*+| zR68;fyW>GmsD0iG$y4vd0S^zjl8K!;O?@JX*7KZ}7K35PwHO_q@{gRjMaQ!5$3qdF zZuwmjZ?|5?!3Uv^Whe^L#CBGVqs*pWHMiAC0c7m&P$nhVug(H79fO56viIV#3PciR zSpFyUW&-2D!952yW*Hv(1;=yrjtXKA@{~<|rY+oeu#OFC`G>j#7aI;*@ED$EE6I!g z@820#E?6l;BcH{aZZQRhlAG*n{etS^bgCnv_p|l9=lX=9=}w0n@~H3cX(glnb^>Wp z<}M%5T+7*+k^1=ZSM>Mluu3;wp~Gh|k`<6{T0UNG^a}M zJWBM=!6dDMDr#gcPP1_pb+V`~MP-E6zyie*%y%Ri$tCX#jCyGTGgYokFykfK1lA`C g8w8m*X;6a&f^4QuoN0O1q)AyOc^2urmeyVW4PL?f4FCWD diff --git a/templates/target/classes/br/com/templates_java/config/openj9/OpenJ9MavenPluginGenerator.class b/templates/target/classes/br/com/templates_java/config/openj9/OpenJ9MavenPluginGenerator.class deleted file mode 100644 index e6782141dc8e4a181c0752168e7b570cdf676554..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3791 zcmds4druoj5TCOt24fy^O8QJg2&KGy+mO(PaybR1CLy%}0ix<((Q;nf2lvw6nS!c* zihhw+YKhuP?f?ByRcH4e*w~zDRYhto`EFy}o1OjR&tHB6fQRrn52J8z7z!{m z1Rv&LHV*@EZwNjbfjOAZ!vZW0!IF5F@+hR{faKs~1tuEIVVnjo-}VC2b$kWpDuYpCKc3VPKqSYaPJ`?P+;keq9Xe)b2h?gw=#t+GOp8>hhs;}@ z(9gUW{z_;n7S*~fchBf(Fke13Shy!SxR3On+u{ZjNENtqwV$d$R)7guF2ER!E5pC% zwa_hJ&rh}eqS?+#!PgqxZF!qD-Q^9Hdemq#)fN#|BRd+2B{~dBUCINqPK^N7rB2Cj z(i$s;ni^?ick7-o?qd$>%j!e*fktAoTd>A(n`_K5Om@ks*gq{1IqP;X5sKXqj{2V1 z<~pY~``YEl>Y?ifDUK#K+B^zPl!Rs}bpASSCzfJ=m(}~~in?2_l-KvlDPa(b8cB1s zjoUL)8arhMW+s03y`yv?(3>wIcundv9rNUvHkd|2vTM^4HybXsu2`-^Mwgj`TY&N@ zt4n^0JuNH{Ei7^(x30t`T?sgK{JP6+%*1rj%i^haW52}P#OlRt<^&SYk5S@`jp)_#{(5P1YlDQTsy3-pv(Q(KBqDts(MVgA`UB9~ zr2E>A1Jx@?y*|*WF70qE|5$jKUu7JNeq%R^+P@hqQPo_IYy202)vIj3mW=Z8w6N*_ zCPsUVpO^;odnFWkjmdwV{j5^QtTR98g|$CaStx93I!`U?`})i`V*Jt&#J3u`VD$Zl z|3-c25KSq#TGZvG7IBRvr&+hRZOk6)T<46?49>9Y{5)h}oC*vlOjBc51iyWGvc%0i==TcMk~hc_?iHhLy;})`xKaL2NX5_LSl^8 zYHgPaiTrv1)-GK#;4WUjM)A(3Kt}ZEILhF70&d{5h|~ts8GPp#UV*Z(_!DG)kTN&% zIR;sLj^ovC0)|oJO{8vx(lCi5@ykoA3R-&$-bS9V`5o#BO;XHOeuaUrUcnpHrQ+b? z&ydT)mkU2aX6YP;#Jf0rjw_4NIgEUdDp?Q - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.MessageListenerGeneratorTest.xml b/templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.MessageListenerGeneratorTest.xml deleted file mode 100644 index 8182117..0000000 --- a/templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.MessageListenerGeneratorTest.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.ProducerMessageGeneratorTest.xml b/templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.ProducerMessageGeneratorTest.xml deleted file mode 100644 index d4ae638..0000000 --- a/templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.ProducerMessageGeneratorTest.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.SQSDependencyGeneratorTest.xml b/templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.SQSDependencyGeneratorTest.xml deleted file mode 100644 index 63073d6..0000000 --- a/templates/target/surefire-reports/TEST-br.com.templates_java.config.jms_aws_sqs.SQSDependencyGeneratorTest.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.EntryPointMessageGeneratorTest.txt b/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.EntryPointMessageGeneratorTest.txt deleted file mode 100644 index 187debe..0000000 --- a/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.EntryPointMessageGeneratorTest.txt +++ /dev/null @@ -1,4 +0,0 @@ -------------------------------------------------------------------------------- -Test set: br.com.templates_java.config.jms_aws_sqs.EntryPointMessageGeneratorTest -------------------------------------------------------------------------------- -Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.881 sec diff --git a/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.MessageListenerGeneratorTest.txt b/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.MessageListenerGeneratorTest.txt deleted file mode 100644 index 9582045..0000000 --- a/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.MessageListenerGeneratorTest.txt +++ /dev/null @@ -1,4 +0,0 @@ -------------------------------------------------------------------------------- -Test set: br.com.templates_java.config.jms_aws_sqs.MessageListenerGeneratorTest -------------------------------------------------------------------------------- -Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.037 sec diff --git a/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.ProducerMessageGeneratorTest.txt b/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.ProducerMessageGeneratorTest.txt deleted file mode 100644 index 9d9eef2..0000000 --- a/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.ProducerMessageGeneratorTest.txt +++ /dev/null @@ -1,4 +0,0 @@ -------------------------------------------------------------------------------- -Test set: br.com.templates_java.config.jms_aws_sqs.ProducerMessageGeneratorTest -------------------------------------------------------------------------------- -Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.042 sec diff --git a/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.SQSDependencyGeneratorTest.txt b/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.SQSDependencyGeneratorTest.txt deleted file mode 100644 index a31d5cb..0000000 --- a/templates/target/surefire-reports/br.com.templates_java.config.jms_aws_sqs.SQSDependencyGeneratorTest.txt +++ /dev/null @@ -1,4 +0,0 @@ -------------------------------------------------------------------------------- -Test set: br.com.templates_java.config.jms_aws_sqs.SQSDependencyGeneratorTest -------------------------------------------------------------------------------- -Tests run: 2, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.015 sec diff --git a/templates/target/test-classes/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGeneratorTest.class b/templates/target/test-classes/br/com/templates_java/config/jms_aws_sqs/EntryPointMessageGeneratorTest.class deleted file mode 100644 index 729ec59fcb122e4c5533bb8bdd917cd04b0484bb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2865 zcmb_eX;;)%7=FSGWC#&(a2sul3o46{x>OL{5O5tt5wY5ZW@aukflM+c8G%}VRL`lS zr<~Jo{nDS)AJEh1CYi;8T6_8>%bRz3-s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m zagnS|@`r1R_5`n8m}agdE;CXx7Z|Mx~;;n;L1=~1%- zb$mFT%B6ChuW-E8`2_z9L9#PM-Oo-2*vk<67$Npa_Ao`{S22Uz#C4x5$-vDBRg;0+ oO$IJD893Qw;8@JSRp!4+7CV_MgITUpZLG-1x3O}KbvrQkHwu2`_y7O^ diff --git a/templates/target/test-classes/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGeneratorTest.class b/templates/target/test-classes/br/com/templates_java/config/jms_aws_sqs/ProducerMessageGeneratorTest.class deleted file mode 100644 index a3d852b63eb8160052e71fc12ec92c8a138136ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2850 zcmbtWYgZFj6x~BY5{3~ls5MfnC{-T9RB9_C)gs_Ch$3RO4?0OM$v`p_=OIw*kLp@A zy2@Jp)-U}z{Q+IwcV;q)g=%fT%-lJ19{cQj?wH1aCCF|T3~cjam+je9D3F`vQx43_2cfwZrr@leHKtjfzH z>Hd|9$9SURYkZTzw=(5-(z2Gu_h}dkvQ^tCt%zE^YItHrxSntnoX-~=y=d2TFM8pw zZ5YoCy&|f0;pq82A(s{ON?+SCoSo}-wIs6)=542}Z}^t!>5g9&t}g4exiBiX>|35$ z6RW0c7OG;_vTV=rOxto5^tHt=GoJ1T;v)A9ucDwQAK)@={kj=Aq-IQ(yP_a5JhG}F zIcJvyvE@xm-1Tb(;j9=e!?yEw(WtH(jwzobW74abtb5}hx-Z(+y2*xW?wYaXuDMTL z{hni&{GxCch3gt+aYI^|=+> zua@Q* z4o7Pt?7YcsC-OLlg1KgyzfHhl`$Gnoh37lgoNciwkDE`-auu3INzxxoO?!=&+roBT6g}ytKCpeK7;VMi z+qQZ_=F>2Y5d|mSG4vWv;WQ`L}n{Yq~Q$CD$w8a@M$=SK?P@`uy+hb8bZT5 z${H##6&wtxXdetVKJ>h96gN50F9@{YOi&6Y#I`|^VC)7qHB?bkFuOm{_m~mMnWe!- zUBgp2X}B6Z_-Q=Tu!U^}7g`d;I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J_Ag0OQPOb}%L<~2qFp$!Qpl@V(XonK zI$pu6I$p!;3VLe0lF9c=vO;#KYW9YXH}RH=w{^UOcU8Qn<9#ga_yDgeIK8oqhb{ma z&kuEcgpYN6f=^X^rsH#bq2fy&U*T&7eg906!F4?;Psca7r9j!O06MvgW-;}6R1SPNgcu9YT}!u7Wwi*Y01AQnL=Qv?ZO5q`5T zdNxDM)Kol%L0`9$D^&UlqSa1CneZ?QMg||c7s`X6)hStFla!sc;<@hN5G$tZF%CR9 zt}ECc99wgaQ4q_vbAv~h>m?1B#u~#V953UP_z~&9F5&&wVib++g5aJk6nK6mLhLEe z%*(@!jXfu8A!AqaT8UkS#D?{t*PqXfh$DDXXX$ygKJv*0!%2&!5|1HqG6=t45o^Xb z#E-D?7MP+y)YwwVkZk+v!NcBM2OEwIOk)r4G5dJgY2>Aby^e1@q%go|obS#2ALM_7 zY@hs(@SCle&nNgbOe=1Dbj0sKiQhxRwL56MjmR&)#X&yhRSD>%-8LNJn;xvkVP3AJ zrzeTk=wn?BvAW{%UlEBlmC<|~DnX+JZMhAt2HM7@z%Fb;H@0JU9dK6&{1oRU)uUAr z$9#9ktL}a#MucM{_s~iQdTNkv)iO54+RA7zqhl~$#v`#<8J%TpE@Mj>Tkm1pwZS{s zerbOhU6+T-c=RrI)M)L3O2ECmuio~aEup#s*FF0*UYiZdKprIWWS#DUF*;ebz7 uVJcME!`VP#A8i7KLqs@>BsCnvPK@%c$yZ%VovfcTL>=Q#!8tw~aQ<(a>k?Q1 diff --git a/templates/target/test-classes/br/com/templates_java/config/openj9/OpenJ9DockerfileGeneratorTest.class b/templates/target/test-classes/br/com/templates_java/config/openj9/OpenJ9DockerfileGeneratorTest.class deleted file mode 100644 index 932a221a5aca18c60e4fb0deac97e1da9bde9cdd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2408 zcmbtV>sA|86#fnbCJe)+P?Vsyf)+x!OiPOjZK*UsZ5u8^K&h8HNe;=-WG0?DvGf6a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UVB*sPk0oNCP-z-|VBm*%kp*W~yz{+wSnK@MFX$lWr4dI zHGIMfmRZN_29G{hwrqF4=vYDUyud>X{t&y?kX*Ic&*adgEPLaXiend}mZITx18?9> z18?DNfzgeDxzkct33|uCyZEhv-{JQf{$Sueyf5(Nrg}fQ_B8y_z@PAEfuUPbOPWtJ zcuac`D&P(L1uqGRM+9Kt1AJ)UuL{49@Hc@Yn|gIeJ&hNzaRH_mR#@)>J0cPr@X6_V zpA)!0qPj9P&&`~iU2{Wgwdr)LE3c$OqNn%PTh$kn8eQE;jl`X?qa?%eg}`&Fp^WFi z-Mxv-`penmZ`@l1+L&LK0}K52hSw|E&OSa#h;28jB7u80lH{<-(ya+qibQ3dKM_&2 zlm>hWUpqx+WDxZR-ja;l`0{6qS>D~;myrCp)@0(kObOk;#7SCU zV%hR%<)td;v24b89eqRn84k@d&BQ?+y;QZ7w|knE-*&F{70}Js>JXo_EquDN@$(;_ zf7s9U0ROk~dywBPYL@Vu;huAe>mlw&DaBrc&i-o<{Wq}X{57;(MdqVOVwkIX5Cc0Y zcOORh&xrYP7@y;gJ(#*$B3-8vU0wbC|3D_!T0`4aXjGb|(ydpaHNaeoV*9vH0Qfg5=6{J=Flbb4| z7AO?@i36~QZ}DC_+=l^D4sadCASQ@@p198t^$WyZp>!~IEeR%zS#nJ>oCB0Uietny zj}9Ei3F@E0R-9yRGI)xT3g4LP6uA@(ZTyarKh5S8X#%HHAViLm8fos$Kqw4U{F{W` zqr%>;!hTeReI1_~ZY7L*?y(y747YW)<$7~{H4w>xuGYr?>lkccv!6bLHI=1DJ6H)_ zM68=A3^MwCL}-{%jA5M79$~DLC=&sN(TUjWIz~$gM%|c7Fd8O~$1zQe#)xr@(Q#(s j49*hY89cz>S>lu87E7kMHOfcTutIH?KY=-}TX61wf6mO& diff --git a/templates/target/test-classes/br/com/templates_java/helper/LoadTemplateTester.class b/templates/target/test-classes/br/com/templates_java/helper/LoadTemplateTester.class deleted file mode 100644 index 091a38ec77d5e0bea1f6b3167ece7b52f004e260..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 899 zcmb7C%Wl&^6g`tTvE#ZA5=wa$D36k)Efx|Bq#z_zQ3=Vkh^F15u{(;V@=Nvv@ma7b zhy@?OM-!G?&#-I5#7!M;*|?2O3wLbX#XS>SChjw| zU&utNmkiDR;FQ7GPtOFyswWe1IE{UgkGUTa()H4SN2ffOdOiaU70QC)spsczkjAbO zaTakUiVx@fBX>g)Wg>UIl%I`fD`Qb8k&hUhXaQx|?t3LA;>pB4R=G?jqd^@a-aN-U zu0mZ_jmFTB3B!7|B2)KGl1&w93LaD9jtWJUfWdzKDG-^GX;PSYK=b2tng`-Q>W(++ zbwAO`99ZZ$c!)7 zCrU Date: Sun, 14 Jul 2019 22:58:59 -0300 Subject: [PATCH 03/10] Adding generator model --- .../br/com/templates/ComposeTemplate.class | Bin 0 -> 1103 bytes .../EntryPointMessageGenerator.class | Bin 0 -> 1056 bytes .../MessageListenerGenerator.class | Bin 0 -> 1045 bytes .../ProducerMessageGenerator.class | Bin 0 -> 980 bytes .../jms_aws_sqs/SQSDependencyGenerator.class | Bin 0 -> 2073 bytes .../jms_aws_sqs/SQSPropertiesGenerator.class | Bin 0 -> 1517 bytes .../openj9/OpenJ9DockerfileGenerator.class | Bin 0 -> 964 bytes .../openj9/OpenJ9MavenPluginGenerator.class | Bin 0 -> 3781 bytes .../templates/entity/EntityGenerator.class | Bin 0 -> 2522 bytes .../templates/entity/EntityValidator.class | Bin 0 -> 388 bytes .../config/openj9/dockerfile-template.txt | 10 +++ .../config/template-entrypoint-listener.txt | 18 +++++ .../config/template-message-listener.txt | 5 ++ .../config/template-producer-message.txt | 39 +++++++++++ .../EntryPointMessageGeneratorTest.class | Bin 0 -> 2835 bytes .../MessageListenerGeneratorTest.class | Bin 0 -> 2820 bytes .../ProducerMessageGeneratorTest.class | Bin 0 -> 2820 bytes .../SQSDependencyGeneratorTest.class | Bin 0 -> 2945 bytes .../OpenJ9DockerfileGeneratorTest.class | Bin 0 -> 2378 bytes .../OpenJ9MavenPluginGeneratorTest.class | Bin 0 -> 3553 bytes .../entity/EntityGeneratorTest.class | Bin 0 -> 3585 bytes .../templates/helper/LoadTemplateTester.class | Bin 0 -> 889 bytes .../config/fake-application.properties | 1 + .../openj9/dockerfile-template-test.txt | 10 +++ .../config/openj9/template-pom-test.xml | 66 ++++++++++++++++++ .../template-entrypoint-listener-test.txt | 18 +++++ .../config/template-message-listener-test.txt | 5 ++ .../templates/config/template-pom-test.xml | 16 +++++ .../templates/config/template-pom.xml | 11 +++ .../config/template-producer-message-test.txt | 39 +++++++++++ .../com/templates/entity/EntityGenerator.java | 33 ++++++--- .../templates/entity/EntityGeneratorTest.java | 39 +++++++++-- 32 files changed, 297 insertions(+), 13 deletions(-) create mode 100644 templates-java/target/classes/br/com/templates/ComposeTemplate.class create mode 100644 templates-java/target/classes/br/com/templates/config/jms_aws_sqs/EntryPointMessageGenerator.class create mode 100644 templates-java/target/classes/br/com/templates/config/jms_aws_sqs/MessageListenerGenerator.class create mode 100644 templates-java/target/classes/br/com/templates/config/jms_aws_sqs/ProducerMessageGenerator.class create mode 100644 templates-java/target/classes/br/com/templates/config/jms_aws_sqs/SQSDependencyGenerator.class create mode 100644 templates-java/target/classes/br/com/templates/config/jms_aws_sqs/SQSPropertiesGenerator.class create mode 100644 templates-java/target/classes/br/com/templates/config/openj9/OpenJ9DockerfileGenerator.class create mode 100644 templates-java/target/classes/br/com/templates/config/openj9/OpenJ9MavenPluginGenerator.class create mode 100644 templates-java/target/classes/br/com/templates/entity/EntityGenerator.class create mode 100644 templates-java/target/classes/br/com/templates/entity/EntityValidator.class create mode 100644 templates-java/target/classes/templates/config/openj9/dockerfile-template.txt create mode 100644 templates-java/target/classes/templates/config/template-entrypoint-listener.txt create mode 100644 templates-java/target/classes/templates/config/template-message-listener.txt create mode 100644 templates-java/target/classes/templates/config/template-producer-message.txt create mode 100644 templates-java/target/test-classes/br/com/templates/config/jms_aws_sqs/EntryPointMessageGeneratorTest.class create mode 100644 templates-java/target/test-classes/br/com/templates/config/jms_aws_sqs/MessageListenerGeneratorTest.class create mode 100644 templates-java/target/test-classes/br/com/templates/config/jms_aws_sqs/ProducerMessageGeneratorTest.class create mode 100644 templates-java/target/test-classes/br/com/templates/config/jms_aws_sqs/SQSDependencyGeneratorTest.class create mode 100644 templates-java/target/test-classes/br/com/templates/config/openj9/OpenJ9DockerfileGeneratorTest.class create mode 100644 templates-java/target/test-classes/br/com/templates/config/openj9/OpenJ9MavenPluginGeneratorTest.class create mode 100644 templates-java/target/test-classes/br/com/templates/entity/EntityGeneratorTest.class create mode 100644 templates-java/target/test-classes/br/com/templates/helper/LoadTemplateTester.class create mode 100644 templates-java/target/test-classes/templates/config/fake-application.properties create mode 100644 templates-java/target/test-classes/templates/config/openj9/dockerfile-template-test.txt create mode 100644 templates-java/target/test-classes/templates/config/openj9/template-pom-test.xml create mode 100644 templates-java/target/test-classes/templates/config/template-entrypoint-listener-test.txt create mode 100644 templates-java/target/test-classes/templates/config/template-message-listener-test.txt create mode 100644 templates-java/target/test-classes/templates/config/template-pom-test.xml create mode 100644 templates-java/target/test-classes/templates/config/template-pom.xml create mode 100644 templates-java/target/test-classes/templates/config/template-producer-message-test.txt diff --git a/templates-java/target/classes/br/com/templates/ComposeTemplate.class b/templates-java/target/classes/br/com/templates/ComposeTemplate.class new file mode 100644 index 0000000000000000000000000000000000000000..1a4c27ecf3b104753714659a878cabb181a5863c GIT binary patch literal 1103 zcma)5TTc@~6#k|Z7TV<^Hx(~X5G~hLL47D8F~kc=0h1C;e4Exu8QktR+o{2S;j6#E zXJ0h<*Kp?#pzElFkMIET!X05EEeOdO2j26R+^bcgDt=|UI z=1?~TW{c&>tAsVrs9N2ZMm4;xuvQNnYQGH>NE9`LhrTZ`pD!NC*V6N4Q1wbC(m}P* zLYhYVUQstp!AcpZsz623gpoilVd!AwibT-?E37i(A-m~OYTQ?0IIySRt@ z0yAfIoi#pf!e04ERSX9yhT>Llo20*EF{ndtd#_UX^}-=og&mAa=%+_;~DEV(idxD%(TEN{u8zRAOsaKn@OnBKxJlZXv@pOV8sj zxc4r8g7^?0yIlKXupfi8-BtjGFidX%Be;N``0`txq>0TfoggK!vwVUcfp?gokrw!h z-rbdt=zISD_jj8*%~Zf>d?kx1debDBWnxP+!=zLEqen4Di%Bt#3GUXK#6?nFqTLc> hk;_D;h-8ua3CF>eA9Sx0Nb}$tuG319fbET~+#kDM66^o~ literal 0 HcmV?d00001 diff --git a/templates-java/target/classes/br/com/templates/config/jms_aws_sqs/EntryPointMessageGenerator.class b/templates-java/target/classes/br/com/templates/config/jms_aws_sqs/EntryPointMessageGenerator.class new file mode 100644 index 0000000000000000000000000000000000000000..19099132b6a7c0c2cbbe75bde0bc8d9bb450c3f0 GIT binary patch literal 1056 zcmb7D+iuf95Ivi?b>f;Pq$C9bwB^z|iCRm*15#0igj$4@UZhritu|pvw{q-YZ=n1Y zNDw3*_y9f%F;hF?QlXXy@67DZoO5<&{r$(+ZvY;n<)Db0MHEmk;Fg2ixKqFa+eL>q zmu%d%aZjM!Q=y8biQ?UX(NUNPcPIie_5{)@jd*9E4Z>QI{vfxOo^6tJF0 zuarQktwXgl>~~arAUgr=RN7Hj28S}%9A}%BIo3q?Y)ofVe-KEc5~2%V>z;qoPmbif zja9`L8t{cy1DzP|?V33?HXgWG z#)?4g98revVZ}uQO@WPUP-D>l>>OR@f=LU^jeGNQchVJsf|hbCAt-Pnu(a zs+YDqkYUf?H?apT^kGIwO3I$X%!9l1{~KiEHqh$VXDMfwv2ay$$2^5oNKXq~0# z5m`ZYs`&-tBRM&gXm!Yfk}OIpljo*MxQYrz3@}G418h+y=Q<3~Y<))V7s@P=f$A-) zD^evR)za(?iJ4dyi@1g=oiXM%Sr%1qenPI2AHh0vrbd`nS1B^kFVbVJVDPv6?dwrpk2XT2aC8@!IH7d4jr!8 zxNqYDLp_kOOodL;{WGnSIAiGe{ge-qh)=F4N+o}BDRYxydP~JhZ!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ymzo|ufjW2!Fc+`do$!)pD7)w>EaUanG7!{frK6xTqU`l#ti>wNv)Hg;M-hy z0kKf{6^WlnCGa-?&r%ndl)NEH9@8Ucu+C^Rky)P$aUTKKqRq9=?8?6rp`r56SM=Ym~)w&E98ukbCtgj>8G21l{^hK^E0gMnF4X0 kjlPqEDwt8m1%0Ux1<%A4$lzKOoKBGEDnZxtbeX`y-{&VLiU0rr literal 0 HcmV?d00001 diff --git a/templates-java/target/classes/br/com/templates/config/jms_aws_sqs/SQSPropertiesGenerator.class b/templates-java/target/classes/br/com/templates/config/jms_aws_sqs/SQSPropertiesGenerator.class new file mode 100644 index 0000000000000000000000000000000000000000..348f89d3c5b7c37495bde96cb801f40093ebc01b GIT binary patch literal 1517 zcmbVM?NZY~6g^uiX+wavh>9o_zbJ(!euF|)bi{E)#Hr(7XGymum?j~+QF$wM6leV5 z1NcymHz}5k;J}z^vwQE}d(XMMXY=#d_a6Xm;*pL)T*$+~#T+i_xQr_~OvhtIC+AEa zRm|ovr=tc_hlQ&eu4%Z=P-qKJgk1UIi$FQPCmAZM8=+Jf&6N=I(1AIxi zxe}6Sc`c`HZFS@u{$9S3+tO;hY^;ZVAVTE`*<(yp2g1nPvk9nBnOWW9@3`go){5f_ z3eX>autj$dG~A%x{740nVwkRULtXB*t%eF6uf2HC6ZbU`aJ9M4?YF$0G?O5t(-?9s zLi2cs*7b%Tg|>*{8O9GMZpI}H6mZkP5QZ5(>$dAhO_TaH?NBs@ryTA|liRkC@|oDF ze@LExgh@e3>d>%IwCVg!skn0NdL(OtOI5p;Dnv{6Ta!o1ueS(Oq?fj(xgCi})Z*Ui zot;`@nJuT~Yq(|LHs%>l@gQ&=n*azX=pB=R1VLu9Kb>sao(3U4nE%qI9|kbj#?- zsO7_$AG`>ueM{A*27?&M^)N+Wq(S;@F=S#*)2xr?1r+IBB5Q^G85;HKH?ZpLS7bhs zmB9$ThbR`5ouyfxa!-nvYX^?;R#nVu`{Qs&n3}%mebN=FbugCBcc_Z$-W;CMRc*}cS*e4 zdld&Cg*ua=DEJc5c{PqQo7&XeR_B6$;=YXi1InZX`}JiYrW3HRLH1ERR)I*O469c{ z?<6n|9BewUG0*VCzlz>zLF{p!vZF7xg+~syuuU!hQg`5D+d&H+!)~^XylCd%W>~vs zkqnJ|3~#%|02oScvZbwSs*8iEj)XqWmhyq?bB3lnoo~pazJH{ZjQaZtq(zyBd_W^D zXU9eA?(Dbo@7AzRmt3K9XE2iKlV*_aV1eF6vJS{LNZQ_aFt7a$#+NjwO79{{^e(_8 zt%53QWGzp#aT9g2s4hiigx0_k#S+Z-BpJyS?<ARKI-TniRTK53} literal 0 HcmV?d00001 diff --git a/templates-java/target/classes/br/com/templates/config/openj9/OpenJ9MavenPluginGenerator.class b/templates-java/target/classes/br/com/templates/config/openj9/OpenJ9MavenPluginGenerator.class new file mode 100644 index 0000000000000000000000000000000000000000..b5f59351ae2b6f9e5b75744002b7143550e2291f GIT binary patch literal 3781 zcmds4druoj5TCOt24fy^O8QJg2&KGy+mO(P`f?IVOhRG<0z}ons^z@45ALPCGX+)s z6#XKt)DpFo+W-5Zs?P2`FxZ@lR7Gkm`EFy}o1OjppWpukfQRrn52J8z7z!{m z1fS+$HV*@EZwNjcfjOAZ!vZW0!IF5F@+hR{faKtF1tyxzVVnjo-|_;}b$kWpst24H zu1yjaQk;=zmn6#y3~Huh2D$=^*H)U}S76|YTW1Q4S51d)w(SGP_vnFzGsUWFP-~xZ zQ_#`mK+rM~Ryl?hFx#_ezKy|58@>{gd zN};AkI@sO1$Bg@!e)_WdP<^10nCup;Gu-Ana}1MRaw_&uOGHk)9ZZB`H-w|UC$_o4 zsm;D~`H_0yxIigLbk&x`#w8YJ(ORX!GyC9>>%)u={`IOZq zKgFIF7Kk?1H<4Rc;*zceoH~BP`Gv$7t=Bv5 z6B7CL0F*D?FW@d-x<>J)ra(rt<~YjWcmi(Vvxw9>(iwc`7hZv~u=p!vewH#f@i_)r ze2(LVZUTl;<6Wd~h0-vIBk{{is|s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_@Dw$51l4DZEz3A9<4of_C*v#~{Y}0laVgcP!e6ux((3-Grje?Lh&@5~ini}D zdVcps^1_cujD;qD!TtaqqFZcpsl7yAYD!6;;=S5|u^`EdX$Ltx8r2Tf#fRI)y>;=+ ztzzjpmAxbb{14KNV@z>?lnmh#8)c2aw@8wxJW~{qn>5|`Nfa$*;yft{_(Z4(cmIQa z8FPt5g6Z{uLQN;%t}a0W>&)5q0G-X_7f7Ky(K?Jt-ZUrdY7^Q GF8&9-2U&Fh literal 0 HcmV?d00001 diff --git a/templates-java/target/classes/br/com/templates/entity/EntityValidator.class b/templates-java/target/classes/br/com/templates/entity/EntityValidator.class new file mode 100644 index 0000000000000000000000000000000000000000..636d5bfd07d1297db06fc8f275f4b720f4efd34d GIT binary patch literal 388 zcma)2u};G<5PeQV0-;c-fPsw(3KCw}in^dOMGO>WcTy`D#dhU52tJDmiGdH`qY&p( z2?-YNq`Q01zV|GDe7?N{xWF(&4}%mtDRvo>OJ$UwFzlb?58_eqMwptoSwacz0edPrJ8-SbT7p^;e!?4ppy^@Hql>dZ4rvF{RK;+ BUTgpW literal 0 HcmV?d00001 diff --git a/templates-java/target/classes/templates/config/openj9/dockerfile-template.txt b/templates-java/target/classes/templates/config/openj9/dockerfile-template.txt new file mode 100644 index 0000000..a9a3202 --- /dev/null +++ b/templates-java/target/classes/templates/config/openj9/dockerfile-template.txt @@ -0,0 +1,10 @@ +FROM adoptopenjdk/openjdk8-openj9 + +RUN mkdir /opt/shareclasses +RUN mkdir /opt/app + +ADD ../target/*.jar /opt/app.jar + +EXPOSE 8080 + +CMD ["java", "-Xmx512m", "-XX:+IdleTuningGcOnIdle", "-Xtune:virtualized", "-Xscmx512m", "-Xscmaxaot100m", "-Xshareclasses:cacheDir=/opt/shareclasses", "-jar", "/opt/app.jar"] diff --git a/templates-java/target/classes/templates/config/template-entrypoint-listener.txt b/templates-java/target/classes/templates/config/template-entrypoint-listener.txt new file mode 100644 index 0000000..fa1ff45 --- /dev/null +++ b/templates-java/target/classes/templates/config/template-entrypoint-listener.txt @@ -0,0 +1,18 @@ +package ${package}; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.cloud.aws.messaging.listener.SqsMessageDeletionPolicy; +import org.springframework.cloud.aws.messaging.listener.annotation.SqsListener; + +public class EntryPointMessage implements MessageListener { + + private static final Logger log = LogManager.getLogger(EntryPointMessage.class); + + @Override + @SqsListener(value = "${cloud.aws.sqs.queue-name}", deletionPolicy = SqsMessageDeletionPolicy.ON_SUCCESS) + public void queueListener(String String) { + + } + +} diff --git a/templates-java/target/classes/templates/config/template-message-listener.txt b/templates-java/target/classes/templates/config/template-message-listener.txt new file mode 100644 index 0000000..a020d0b --- /dev/null +++ b/templates-java/target/classes/templates/config/template-message-listener.txt @@ -0,0 +1,5 @@ +package ${package}; + +public interface MessageListener { + void queueListener(String String); +} diff --git a/templates-java/target/classes/templates/config/template-producer-message.txt b/templates-java/target/classes/templates/config/template-producer-message.txt new file mode 100644 index 0000000..dda6b28 --- /dev/null +++ b/templates-java/target/classes/templates/config/template-producer-message.txt @@ -0,0 +1,39 @@ +package ${package}; + +import com.amazonaws.services.sqs.AmazonSQSAsync; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.cloud.aws.messaging.core.QueueMessagingTemplate; +import org.springframework.cloud.aws.messaging.core.SqsMessageHeaders; +import org.springframework.stereotype.Component; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +@Component +public class ProducerMessage { + + @Value("${cloud.aws.sqs.queue-name}") + private String queueName; + + private QueueMessagingTemplate queueMessagingTemplate; + + @Autowired + public ProducerMessage(AmazonSQSAsync amazonSqs) { + this.queueMessagingTemplate = new QueueMessagingTemplate(amazonSqs); + } + + public void sendMessage() { + this.queueMessagingTemplate.convertAndSend(queueName, "YOUR_MESSAGE_OBJECT", getHeader()); + } + + private Map getHeader() { + Map headers = new HashMap<>(); + headers.put(SqsMessageHeaders.SQS_GROUP_ID_HEADER, UUID.randomUUID().toString()); + headers.put(SqsMessageHeaders.SQS_DEDUPLICATION_ID_HEADER, UUID.randomUUID().toString()); + headers.put(SqsMessageHeaders.CONTENT_TYPE, "application/json"); + return headers; + } + +} diff --git a/templates-java/target/test-classes/br/com/templates/config/jms_aws_sqs/EntryPointMessageGeneratorTest.class b/templates-java/target/test-classes/br/com/templates/config/jms_aws_sqs/EntryPointMessageGeneratorTest.class new file mode 100644 index 0000000000000000000000000000000000000000..f39f77668e2017f6df3d1da8fd3ce01dac8305d6 GIT binary patch literal 2835 zcmbtWX;&0i5WUR|^f0u5gBzLz7gY96)Chv22)GWSh#1XcdS)Io4L#jsF9I?CsGJi= zPdF#v@+ChfKOiUfb@wcuAuh?6UaG5Z-MX({z5es>-+l*h0k6^+z=Dd!G}^Gxi7#*? zg`4u_mVCLb;!YZ==*wLd*)+Pakj4`3$){x%_tWUXLJAL3SdotprF~V!qcjd;OL z_ixg8f~RSGi|%jR4?@04{v{^02) zVO4~yXIs2y6!b_p$2HuY8;(_w04K7JThuoK+w^reu!N_}6iqIS>R$;V46n3gROoP2 z{A&RUuGJDX*8Y+Vqa=ybvZIwhF#Pj`mSjgXId?@Qmv-Wh}G_k z1Y8k*;M((!?Xx^CJXy=9$Sev{{jg)2b2Qu*w<{v=OSkkxCvfxeN}PKCT2Dws4MP}K zFz|tv*KiW2*tb4=WV|k}hCB)y&fu(qk&oYX8jj;^V9SSTx)ZQ=My-66HIH8`kfcn(*Er@=>{ z;)RASY%7>-nmI9YO{?*+Z7Xu$jaw!s6*nD)^!y2b+t;vzpESJ0&kC;pKaR4k*l3Mr zS+H@KTZ6DQ8?<@&}}&}oaU+T1%i)Y@aik*P7Lv>Hsb*?Wq@pUZiU75E|=Z3l+p zn0H&Xn^R?h+)O(hlL`**m5rk>Q3=R)s`+bFLi3)AEzOx?lY%a0x?3M2nHVT+7&$@Y zcpd%dfh4`V+`x_}l^k!i`Wl*ah;6PYCoqTiQw2w&qhsAQ%3{lLH+g(`{=DHaIBj^I zaQ#(R&bQ>yQwbk#J%jyQ67tw8^9-pS439Yanl+7`_Ku5KE;d~-doZ@wm&mFv<=DkhM z3*M7_=j`Eigm1HqQh4tjc>`r+7i~}8An_W>U&4q{Ughrv(8svL7~_)``C}Xtd{dwk zD-mMdjj{SiMt(&y(_Tf#Yp4WG5w!C)(hbmVx`MR#k@yjkZUFbkz+dvar2198h;w1O z^YwIp5Tl*8xm|QIftDR*TD6LORdny7ho;`8vCRHVri#ADqhnPZ*u}voqi=BN-gp&< zr<483DvrEGzoeCbtn~~!c^%{r&uLbC7RRX6AQKMr>p2peV$IiBv7~z;N*>cq;Sw!h zlkhR3T*M?*JI6n)DcTdfc4C@%Nz5=(Dj0cPrdMmBSLnl`SugZ2BB->j{P#lN;^=fc z^kK1B}GtYd~xS8$b_?y&v`mM&vU*LrR literal 0 HcmV?d00001 diff --git a/templates-java/target/test-classes/br/com/templates/config/jms_aws_sqs/MessageListenerGeneratorTest.class b/templates-java/target/test-classes/br/com/templates/config/jms_aws_sqs/MessageListenerGeneratorTest.class new file mode 100644 index 0000000000000000000000000000000000000000..e8a4c61c8235b8f5a9f6441c9e65b437b4a73b7f GIT binary patch literal 2820 zcmbtWYgZFj6x~At31I{bYK_z)N)^H*EwvSqq6qj5qKH`S!%mV*GBBBm^AM=@M|G_l zU1hC)>zDqV{(!FTJ2RQY73!n?a_8PN=dsVe=bn52{QI}x0i4H+6o#;rz;X&5Sn9?n zxR%6qxws)0Hxsy(LNfSsJAr%(Jy=R%1$X3ZHG#V+^kFH9dr7Rx>3u0*PvAicN3kJ? zhf@8U6dvJm3g6X&;MkiK@6{SKUu;J-7l;haEa&dKwr-X$wM*tDQ!O#_ETb4V?&_r7PeIws4AFi!}tM}A(=8&Sg5IZ3OfNug$pl% zXDW8EtKfV~rwRQwn3@dBb`ZFIO>n;Z%EDbJIF{kLBIspDMnju7E3}u5 zWQo{x)9;H4jvf?^y)IVsh<2v+Z;(RkQ3@rkkwTGz9!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Y zt^GXYMr-FZbUHXLK)L+P(`EVd2gDsPDH|B(VSkE$1Tmic+}d0bD9-Xa!gYf8PkHZ> zLcx2S&lDYAvwWIol*0Q!_7#-uKDr*iLhL2tzxom5yvqLxAkDaAnBYna{4t3sJ}JmC zSIp0KC(M<}W`9FG-Q7UqC6Y{DY=%;C5Wg>kzoo-<8(fC9INA_{_@%SqoyF1yy zN3-!vyn*Adk&&=skiDKm53gtWhckjfJ`Itv5udFrrs*+5pjQb{!o3g_580CCuX}z zkD4B8;N#guCXwlWjgzg;r}*awlAR*zL3T34UPjo*7_m>YhZ!Qjf;rqKuKQd`25ttZ rA_i_p3|x#DI2|!?B4pqS^Isv0-OQE30#}JPR%GPcSh>c!U0D1Vje*(7 literal 0 HcmV?d00001 diff --git a/templates-java/target/test-classes/br/com/templates/config/jms_aws_sqs/SQSDependencyGeneratorTest.class b/templates-java/target/test-classes/br/com/templates/config/jms_aws_sqs/SQSDependencyGeneratorTest.class new file mode 100644 index 0000000000000000000000000000000000000000..d5101c8a8bfcd3ddb2818d048b0fb06df21883f6 GIT binary patch literal 2945 zcmbVOX;&0S6uk`tJv1$l!HsA{iLwl0Cu*XiAt0aFFlOKP zefyZ7kaObbiRa`8@`T$F=^99&XySwl2fnN)E_Lo+UDxQeMLk{VK&mNPRF<@qRH&~OdcHN1$I zG`x&g$atDdG9TRd6^l>l$e%XZYcQXDo)F z&XXh|%Z zw@kxwjB{4Wpz(~wa6<~}d;4Y-L`I#AAh(2Ni_3-FtZ-8%!%%U;Nt@Xj)3xL{oQ(Jj z7UK?Y6rOhMIg46y-VJlvyWuT)M)GQMOyq@~5q5g@ys(99`i?7;N1hFy@TZwrZG0sy z@+CbgmP%nODLE_V99N2J^A?;!HZ$r9W?$;y)O;CmGVoT=TV_>RVsTtyR6>WA1l&n} zn{ZQbri@W7>6VodH!??ZDp=au(u9)R0~J%kFSz!oWBbDPnR(*Nw_sXiWC}_p%bNDQ zk@Q{5o+onIYWXc91D8=@i^_n4`{zSKx>Yq2mY)1)Wu#O*f&AUi5J% z`K;VPB`-QW_&N?_KtX)#=Rij{dK7er9{*7)6$Kr)u&f|z*6|wd z=y)A(DCnv=fnmAIJO?UnZ|ZmpZ>xAm$Gdn>#rrxwz_N}HaYw=61_fI#yUgN8IzGlH zIzGi`Dn8fo1-?}Am5#6Rje?$kXUCL!zEq~;TijNl>{kFC-{E^5KS+W<;wJ?||DT}T ze%z4NO*J{Y$UUT>z1$imCM%~rsOiyJW4eUvr`!Suk>2YPzSK+1yqR7QY`(c1uc`9gGwoYhd1tYS zXXIW;Ipw;Rb5|y@>3+~_Z(wG`6}*enj67DG`OyW_O^T%guN-kYNPlTZteM{wKf+F% zV~GM$<4XlovhAq_51VlfY&g?5g9H3hImFMIdVaRB!|{z568iXz^SzP({rs zm#{8|SRL{BZ-~SiifFtGm7r0AHr<6*1#O`zun*hNiQU*=1Kbe;Kh1SX^+ZL)$x^se zm2kfhBf`0n2WVyhJ<-pwY7yIFEk(2z(bgX?;*nUai1s437qO#=oe!|V zj>`i@JbE8{sU(9sa< zjO{PtKoMOXk?Q+>JYH4SjV8u8N@mAc%j4)Ew=VMPA=?2eI7#kFvX=^n0zMUmiBMq| qR|ADT^a&IW5aBFFso^B{VvKJMCDql^$^A1-)N%e4oa3_&=l=l(ZU!^} literal 0 HcmV?d00001 diff --git a/templates-java/target/test-classes/br/com/templates/config/openj9/OpenJ9DockerfileGeneratorTest.class b/templates-java/target/test-classes/br/com/templates/config/openj9/OpenJ9DockerfileGeneratorTest.class new file mode 100644 index 0000000000000000000000000000000000000000..1044aa9fa05ad9423edbd2314570924271ebd29b GIT binary patch literal 2378 zcmbVN>sA|86#fnbCJe)+P?Vsyf)+x!Or=Fjid4#_whb2{pw#OmIV3}qnRw>J(g*N? zblJd?wR`{{%H=*YlL;6UmVeG|_Wt&_uk+_$zyAT?K8|!Gkk;@}M;p>z7{+28pQ_7} zx;)bGnT~kyWm&^x9o`_LY7ymWlQob_aqk#)0vzw^KQkI;Rnww@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}&js-4;VOCBv%kj(Kh<-B94bx)CgvgNxSH;38u;r_WBW5kEudV7N+AtX0mb zbVcYjd)Z(+x>S+HFlKAi`N@(SXH}o}s(vxa=gu##m?34xz@ykFaBoA`ns>&)LwJ~l zAF|SR*HdNSd-%SANAOjF{*7N-117#A@L(eGC8ed|RRgc#byk>J@ybI>WkiTIkcg!#e3E$_Q}~r*0#X5h{W!Ca0Nz;`eIU}WgDrHxc7CGWH>q-cuqBxag)EbH<4L+ z5u5ytTZlj#v&#IlqSrUPQpr|!>T#lLyHVK)+_sh^CrOrWjj7rrDl7bnh^l=w;7j=0 zDKaI4s1NX3tfe@{B8D*?#EvOjBG1y+ z%h6b=5~6+0{=^Ay?!gJA8To`H&`uMl>N6&nC`t{CsKGn1;d!OF+x==fL)G+4qixhk zn_RMkkl1sqUl7<4KPu*Zt1Pd2{v|#vf^f_VD6BI@(hp~RHU2Wa7nJ&_r&<-OxFFSo zrp(tx`eZoA$w;-G9KLg^{${+imePEsPBbHtj4bA>`QgMY_>xbkA}x`P1@p zl@nJsW4waCrv40PW0_{+ppIUyTFTp9&C1supM3>%^A$S8r)mqIr0n$kC)D`hx`+SU z_}$CzCN($s&2Y~d#C1P+2PwrigUHKxHTtnu=NMe|)dgub%DR&1(_|J&> zaR85TC#Yc`btqk@5?x*W{U0NfYptQ}8Z;`+Qt9Sv&>Kp(k`;7(3tzB1u(L^VSEBe3 z&y}l(>p_f0=8n|O{f|0YNqg!h+G)VZ574Yu!>d^NP8Ih3 zD(oA0V7Qeq>bVDN*freN)t2kc_0>Qm2fA7t|8HQhfz8A88LX)+J=(@f=ptg>L}8H8 zKSYFv8O33YGTI}IbsS|PpfEZSdtJw9KEbFP6A4Dc#PK*LiP2$V9Ak8xSvZ5U#CHmJ d@pqQ^q`1YBDQ=DOQ8lbko90hohU+Gr`wZ8hyrBR9 literal 0 HcmV?d00001 diff --git a/templates-java/target/test-classes/br/com/templates/entity/EntityGeneratorTest.class b/templates-java/target/test-classes/br/com/templates/entity/EntityGeneratorTest.class new file mode 100644 index 0000000000000000000000000000000000000000..55f0e498b0d5299eba4f1e740ab92f6fa7f9b60c GIT binary patch literal 3585 zcmbW33sVzU6vzL|D@#}eg5m?M(W*Q(t+lNNt0IEhCfM?_zN(weC0R^%<31=(#}Cz+ z7CY@sKR`cJr~kXVNj9)d8JHotd+#~tcV72w{`vRMzX9BUo5lq!rSLF~E-dvUi$^LR ztN2#McXF$cMiI+tJi+%WevmsWDppmjsaRLBAvd0?_)*0(70*??Q1Md5D-}Pfc&*}% z3SC7>g`uLXLZq;nLPf!lusqXy|4>-M(LLKyFjXiyIm52!JW+4dbWgasP$sw7DLSX1 z@3v`~-W>(qlT#ZCdKT=mpv{75iDkcD63&`ls&OY%unoPop*yC0jy8L|s_81YdRX3? za6K}6UE!@a6r5i1=}%p3n662q^Oj|Mx@X!JZIb6ya$7!~%iR~7wj-#RajUjpD=#>L zL4~m>7!*4VVR)jvq1XJt(=B~l&((CRl3Vp0)2dK&&=H>RSS_L9nEA-76QS{yKyY!# z5Dn>y0<~%X{}W3O%(AQjiL(`RTUcxF8)B`hd&{=BxMRAW`#PjNwzloJB1SnKr$05l z>WX0H!dwh)%gE-PieG0P6^w?mQN_hVO?R0wwHcyCx)A0@log!sP_~`NmM1F0iK(C6Bk_PGiydDHk3)+wzxKH?ae&}{ z;-v#5_mI=8w(l5X$&_tLzTkA_RQtYG4hH%Y@qe5&BlJ;L;K!!OlLBWuXQ zWY=BcWPeHbHym@DImm_)W-S(BuDu(DlhrHS{gCEOlzObSl*>mtJj_#2LltHUTN>V? zmO@>F1)CaDR6_&r6dViGo_JMWV78!wQs`NSOIiLUdKEwDa4ddMU_0Mlvh6$BP1_EA zzMJ4|mLhpaYzjwMhHxjHsIT)?-7V_Yd#N48H>F_m-~?X!rQMJpK4@@coD&K11Tx>9 z;+${XRxl9rP{Hw}=oO@*JjVp$Sx}%E!2~MjWos!o(KI6;v(cFxS7qTEjv366C`1M0 zP2s4fF&V1#8#ZU6EV6>JreqTyoKZ;g8)cG`@zEK@W)9iAvgZ{Hx2NWl(iW!#Q|9=b ze>W!!?W54?x&1p+`?or5hKg)b&X+n9JDIG|9{Tex`=3r|yhB_pzVr1O2hl{_o6ym? zH_?uKm5o%wH=>A7ow#-sOQIu#P32&?;sW307x<1>_=@I5=js^OoDlrH!lxX+6@K?l ze}wWY7hRa(XJ4?XVv=hu6u=aw`NZl_xhqi4qdPd$rvF0MvybTh9X)Lu@>hYx4PYo{ zM~m#tMwF|8&1)^2f;PLkH=gM&O#gu|ABNHkwFhdN2zdzka2#V z4N%$8M1<<%W`y-d4T4rll4mR*~X${d``94lmoiebi>Cv|z|YDcQZ&`Yst zieG1SZ(xKDj?qCG$8>0-m9FDay80+}Gf3A6b!6hY_ayFC%aK=1oUGeuW;m+bE=Gzo zvmH)^^^$FK4}+LT2KQt28f`f+962yZY(Al0a|zf?h#fr;yF_e(*dnpZN5bAtz#b2< z>`twiIgu3Y3bCu~yES6h55RuI7&$PI!kvU@?O*k{B(r^y$@zC054UIO-1 z40}2W`-WJZ*b=eEk+Aa#*fTNgcoMckY?WA(*sUXB?2Zo{jr>U}DF_Lx%QC znM(DFq1hjtF&GEgxnNlLWh#!QNg#?b4`M>Peirihj2BXmXP}`XSuza$pzy*h@svpN zm@83wk%)6qcz(vu$1`v&N+pUBgA*^H47+{*f`8;*%+rZ?q6(Q#MuTODcysypTt&L0 zB^pCRrVN|)jLf{ZX+Bk?DR@GKJ1P=&0S5ccr%>cdW@%~S5sgo>X%UJ;sW-c|-1jqG z%z=fDgU5JcV%Nb_^ch;G@m3i?*+rg)fSF}3lS=YUIppikN>pDU`>QN zhcmpn+|JQV_Aia)BU`MxrRdhInIiFV ejXt_O^!9L_n7YCyVNKj1wn1}S^xdpfZ~X@0z}Z0n literal 0 HcmV?d00001 diff --git a/templates-java/target/test-classes/templates/config/fake-application.properties b/templates-java/target/test-classes/templates/config/fake-application.properties new file mode 100644 index 0000000..aaf084c --- /dev/null +++ b/templates-java/target/test-classes/templates/config/fake-application.properties @@ -0,0 +1 @@ +my-var=my-value \ No newline at end of file diff --git a/templates-java/target/test-classes/templates/config/openj9/dockerfile-template-test.txt b/templates-java/target/test-classes/templates/config/openj9/dockerfile-template-test.txt new file mode 100644 index 0000000..a9a3202 --- /dev/null +++ b/templates-java/target/test-classes/templates/config/openj9/dockerfile-template-test.txt @@ -0,0 +1,10 @@ +FROM adoptopenjdk/openjdk8-openj9 + +RUN mkdir /opt/shareclasses +RUN mkdir /opt/app + +ADD ../target/*.jar /opt/app.jar + +EXPOSE 8080 + +CMD ["java", "-Xmx512m", "-XX:+IdleTuningGcOnIdle", "-Xtune:virtualized", "-Xscmx512m", "-Xscmaxaot100m", "-Xshareclasses:cacheDir=/opt/shareclasses", "-jar", "/opt/app.jar"] diff --git a/templates-java/target/test-classes/templates/config/openj9/template-pom-test.xml b/templates-java/target/test-classes/templates/config/openj9/template-pom-test.xml new file mode 100644 index 0000000..847bc58 --- /dev/null +++ b/templates-java/target/test-classes/templates/config/openj9/template-pom-test.xml @@ -0,0 +1,66 @@ + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.cloud + spring-cloud-aws-messaging + 2.1.1.RELEASE + + + org.springframework.cloud + spring-cloud-starter-aws + 2.1.1.RELEASE + + + + + + + org.apache.maven.plugins + maven-shade-plugin + 2.4.3 + + + org.springframework.boot + spring-boot-maven-plugin + 2.1.5.RELEASE + + + + + package + + shade + + + + + META-INF/spring.handlers + + + META-INF/spring.factories + + + META-INF/spring.schemas + + + + br.com.example.DemoApplication + + + + + + + false + + + + \ No newline at end of file diff --git a/templates-java/target/test-classes/templates/config/template-entrypoint-listener-test.txt b/templates-java/target/test-classes/templates/config/template-entrypoint-listener-test.txt new file mode 100644 index 0000000..a7ebc66 --- /dev/null +++ b/templates-java/target/test-classes/templates/config/template-entrypoint-listener-test.txt @@ -0,0 +1,18 @@ +package br.com.example; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.cloud.aws.messaging.listener.SqsMessageDeletionPolicy; +import org.springframework.cloud.aws.messaging.listener.annotation.SqsListener; + +public class EntryPointMessage implements MessageListener { + + private static final Logger log = LogManager.getLogger(EntryPointMessage.class); + + @Override + @SqsListener(value = "${cloud.aws.sqs.queue-name}", deletionPolicy = SqsMessageDeletionPolicy.ON_SUCCESS) + public void queueListener(String String) { + + } + +} diff --git a/templates-java/target/test-classes/templates/config/template-message-listener-test.txt b/templates-java/target/test-classes/templates/config/template-message-listener-test.txt new file mode 100644 index 0000000..6b27063 --- /dev/null +++ b/templates-java/target/test-classes/templates/config/template-message-listener-test.txt @@ -0,0 +1,5 @@ +package br.com.example; + +public interface MessageListener { + void queueListener(String String); +} diff --git a/templates-java/target/test-classes/templates/config/template-pom-test.xml b/templates-java/target/test-classes/templates/config/template-pom-test.xml new file mode 100644 index 0000000..ca321db --- /dev/null +++ b/templates-java/target/test-classes/templates/config/template-pom-test.xml @@ -0,0 +1,16 @@ + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.cloud + spring-cloud-aws-messaging + 2.1.1.RELEASE + + + org.springframework.cloud + spring-cloud-starter-aws + 2.1.1.RELEASE + + \ No newline at end of file diff --git a/templates-java/target/test-classes/templates/config/template-pom.xml b/templates-java/target/test-classes/templates/config/template-pom.xml new file mode 100644 index 0000000..c9c1d6b --- /dev/null +++ b/templates-java/target/test-classes/templates/config/template-pom.xml @@ -0,0 +1,11 @@ + + + org.springframework.boot + spring-boot-starter-web + + + + + + + \ No newline at end of file diff --git a/templates-java/target/test-classes/templates/config/template-producer-message-test.txt b/templates-java/target/test-classes/templates/config/template-producer-message-test.txt new file mode 100644 index 0000000..2156c06 --- /dev/null +++ b/templates-java/target/test-classes/templates/config/template-producer-message-test.txt @@ -0,0 +1,39 @@ +package br.com.example; + +import com.amazonaws.services.sqs.AmazonSQSAsync; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.cloud.aws.messaging.core.QueueMessagingTemplate; +import org.springframework.cloud.aws.messaging.core.SqsMessageHeaders; +import org.springframework.stereotype.Component; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +@Component +public class ProducerMessage { + + @Value("${cloud.aws.sqs.queue-name}") + private String queueName; + + private QueueMessagingTemplate queueMessagingTemplate; + + @Autowired + public ProducerMessage(AmazonSQSAsync amazonSqs) { + this.queueMessagingTemplate = new QueueMessagingTemplate(amazonSqs); + } + + public void sendMessage() { + this.queueMessagingTemplate.convertAndSend(queueName, "YOUR_MESSAGE_OBJECT", getHeader()); + } + + private Map getHeader() { + Map headers = new HashMap<>(); + headers.put(SqsMessageHeaders.SQS_GROUP_ID_HEADER, UUID.randomUUID().toString()); + headers.put(SqsMessageHeaders.SQS_DEDUPLICATION_ID_HEADER, UUID.randomUUID().toString()); + headers.put(SqsMessageHeaders.CONTENT_TYPE, "application/json"); + return headers; + } + +} diff --git a/templates/src/main/java/br/com/templates/entity/EntityGenerator.java b/templates/src/main/java/br/com/templates/entity/EntityGenerator.java index f73e5b7..dad2816 100644 --- a/templates/src/main/java/br/com/templates/entity/EntityGenerator.java +++ b/templates/src/main/java/br/com/templates/entity/EntityGenerator.java @@ -1,8 +1,14 @@ package br.com.templates.entity; +import java.util.List; + +import static java.util.Arrays.asList; + public class EntityGenerator { - public String run(String name, String argumentValue) { + private static final List supportedTypes = asList("String", "Int", "Date"); + + public String run(String nameClass, String argumentValue) { if (argumentValue.contains("references")) { return "" + "@Data\n" + @@ -13,19 +19,23 @@ public String run(String name, String argumentValue) { "}\n"; } - String expectedValue = "" + - "@Data\n" + - "class User {\n" + - " private String name;\n" + - " private Integer age;\n" + - "}\n"; + String generatedClass = this.generateClass(nameClass); + String[] attributes = argumentValue.split(" "); - return expectedValue; + StringBuilder attributeToReplace = new StringBuilder(); + for (int i = 0; i < attributes.length; i++) { + String attribute = generateAttribute(attributes[i]); + attributeToReplace.append("\t".concat(attribute.concat("\n"))); + } + generatedClass = generatedClass.replace("${attributes}", attributeToReplace.toString()); + + return generatedClass; } public String generateAttribute(String attribute) { if (!attribute.contains(":")) throw new EntityValidator("attribute should contains ':' "); String[] splitAttribute = attribute.split(":"); + if (!supportedTypes.contains(splitAttribute[1])) throw new EntityValidator(splitAttribute[1].concat(" not supported.")); if (attribute.contains("Int")) return "private Integer ".concat(splitAttribute[0]).concat(";"); if (attribute.contains("Date")) return "private Date ".concat(splitAttribute[0]).concat(";"); @@ -33,4 +43,11 @@ public String generateAttribute(String attribute) { return null; } + public String generateClass(String nameClass) { + return "" + + "@Data\n" + + "public class ".concat(nameClass).concat(" {\n")+ + "${attributes}" + + "}"; + } } diff --git a/templates/src/test/java/br/com/templates/entity/EntityGeneratorTest.java b/templates/src/test/java/br/com/templates/entity/EntityGeneratorTest.java index 743e40e..23475de 100644 --- a/templates/src/test/java/br/com/templates/entity/EntityGeneratorTest.java +++ b/templates/src/test/java/br/com/templates/entity/EntityGeneratorTest.java @@ -18,20 +18,25 @@ public void setUp() { public void shouldCreateEntity() { String expectedValue = "" + "@Data\n" + - "class User {\n" + - " private String name;\n" + - " private Integer age;\n" + + "public class User {\n" + + "\tprivate String name;\n" + + "\tprivate Integer age;\n" + "}\n"; String returnedValue = entityGenerator.run("User", "name:String age:Int"); - assertEquals(expectedValue, returnedValue); + assertEquals(expectedValue.trim(), returnedValue.trim()); } @Test(expected = EntityValidator.class) - public void shouldReturnException(){ + public void shouldReturnException() { entityGenerator.generateAttribute("name"); } + @Test(expected = EntityValidator.class) + public void givenTypeThatNotExists_shouldInvokeException() { + entityGenerator.generateAttribute("name:OtherType"); + } + @Test public void shouldReturnWithRelations() { String expectedValue = "" + @@ -48,6 +53,30 @@ public void shouldReturnWithRelations() { assertEquals(expectedValue, returnedValue); } + @Test + public void shouldGenerateClass() { + String expectedValue = "" + + "@Data\n" + + "public class User {\n" + + "${attributes}" + + "}"; + + String returned = entityGenerator.generateClass("User"); + assertEquals(expectedValue, returned); + } + + @Test + public void shouldGenerateClassWithCorrectName() { + String expectedValue = "" + + "@Data\n" + + "public class Foo {\n" + + "${attributes}" + + "}"; + + String returned = entityGenerator.generateClass("Foo"); + assertEquals(expectedValue, returned); + } + @Test public void shouldGenerateStringAttribute() { String attributes = "name:String"; From 8ea14d31a3bea1d1c6af33c5cd9757e87631cf77 Mon Sep 17 00:00:00 2001 From: NetoDevel Date: Mon, 15 Jul 2019 13:19:35 -0300 Subject: [PATCH 04/10] Adds get references --- .../templates/entity/EntityGenerator.class | Bin 2522 -> 3803 bytes .../entity/EntityGeneratorTest.class | Bin 3585 -> 4925 bytes .../com/templates/entity/EntityGenerator.java | 36 +++++++++++++++ .../templates/entity/EntityGeneratorTest.java | 41 ++++++++++++++++++ 4 files changed, 77 insertions(+) diff --git a/templates-java/target/classes/br/com/templates/entity/EntityGenerator.class b/templates-java/target/classes/br/com/templates/entity/EntityGenerator.class index 7924484a57cf56a7fcadd34438266348194f9e7e..477080d644f804069f9ed0a8efe35db2f262f5f7 100644 GIT binary patch literal 3803 zcmai1Yg-iO8NP>Ic7|nGa0JY1B#RJOj%(4R2B=Z-P!qtEMJ&eF4!grLX4zS1XEoN^ zW16(-F+FQ~w1@PVVA8H8Hm1jX=r8D({)=9@di6?^-tWxp38+8>y?8T>eaI?U4dVgi6j))r7kLHe#j`D=5Qc)R*mM*W6t_`_t>762pHuMpCJH>;j4$Ae3cjS^ z%L=}t;HwIrQ}8tfUsv!A1>aQgEd}2W<2$&j;93~Zk~)xVmK6^ZHVjJKD6B(z6S? zZHi}qGw7_CjAUSX$xfuK)r4cL=CitE6cR?xF`Y|^Bktvxkuz-Fv26Ma*u|WLeesRa zY}^^xxWycGhtV$;9XBW!g4&!UNG5-eQ!uBm8dF)lzzAD(J5yX`Pz!ptNX1CT3&}|P z0^y2PN^gC9Gsjv*WZs%Hm}iQHq8lU+70qng5UI8#9X<8LjGlMVa(TQiW0o~2VM{rH zgVk*MHUVW*2qJ}i)^ut#+bf|J=8R>-HgYLZA&PB~4bvjvEoFaxzHO_9W2Kn~izPR2 z3rsrVway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?^x>s z7EKgwJjF8;OEyYaHsC4cm*#A&pzM6{es@1ddF{Qg)lkY>$lqzSu%tL2z+gOz?1k9p zW^9wrYG7X~#W5e>0706qUFmyq7#(~w(8;+j&Rq{Q_o=z6P^DN1SIxKe{4V~dv?GgZBoj`JTK%WMN>@@2r+Kt1ijt+R(Hf+_gSJ&Y~6sIb6M0pmf zBKJQPoz~ulouK#Au0EGNTV6zaK`LjqIhX#;RKY|}olC5eC(GSN5#+}j!+529n$^ZJ+Iw&HSP@EJl$Ek zg}U4!?KX$2^Ul*").concat(" ".concat(splitAttribute[0].toLowerCase()).concat(";")); + } + if (!attribute.contains(":")) throw new EntityValidator("attribute should contains ':' "); String[] splitAttribute = attribute.split(":"); if (!supportedTypes.contains(splitAttribute[1])) throw new EntityValidator(splitAttribute[1].concat(" not supported.")); @@ -50,4 +65,25 @@ public String generateClass(String nameClass) { "${attributes}" + "}"; } + + public Boolean metodoReturnTrue() { + return true; + } + + public String getAttributesOfReferences(String attributes) { + Pattern pattern = Pattern.compile("\\((.*?)\\)"); + Matcher matcher = pattern.matcher(attributes); + String result = ""; + if (matcher.find()) { + result = matcher.group(1); + } + return result; + } + + public String getRelation(String attributes) { + String[] splitAttributes = attributes.split(" "); + String[] splitRelation = splitAttributes[0].split(":"); + return splitRelation[1]; + } + } diff --git a/templates/src/test/java/br/com/templates/entity/EntityGeneratorTest.java b/templates/src/test/java/br/com/templates/entity/EntityGeneratorTest.java index 23475de..239f551 100644 --- a/templates/src/test/java/br/com/templates/entity/EntityGeneratorTest.java +++ b/templates/src/test/java/br/com/templates/entity/EntityGeneratorTest.java @@ -119,4 +119,45 @@ public void shouldReturnCorrectNameDateAttribute() { assertEquals("private Date updated;", valueReturned); } + @Test + public void shouldReturnHasManyRelation() { + String attributes = "Foo:references(relation:hasMany foo:String)"; + String valueReturned = entityGenerator.generateAttribute(attributes); + assertEquals("private List foo;", valueReturned); + } + + @Test + public void shouldReturnBelongsToRelation() { + String attributes = "Foo:references(relation:belongsTo foo:String)"; + String valueReturned = entityGenerator.generateAttribute(attributes); + assertEquals("private Foo foo;", valueReturned); + } + + @Test(expected = EntityValidator.class) + public void givenReferences_wheRelationEmpty_shouldInvokeException() { + String attributes = "Foo:references(foo:String)"; + entityGenerator.generateAttribute(attributes); + } + + @Test + public void shouldReturnCorrectNameHasNameRelation() { + String attributes = "Books:references(relation:hasMany foo:String)"; + String valueReturned = entityGenerator.generateAttribute(attributes); + assertEquals("private List books;", valueReturned); + } + + @Test + public void givenStringBetweenParentheses_shouldReturnAttributes() { + String attributes = "Foo:references(relation:belongsTo foo:String)"; + String getAttributesReferences = entityGenerator.getAttributesOfReferences(attributes); + assertEquals("relation:belongsTo foo:String", getAttributesReferences); + } + + @Test + public void shouldReturnRelation() { + String attributes = "relation:belongsTo foo:String"; + String getAttributesReferences = entityGenerator.getRelation(attributes); + assertEquals("belongsTo", getAttributesReferences); + } + } \ No newline at end of file From b78a5d588e8f54796b2f486ebec3cbc281a16fc2 Mon Sep 17 00:00:00 2001 From: NetoDevel Date: Fri, 2 Aug 2019 18:21:40 -0300 Subject: [PATCH 05/10] Adding generator relationships --- .../com/templates/entity/EntityGenerator.java | 77 +++++++++++++++---- .../templates/entity/EntityGeneratorTest.java | 45 ++++++++--- 2 files changed, 94 insertions(+), 28 deletions(-) diff --git a/templates/src/main/java/br/com/templates/entity/EntityGenerator.java b/templates/src/main/java/br/com/templates/entity/EntityGenerator.java index abfe6ea..0609ccc 100644 --- a/templates/src/main/java/br/com/templates/entity/EntityGenerator.java +++ b/templates/src/main/java/br/com/templates/entity/EntityGenerator.java @@ -1,5 +1,6 @@ package br.com.templates.entity; +import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -11,17 +12,19 @@ public class EntityGenerator { private static final List supportedTypes = asList("String", "Int", "Date"); public String run(String nameClass, String argumentValue) { - if (argumentValue.contains("references")) { - return "" + - "@Data\n" + - "class User {\n" + - " private String name;\n" + - " private Integer age;\n" + - " private List foo;\n" + - "}\n"; - } +// if (argumentValue.contains("references")) { +// return "" + +// "@Data\n" + +// "class User {\n" + +// " private String name;\n" + +// " private Integer age;\n" + +// " private List foo;\n" + +// "}\n"; +// } String generatedClass = this.generateClass(nameClass); + + argumentValue = toPatternScaffold(argumentValue); String[] attributes = argumentValue.split(" "); StringBuilder attributeToReplace = new StringBuilder(); @@ -29,6 +32,7 @@ public String run(String nameClass, String argumentValue) { String attribute = generateAttribute(attributes[i]); attributeToReplace.append("\t".concat(attribute.concat("\n"))); } + generatedClass = generatedClass.replace("${attributes}", attributeToReplace.toString()); return generatedClass; @@ -36,16 +40,16 @@ public String run(String nameClass, String argumentValue) { public String generateAttribute(String attribute) { if (attribute.contains("references")) { - String[] splitAttribute = attribute.split(":"); - String attributesReferences = getAttributesOfReferences(attribute); - if (!attributesReferences.contains("relation")) throw new EntityValidator("should contain relation"); - String relation = getRelation(attributesReferences); + String attributesOfReferences = getAttributesOfReferences(attribute); + String[] attributes = attributesOfReferences.split(","); - if (relation.equals("belongsTo")) { - return "private ".concat(splitAttribute[0]).concat(" ".concat(splitAttribute[0].toLowerCase()).concat(";")); - } + String classIdentify = attribute.replace(attributesOfReferences, ""); + String[] indentifySplit = classIdentify.split(":"); - return "private List<".concat(splitAttribute[0]).concat(">").concat(" ".concat(splitAttribute[0].toLowerCase()).concat(";")); + String clazzName = indentifySplit[0]; + String relation = attributes[0].split(":")[1]; + if (relation.equals("hasMany")) return "private List<".concat(clazzName).concat(">").concat(" ".concat(clazzName.toLowerCase()).concat(";")); + if (relation.equals("belongsTo")) return "private ".concat(clazzName).concat(" ".concat(clazzName.toLowerCase()).concat(";")); } if (!attribute.contains(":")) throw new EntityValidator("attribute should contains ':' "); @@ -55,6 +59,7 @@ public String generateAttribute(String attribute) { if (attribute.contains("Int")) return "private Integer ".concat(splitAttribute[0]).concat(";"); if (attribute.contains("Date")) return "private Date ".concat(splitAttribute[0]).concat(";"); if (attribute.contains("String")) return "private String ".concat(splitAttribute[0]).concat(";"); + return null; } @@ -86,4 +91,42 @@ public String getRelation(String attributes) { return splitRelation[1]; } + public List getReferencesComplete(String attributes) { + String attributesConverted = toPatternScaffold(attributes); + String[] attributesSplited = attributesConverted.split(" "); + + List attributesToReturn = new ArrayList<>(); + for (int i = 0; i < attributesSplited.length; i++) { + if (attributesSplited[i].contains("references")){ + attributesToReturn.add(attributesSplited[i]); + } + } + return attributesToReturn; + } + + public String toPatternScaffold(String attributes) { + return attributes.replace(", ", ","); + } + + class RelationShip { + + String nameClass; + String attributes; + + public String getNameClass() { + return nameClass; + } + + public void setNameClass(String nameClass) { + this.nameClass = nameClass; + } + + public String getAttributes() { + return attributes; + } + + public void setAttributes(String attributes) { + this.attributes = attributes; + } + } } diff --git a/templates/src/test/java/br/com/templates/entity/EntityGeneratorTest.java b/templates/src/test/java/br/com/templates/entity/EntityGeneratorTest.java index 239f551..a3cd7b6 100644 --- a/templates/src/test/java/br/com/templates/entity/EntityGeneratorTest.java +++ b/templates/src/test/java/br/com/templates/entity/EntityGeneratorTest.java @@ -3,6 +3,8 @@ import org.junit.Before; import org.junit.Test; +import java.util.List; + import static org.junit.Assert.assertEquals; public class EntityGeneratorTest { @@ -41,16 +43,15 @@ public void givenTypeThatNotExists_shouldInvokeException() { public void shouldReturnWithRelations() { String expectedValue = "" + "@Data\n" + - "class User {\n" + - " private String name;\n" + - " private Integer age;\n" + - " private List foo;\n" + + "public class User {\n" + + "\tprivate String name;\n" + + "\tprivate Integer age;\n" + + "\tprivate List foo;\n" + "}\n"; - String valueArgument = "name:String age:Int Foo:references(relation:hasMany foo:String)"; - + String valueArgument = "name:String age:Int Foo:references(relation:hasMany, foo:String)"; String returnedValue = entityGenerator.run("User", valueArgument); - assertEquals(expectedValue, returnedValue); + assertEquals(expectedValue.trim(), returnedValue.trim()); } @Test @@ -121,14 +122,14 @@ public void shouldReturnCorrectNameDateAttribute() { @Test public void shouldReturnHasManyRelation() { - String attributes = "Foo:references(relation:hasMany foo:String)"; + String attributes = "Foo:references(relation:hasMany, foo:String)"; String valueReturned = entityGenerator.generateAttribute(attributes); assertEquals("private List foo;", valueReturned); } @Test public void shouldReturnBelongsToRelation() { - String attributes = "Foo:references(relation:belongsTo foo:String)"; + String attributes = "Foo:references(relation:belongsTo, foo:String)"; String valueReturned = entityGenerator.generateAttribute(attributes); assertEquals("private Foo foo;", valueReturned); } @@ -136,12 +137,12 @@ public void shouldReturnBelongsToRelation() { @Test(expected = EntityValidator.class) public void givenReferences_wheRelationEmpty_shouldInvokeException() { String attributes = "Foo:references(foo:String)"; - entityGenerator.generateAttribute(attributes); + entityGenerator.generateAttribute(attributes); } @Test public void shouldReturnCorrectNameHasNameRelation() { - String attributes = "Books:references(relation:hasMany foo:String)"; + String attributes = "Books:references(relation:hasMany, foo:String)"; String valueReturned = entityGenerator.generateAttribute(attributes); assertEquals("private List books;", valueReturned); } @@ -160,4 +161,26 @@ public void shouldReturnRelation() { assertEquals("belongsTo", getAttributesReferences); } + @Test + public void shouldReturnScaffoldPattern() { + String attributes = "name:String age:Int Foo:references(relation:hasMany, foo:String)"; + String returnConverted = entityGenerator.toPatternScaffold(attributes); + assertEquals("name:String age:Int Foo:references(relation:hasMany,foo:String)", returnConverted); + } + + @Test + public void shouldReturnReferencesAttributeComplete() { + String attributes = "name:String age:Int Foo:references(relation:hasMany, foo:String)"; + List getAttributesReferences = entityGenerator.getReferencesComplete(attributes); + assertEquals("Foo:references(relation:hasMany,foo:String)", getAttributesReferences.get(0)); + } + + @Test + public void shouldReturnReferencesAttributes() { + String attributes = "name:String age:Int Foo:references(relation:hasMany, foo:String) Books:references(relation:belongsTo, foo:String)"; + List getAttributesReferences = entityGenerator.getReferencesComplete(attributes); + assertEquals("Foo:references(relation:hasMany,foo:String)", getAttributesReferences.get(0)); + assertEquals("Books:references(relation:belongsTo,foo:String)", getAttributesReferences.get(1)); + } + } \ No newline at end of file From f3c67b4c27589a9e7b7509587937077e67de67e3 Mon Sep 17 00:00:00 2001 From: NetoDevel Date: Sat, 3 Aug 2019 16:04:23 -0300 Subject: [PATCH 06/10] Adds new generator of models --- .../com/command/ScaffoldFactoryCommands.java | 9 +- .../br/com/command/model/ModelCommand.java | 20 +-- .../br/com/command/model/ModelHandler.java | 98 +++++++++---- .../com/command/model/ModelHandlerTest.java | 59 ++++++++ .../br/com/templates/ComposeTemplate.class | Bin 1103 -> 0 bytes .../EntryPointMessageGenerator.class | Bin 1056 -> 0 bytes .../MessageListenerGenerator.class | Bin 1045 -> 0 bytes .../ProducerMessageGenerator.class | Bin 980 -> 0 bytes .../jms_aws_sqs/SQSDependencyGenerator.class | Bin 2073 -> 0 bytes .../jms_aws_sqs/SQSPropertiesGenerator.class | Bin 1517 -> 0 bytes .../openj9/OpenJ9DockerfileGenerator.class | Bin 964 -> 0 bytes .../openj9/OpenJ9MavenPluginGenerator.class | Bin 3781 -> 0 bytes .../templates/entity/EntityGenerator.class | Bin 3803 -> 0 bytes .../templates/entity/EntityValidator.class | Bin 388 -> 0 bytes .../config/openj9/dockerfile-template.txt | 10 -- .../config/template-entrypoint-listener.txt | 18 --- .../config/template-message-listener.txt | 5 - .../config/template-producer-message.txt | 39 ----- .../EntryPointMessageGeneratorTest.class | Bin 2835 -> 0 bytes .../MessageListenerGeneratorTest.class | Bin 2820 -> 0 bytes .../ProducerMessageGeneratorTest.class | Bin 2820 -> 0 bytes .../SQSDependencyGeneratorTest.class | Bin 2945 -> 0 bytes .../OpenJ9DockerfileGeneratorTest.class | Bin 2378 -> 0 bytes .../OpenJ9MavenPluginGeneratorTest.class | Bin 3553 -> 0 bytes .../entity/EntityGeneratorTest.class | Bin 4925 -> 0 bytes .../templates/helper/LoadTemplateTester.class | Bin 889 -> 0 bytes .../config/fake-application.properties | 1 - .../openj9/dockerfile-template-test.txt | 10 -- .../config/openj9/template-pom-test.xml | 66 --------- .../template-entrypoint-listener-test.txt | 18 --- .../config/template-message-listener-test.txt | 5 - .../templates/config/template-pom-test.xml | 16 -- .../templates/config/template-pom.xml | 11 -- .../config/template-producer-message-test.txt | 39 ----- .../br/com/templates/entity/EntityCache.java | 28 ++++ .../com/templates/entity/EntityExecutor.java | 138 ++++++++++++++++++ .../com/templates/entity/EntityGenerator.java | 134 ++--------------- .../templates.entity/entity-template.txt | 3 + .../com/templates/entity/EntityCacheTest.java | 61 ++++++++ ...ratorTest.java => EntityExecutorTest.java} | 89 +++++++---- .../config/openj9/dockerfile-template.txt | 10 -- .../config/template-entrypoint-listener.txt | 18 --- .../config/template-message-listener.txt | 5 - .../config/template-producer-message.txt | 39 ----- .../target/maven-archiver/pom.properties | 5 - .../compile/default-compile/createdFiles.lst | 10 -- .../compile/default-compile/inputFiles.lst | 10 -- .../default-testCompile/createdFiles.lst | 8 - .../default-testCompile/inputFiles.lst | 8 - .../config/fake-application.properties | 1 - .../openj9/dockerfile-template-test.txt | 10 -- .../config/openj9/template-pom-test.xml | 66 --------- .../template-entrypoint-listener-test.txt | 18 --- .../config/template-message-listener-test.txt | 5 - .../templates/config/template-pom-test.xml | 16 -- .../templates/config/template-pom.xml | 11 -- .../config/template-producer-message-test.txt | 39 ----- 57 files changed, 438 insertions(+), 718 deletions(-) create mode 100644 spring-scaffold-cli/src/test/java/br/com/command/model/ModelHandlerTest.java delete mode 100644 templates-java/target/classes/br/com/templates/ComposeTemplate.class delete mode 100644 templates-java/target/classes/br/com/templates/config/jms_aws_sqs/EntryPointMessageGenerator.class delete mode 100644 templates-java/target/classes/br/com/templates/config/jms_aws_sqs/MessageListenerGenerator.class delete mode 100644 templates-java/target/classes/br/com/templates/config/jms_aws_sqs/ProducerMessageGenerator.class delete mode 100644 templates-java/target/classes/br/com/templates/config/jms_aws_sqs/SQSDependencyGenerator.class delete mode 100644 templates-java/target/classes/br/com/templates/config/jms_aws_sqs/SQSPropertiesGenerator.class delete mode 100644 templates-java/target/classes/br/com/templates/config/openj9/OpenJ9DockerfileGenerator.class delete mode 100644 templates-java/target/classes/br/com/templates/config/openj9/OpenJ9MavenPluginGenerator.class delete mode 100644 templates-java/target/classes/br/com/templates/entity/EntityGenerator.class delete mode 100644 templates-java/target/classes/br/com/templates/entity/EntityValidator.class delete mode 100644 templates-java/target/classes/templates/config/openj9/dockerfile-template.txt delete mode 100644 templates-java/target/classes/templates/config/template-entrypoint-listener.txt delete mode 100644 templates-java/target/classes/templates/config/template-message-listener.txt delete mode 100644 templates-java/target/classes/templates/config/template-producer-message.txt delete mode 100644 templates-java/target/test-classes/br/com/templates/config/jms_aws_sqs/EntryPointMessageGeneratorTest.class delete mode 100644 templates-java/target/test-classes/br/com/templates/config/jms_aws_sqs/MessageListenerGeneratorTest.class delete mode 100644 templates-java/target/test-classes/br/com/templates/config/jms_aws_sqs/ProducerMessageGeneratorTest.class delete mode 100644 templates-java/target/test-classes/br/com/templates/config/jms_aws_sqs/SQSDependencyGeneratorTest.class delete mode 100644 templates-java/target/test-classes/br/com/templates/config/openj9/OpenJ9DockerfileGeneratorTest.class delete mode 100644 templates-java/target/test-classes/br/com/templates/config/openj9/OpenJ9MavenPluginGeneratorTest.class delete mode 100644 templates-java/target/test-classes/br/com/templates/entity/EntityGeneratorTest.class delete mode 100644 templates-java/target/test-classes/br/com/templates/helper/LoadTemplateTester.class delete mode 100644 templates-java/target/test-classes/templates/config/fake-application.properties delete mode 100644 templates-java/target/test-classes/templates/config/openj9/dockerfile-template-test.txt delete mode 100644 templates-java/target/test-classes/templates/config/openj9/template-pom-test.xml delete mode 100644 templates-java/target/test-classes/templates/config/template-entrypoint-listener-test.txt delete mode 100644 templates-java/target/test-classes/templates/config/template-message-listener-test.txt delete mode 100644 templates-java/target/test-classes/templates/config/template-pom-test.xml delete mode 100644 templates-java/target/test-classes/templates/config/template-pom.xml delete mode 100644 templates-java/target/test-classes/templates/config/template-producer-message-test.txt create mode 100644 templates/src/main/java/br/com/templates/entity/EntityCache.java create mode 100644 templates/src/main/java/br/com/templates/entity/EntityExecutor.java create mode 100644 templates/src/main/resources/templates.entity/entity-template.txt create mode 100644 templates/src/test/java/br/com/templates/entity/EntityCacheTest.java rename templates/src/test/java/br/com/templates/entity/{EntityGeneratorTest.java => EntityExecutorTest.java} (61%) delete mode 100644 templates/target/classes/templates/config/openj9/dockerfile-template.txt delete mode 100644 templates/target/classes/templates/config/template-entrypoint-listener.txt delete mode 100644 templates/target/classes/templates/config/template-message-listener.txt delete mode 100644 templates/target/classes/templates/config/template-producer-message.txt delete mode 100644 templates/target/maven-archiver/pom.properties delete mode 100644 templates/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst delete mode 100644 templates/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst delete mode 100644 templates/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst delete mode 100644 templates/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst delete mode 100644 templates/target/test-classes/templates/config/fake-application.properties delete mode 100644 templates/target/test-classes/templates/config/openj9/dockerfile-template-test.txt delete mode 100644 templates/target/test-classes/templates/config/openj9/template-pom-test.xml delete mode 100644 templates/target/test-classes/templates/config/template-entrypoint-listener-test.txt delete mode 100644 templates/target/test-classes/templates/config/template-message-listener-test.txt delete mode 100644 templates/target/test-classes/templates/config/template-pom-test.xml delete mode 100644 templates/target/test-classes/templates/config/template-pom.xml delete mode 100644 templates/target/test-classes/templates/config/template-producer-message-test.txt diff --git a/spring-scaffold-cli/src/main/java/br/com/command/ScaffoldFactoryCommands.java b/spring-scaffold-cli/src/main/java/br/com/command/ScaffoldFactoryCommands.java index 43c4324..b9bb059 100644 --- a/spring-scaffold-cli/src/main/java/br/com/command/ScaffoldFactoryCommands.java +++ b/spring-scaffold-cli/src/main/java/br/com/command/ScaffoldFactoryCommands.java @@ -1,10 +1,9 @@ package br.com.command; -import br.com.command.model.ModelHandler; -import br.com.generate.helpers.ScaffoldInfoHelper; import br.com.command.controller.ControllerCommand; import br.com.command.controller.ControllerHandler; import br.com.command.model.ModelCommand; +import br.com.command.model.ModelHandler; import br.com.command.repository.RepositoryCommand; import br.com.command.repository.RepositoryHandler; import br.com.command.scaffold.ScaffoldCommand; @@ -15,6 +14,7 @@ import br.com.command.setup.SetupScaffoldHandler; import br.com.command.template.TemplateCommand; import br.com.command.template.TemplateHandler; +import br.com.generate.helpers.ScaffoldInfoHelper; import org.springframework.boot.cli.command.Command; import org.springframework.boot.cli.command.CommandFactory; @@ -30,14 +30,15 @@ public class ScaffoldFactoryCommands implements CommandFactory { public Collection getCommands() { + ScaffoldInfoHelper scaffoldInfoHelper = new ScaffoldInfoHelper(); return Arrays.asList( - new ModelCommand("model", "generate entities", new ModelHandler()), + new ModelCommand("model", "generate entities", new ModelHandler(scaffoldInfoHelper)), new RepositoryCommand("repository", "generate repositories", new RepositoryHandler()), new ServiceCommand("service", "generate services", new ServiceHandler()), new ControllerCommand("controller", "generate controllers", new ControllerHandler()), new ScaffoldCommand("scaffold", "generate api scaffold", new ScaffoldHandler()), new SetupScaffoldCommand("setup:scaffold", "setup scaffold", new SetupScaffoldHandler()), - new TemplateCommand("template", "generate setup project", new TemplateHandler(new ScaffoldInfoHelper()))); + new TemplateCommand("template", "generate setup project", new TemplateHandler(scaffoldInfoHelper))); } } diff --git a/spring-scaffold-cli/src/main/java/br/com/command/model/ModelCommand.java b/spring-scaffold-cli/src/main/java/br/com/command/model/ModelCommand.java index 3ef3aae..172c05b 100644 --- a/spring-scaffold-cli/src/main/java/br/com/command/model/ModelCommand.java +++ b/spring-scaffold-cli/src/main/java/br/com/command/model/ModelCommand.java @@ -1,10 +1,5 @@ package br.com.command.model; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import org.springframework.boot.cli.command.HelpExample; import org.springframework.boot.cli.command.OptionParsingCommand; import org.springframework.boot.cli.command.options.OptionHandler; @@ -16,20 +11,11 @@ public class ModelCommand extends OptionParsingCommand { public ModelCommand(String name, String description, OptionHandler handler) { - super("model", "generate entities", new ModelHandler()); - } - - public String getUsageHelp() { - // TODO Auto-generated method stub - return "[name-entity] [attributes] [language]"; + super(name, description, handler); } @Override - public Collection getExamples() { - List list = new ArrayList(); - list.add(new HelpExample("create entities java", "model -n User -p name:String")); - list.add(new HelpExample("create entities kotlin", "model -n User -p name:String -l kotlin")); - return list; + public String getUsageHelp() { + return " "; } - } diff --git a/spring-scaffold-cli/src/main/java/br/com/command/model/ModelHandler.java b/spring-scaffold-cli/src/main/java/br/com/command/model/ModelHandler.java index ae6baa8..f173823 100644 --- a/spring-scaffold-cli/src/main/java/br/com/command/model/ModelHandler.java +++ b/spring-scaffold-cli/src/main/java/br/com/command/model/ModelHandler.java @@ -1,45 +1,83 @@ package br.com.command.model; -import java.io.IOException; -import java.util.Arrays; - +import br.com.generate.helpers.ScaffoldInfoHelper; +import br.com.generator.core.GeneratorOptions; +import br.com.templates.entity.EntityCache; +import br.com.templates.entity.EntityExecutor; +import br.com.templates.entity.EntityGenerator; import joptsimple.OptionSet; import joptsimple.OptionSpec; - import org.springframework.boot.cli.command.options.OptionHandler; import org.springframework.boot.cli.command.status.ExitStatus; -import br.com.generate.source.model.ModelGenerator; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** - * * @author NetoDevel * @since 0.0.1 */ public class ModelHandler extends OptionHandler { - @SuppressWarnings("unused") - private OptionSpec nameEntity; - - @SuppressWarnings("unused") - private OptionSpec parametersEntity; - - @Override - protected void options() { - this.nameEntity = option(Arrays.asList("nameEntity", "n"), "Name of entity to generate").withRequiredArg(); - this.parametersEntity = option(Arrays.asList("parameterEntity", "p"), "Parameter of entity to generate").withRequiredArg(); - } - - @Override - protected ExitStatus run(OptionSet options) throws Exception { - String nameClass = (String) options.valueOf("n"); - String parametersClass = (String) options.valueOf("p"); - generateModelJava(nameClass, parametersClass); - return ExitStatus.OK; - } - - private void generateModelJava(String nameClass, String parameters) throws IOException { - new ModelGenerator().generate(nameClass, parameters, "template-model.txt"); - } - + @SuppressWarnings("unused") + private OptionSpec nameEntity; + + @SuppressWarnings("unused") + private OptionSpec parametersEntity; + + private ScaffoldInfoHelper scaffoldInfoHelper; + + public ModelHandler() { + } + + public ModelHandler(ScaffoldInfoHelper scaffoldInfoHelper) { + this.scaffoldInfoHelper = scaffoldInfoHelper; + } + + @Override + protected void options() { + this.nameEntity = option(Arrays.asList("nameEntity", "n"), "Name of entity").withRequiredArg(); + this.parametersEntity = option(Arrays.asList("parameterEntity", "p"), "Parameters of entity").withRequiredArg(); + } + + @Override + protected ExitStatus run(OptionSet options) throws Exception { + String nameClass = (String) options.valueOf("n"); + String parametersClass = (String) options.valueOf("p"); + + if (nameClass == null || nameClass.replace(" ", "").isEmpty()) { + System.out.println("[INFO] - name of entity is required. use: -n ${entity_name}"); + return ExitStatus.ERROR; + } + if (parametersClass == null || parametersClass.replace(" ", "").isEmpty()){ + System.out.println("[INFO] - parameters of entity is required. use: -p ${parameters}"); + return ExitStatus.ERROR; + } + + generateModelJava(nameClass, parametersClass); + return ExitStatus.OK; + } + + private void generateModelJava(String nameClass, String parameters) throws IOException { + EntityExecutor entityExecutor = new EntityExecutor(); + entityExecutor.run(nameClass, parameters); + + for (EntityCache entity : entityExecutor.getEntities()) { + GeneratorOptions generatorOptions = new GeneratorOptions(); + generatorOptions.setName(entity.getName().concat(".java")); + generatorOptions.setDestination(scaffoldInfoHelper.getPathPackage().concat("models")); + + Map keyValue = new HashMap<>(); + keyValue.put("${content}", entity.getContent()); + keyValue.put("${package}", scaffoldInfoHelper.getPackage().concat("models")); + + generatorOptions.setKeyValue(keyValue); + + EntityGenerator entityGenerator = new EntityGenerator(generatorOptions); + entityGenerator.runGenerate(); + } + } + } diff --git a/spring-scaffold-cli/src/test/java/br/com/command/model/ModelHandlerTest.java b/spring-scaffold-cli/src/test/java/br/com/command/model/ModelHandlerTest.java new file mode 100644 index 0000000..e7e3f75 --- /dev/null +++ b/spring-scaffold-cli/src/test/java/br/com/command/model/ModelHandlerTest.java @@ -0,0 +1,59 @@ +package br.com.command.model; + +import br.com.generate.helpers.ScaffoldInfoHelper; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; +import org.mockito.Mockito; +import org.springframework.boot.cli.command.status.ExitStatus; + +import java.io.File; +import java.io.IOException; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.mock; + +public class ModelHandlerTest { + + @Rule + public TemporaryFolder temporaryFolder = new TemporaryFolder(); + + private File temporaryPath; + + @Before + public void setUp() throws IOException { + temporaryPath = temporaryFolder.newFolder("test-path"); + } + + @Test + public void shouldReturnOk() throws Exception { + ScaffoldInfoHelper scaffoldInfoHelper = mock(ScaffoldInfoHelper.class); + + Mockito.when(scaffoldInfoHelper.getPackage()).thenReturn("com.example"); + Mockito.when(scaffoldInfoHelper.getPathPackage()).thenReturn(temporaryPath.getAbsolutePath().concat("\\com\\example\\")); + + ModelHandler modelHandler = new ModelHandler(scaffoldInfoHelper); + ExitStatus exitStatus = modelHandler.run("-n", "User", "-p", "name:String Foo:references(relation:hasMany, name:String)"); + assertEquals(ExitStatus.OK, exitStatus); + } + + @Test + public void givenNoParameters_shouldReturnError() throws Exception { + ScaffoldInfoHelper scaffoldInfoHelper = mock(ScaffoldInfoHelper.class); + + ModelHandler modelHandler = new ModelHandler(scaffoldInfoHelper); + ExitStatus exitStatus = modelHandler.run("-n", "USer"); + assertEquals(ExitStatus.ERROR, exitStatus); + } + + @Test + public void givenNoClass_shouldReturnError() throws Exception { + ScaffoldInfoHelper scaffoldInfoHelper = mock(ScaffoldInfoHelper.class); + + ModelHandler modelHandler = new ModelHandler(scaffoldInfoHelper); + ExitStatus exitStatus = modelHandler.run("-p", "foo:String"); + assertEquals(ExitStatus.ERROR, exitStatus); + } + +} \ No newline at end of file diff --git a/templates-java/target/classes/br/com/templates/ComposeTemplate.class b/templates-java/target/classes/br/com/templates/ComposeTemplate.class deleted file mode 100644 index 1a4c27ecf3b104753714659a878cabb181a5863c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1103 zcma)5TTc@~6#k|Z7TV<^Hx(~X5G~hLL47D8F~kc=0h1C;e4Exu8QktR+o{2S;j6#E zXJ0h<*Kp?#pzElFkMIET!X05EEeOdO2j26R+^bcgDt=|UI z=1?~TW{c&>tAsVrs9N2ZMm4;xuvQNnYQGH>NE9`LhrTZ`pD!NC*V6N4Q1wbC(m}P* zLYhYVUQstp!AcpZsz623gpoilVd!AwibT-?E37i(A-m~OYTQ?0IIySRt@ z0yAfIoi#pf!e04ERSX9yhT>Llo20*EF{ndtd#_UX^}-=og&mAa=%+_;~DEV(idxD%(TEN{u8zRAOsaKn@OnBKxJlZXv@pOV8sj zxc4r8g7^?0yIlKXupfi8-BtjGFidX%Be;N``0`txq>0TfoggK!vwVUcfp?gokrw!h z-rbdt=zISD_jj8*%~Zf>d?kx1debDBWnxP+!=zLEqen4Di%Bt#3GUXK#6?nFqTLc> hk;_D;h-8ua3CF>eA9Sx0Nb}$tuG319fbET~+#kDM66^o~ diff --git a/templates-java/target/classes/br/com/templates/config/jms_aws_sqs/EntryPointMessageGenerator.class b/templates-java/target/classes/br/com/templates/config/jms_aws_sqs/EntryPointMessageGenerator.class deleted file mode 100644 index 19099132b6a7c0c2cbbe75bde0bc8d9bb450c3f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1056 zcmb7D+iuf95Ivi?b>f;Pq$C9bwB^z|iCRm*15#0igj$4@UZhritu|pvw{q-YZ=n1Y zNDw3*_y9f%F;hF?QlXXy@67DZoO5<&{r$(+ZvY;n<)Db0MHEmk;Fg2ixKqFa+eL>q zmu%d%aZjM!Q=y8biQ?UX(NUNPcPIie_5{)@jd*9E4Z>QI{vfxOo^6tJF0 zuarQktwXgl>~~arAUgr=RN7Hj28S}%9A}%BIo3q?Y)ofVe-KEc5~2%V>z;qoPmbif zja9`L8t{cy1DzP|?V33?HXgWG z#)?4g98revVZ}uQO@WPUP-D>l>>OR@f=LU^jeGNQchVJsf|hbCAt-Pnu(a zs+YDqkYUf?H?apT^kGIwO3I$X%!9l1{~KiEHqh$VXDMfwv2ay$$2^5oNKXq~0#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hUr}mksD_dNeRj=dMl+Ik>!mDdm)EQcs#)^e3&I$3ond7H4C{sCN zM9hZob=n*CvgbF7L0i{r-)E#}o_|!VHN8%~WcO7DM$!+ReOU`>*R@%SRF}AyODz=y zvOzy3dq{0y`&9V>k8Alx@j9PJYn8Q?>RQR}v%663(^&rp@Igqt%GXK!XV6Q7L>v{c z-777Q6($reY+ut7A; zI88V^Ymzo|ufjW2!Fc+`do$!)pD7)w>EaUanG7!{frK6xTqU`l#ti>wNv)Hg;M-hy z0kKf{6^WlnCGa-?&r%ndl)NEH9@8Ucu+C^Rky)P$aUTKKqRq9=?8?6rp`r56SM=Ym~)w&E98ukbCtgj>8G21l{^hK^E0gMnF4X0 kjlPqEDwt8m1%0Ux1<%A4$lzKOoKBGEDnZxtbeX`y-{&VLiU0rr diff --git a/templates-java/target/classes/br/com/templates/config/jms_aws_sqs/SQSPropertiesGenerator.class b/templates-java/target/classes/br/com/templates/config/jms_aws_sqs/SQSPropertiesGenerator.class deleted file mode 100644 index 348f89d3c5b7c37495bde96cb801f40093ebc01b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1517 zcmbVM?NZY~6g^uiX+wavh>9o_zbJ(!euF|)bi{E)#Hr(7XGymum?j~+QF$wM6leV5 z1NcymHz}5k;J}z^vwQE}d(XMMXY=#d_a6Xm;*pL)T*$+~#T+i_xQr_~OvhtIC+AEa zRm|ovr=tc_hlQ&eu4%Z=P-qKJgk1UIi$FQPCmAZM8=+Jf&6N=I(1AIxi zxe}6Sc`c`HZFS@u{$9S3+tO;hY^;ZVAVTE`*<(yp2g1nPvk9nBnOWW9@3`go){5f_ z3eX>autj$dG~A%x{740nVwkRULtXB*t%eF6uf2HC6ZbU`aJ9M4?YF$0G?O5t(-?9s zLi2cs*7b%Tg|>*{8O9GMZpI}H6mZkP5QZ5(>$dAhO_TaH?NBs@ryTA|liRkC@|oDF ze@LExgh@e3>d>%IwCVg!skn0NdL(OtOI5p;Dnv{6Ta!o1ueS(Oq?fj(xgCi})Z*Ui zot;`@nJuT~Yq(|LHs%>l@gQ&=n*azX=pB=R1VLu9Kb>sao(3U4nE%qI9|kbj#?- zsO7_$AG`>ueM{A*27?&M^)N+Wq(S;@F=S#*)2xr?1r+IBB5Q^G85;HKH?ZpLS7bhs zmB9$ThbR`5ouyfxa!-nvYX^?;R#nVu`{Qs&n3}%mebN=FbugCBcc_Z$-W;CMRc*}cS*e4 zdld&Cg*ua=DEJc5c{PqQo7&XeR_B6$;=YXi1InZX`}JiYrW3HRLH1ERR)I*O469c{ z?<6n|9BewUG0*VCzlz>zLF{p!vZF7xg+~syuuU!hQg`5D+d&H+!)~^XylCd%W>~vs zkqnJ|3~#%|02oScvZbwSs*8iEj)XqWmhyq?bB3lnoo~pazJH{ZjQaZtq(zyBd_W^D zXU9eA?(Dbo@7AzRmt3K9XE2iKlV*_aV1eF6vJS{LNZQ_aFt7a$#+NjwO79{{^e(_8 zt%53QWGzp#aT9g2s4hiigx0_k#S+Z-BpJyS?<ARKI-TniRTK53} diff --git a/templates-java/target/classes/br/com/templates/config/openj9/OpenJ9MavenPluginGenerator.class b/templates-java/target/classes/br/com/templates/config/openj9/OpenJ9MavenPluginGenerator.class deleted file mode 100644 index b5f59351ae2b6f9e5b75744002b7143550e2291f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3781 zcmds4druoj5TCOt24fy^O8QJg2&KGy+mO(P`f?IVOhRG<0z}ons^z@45ALPCGX+)s z6#XKt)DpFo+W-5Zs?P2`FxZ@lR7Gkm`EFy}o1OjppWpukfQRrn52J8z7z!{m z1fS+$HV*@EZwNjcfjOAZ!vZW0!IF5F@+hR{faKtF1tyxzVVnjo-|_;}b$kWpst24H zu1yjaQk;=zmn6#y3~Huh2D$=^*H)U}S76|YTW1Q4S51d)w(SGP_vnFzGsUWFP-~xZ zQ_#`mK+rM~Ryl?hFx#_ezKy|58@>{gd zN};AkI@sO1$Bg@!e)_WdP<^10nCup;Gu-Ana}1MR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ppy^@Hql>dZ4rvF{RK;+ BUTgpW diff --git a/templates-java/target/classes/templates/config/openj9/dockerfile-template.txt b/templates-java/target/classes/templates/config/openj9/dockerfile-template.txt deleted file mode 100644 index a9a3202..0000000 --- a/templates-java/target/classes/templates/config/openj9/dockerfile-template.txt +++ /dev/null @@ -1,10 +0,0 @@ -FROM adoptopenjdk/openjdk8-openj9 - -RUN mkdir /opt/shareclasses -RUN mkdir /opt/app - -ADD ../target/*.jar /opt/app.jar - -EXPOSE 8080 - -CMD ["java", "-Xmx512m", "-XX:+IdleTuningGcOnIdle", "-Xtune:virtualized", "-Xscmx512m", "-Xscmaxaot100m", "-Xshareclasses:cacheDir=/opt/shareclasses", "-jar", "/opt/app.jar"] diff --git a/templates-java/target/classes/templates/config/template-entrypoint-listener.txt b/templates-java/target/classes/templates/config/template-entrypoint-listener.txt deleted file mode 100644 index fa1ff45..0000000 --- a/templates-java/target/classes/templates/config/template-entrypoint-listener.txt +++ /dev/null @@ -1,18 +0,0 @@ -package ${package}; - -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.springframework.cloud.aws.messaging.listener.SqsMessageDeletionPolicy; -import org.springframework.cloud.aws.messaging.listener.annotation.SqsListener; - -public class EntryPointMessage implements MessageListener { - - private static final Logger log = LogManager.getLogger(EntryPointMessage.class); - - @Override - @SqsListener(value = "${cloud.aws.sqs.queue-name}", deletionPolicy = SqsMessageDeletionPolicy.ON_SUCCESS) - public void queueListener(String String) { - - } - -} diff --git a/templates-java/target/classes/templates/config/template-message-listener.txt b/templates-java/target/classes/templates/config/template-message-listener.txt deleted file mode 100644 index a020d0b..0000000 --- a/templates-java/target/classes/templates/config/template-message-listener.txt +++ /dev/null @@ -1,5 +0,0 @@ -package ${package}; - -public interface MessageListener { - void queueListener(String String); -} diff --git a/templates-java/target/classes/templates/config/template-producer-message.txt b/templates-java/target/classes/templates/config/template-producer-message.txt deleted file mode 100644 index dda6b28..0000000 --- a/templates-java/target/classes/templates/config/template-producer-message.txt +++ /dev/null @@ -1,39 +0,0 @@ -package ${package}; - -import com.amazonaws.services.sqs.AmazonSQSAsync; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.cloud.aws.messaging.core.QueueMessagingTemplate; -import org.springframework.cloud.aws.messaging.core.SqsMessageHeaders; -import org.springframework.stereotype.Component; - -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - -@Component -public class ProducerMessage { - - @Value("${cloud.aws.sqs.queue-name}") - private String queueName; - - private QueueMessagingTemplate queueMessagingTemplate; - - @Autowired - public ProducerMessage(AmazonSQSAsync amazonSqs) { - this.queueMessagingTemplate = new QueueMessagingTemplate(amazonSqs); - } - - public void sendMessage() { - this.queueMessagingTemplate.convertAndSend(queueName, "YOUR_MESSAGE_OBJECT", getHeader()); - } - - private Map getHeader() { - Map headers = new HashMap<>(); - headers.put(SqsMessageHeaders.SQS_GROUP_ID_HEADER, UUID.randomUUID().toString()); - headers.put(SqsMessageHeaders.SQS_DEDUPLICATION_ID_HEADER, UUID.randomUUID().toString()); - headers.put(SqsMessageHeaders.CONTENT_TYPE, "application/json"); - return headers; - } - -} diff --git a/templates-java/target/test-classes/br/com/templates/config/jms_aws_sqs/EntryPointMessageGeneratorTest.class b/templates-java/target/test-classes/br/com/templates/config/jms_aws_sqs/EntryPointMessageGeneratorTest.class deleted file mode 100644 index f39f77668e2017f6df3d1da8fd3ce01dac8305d6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2835 zcmbtWX;&0i5WUR|^f0u5gBzLz7gY96)Chv22)GWSh#1XcdS)Io4L#jsF9I?CsGJi= zPdF#v@+ChfKOiUfb@wcuAuh?6UaG5Z-MX({z5es>-+l*h0k6^+z=Dd!G}^Gxi7#*? zg`4u_mVCLb;!YZ==*wLd*)+Pakj4`3$){x%_tWUXLJAL3SdotprF~V!qcjd;OL z_ixg8f~RSGi|%jR4?@04{v{^02) zVO4~yXIs2y6!b_p$2HuY8;(_w04K7JThuoK+w^reu!N_}6iqIS>R$;V46n3gROoP2 z{A&RUuGJDX*8Y+Vqa=ybvZIwhF#Pj`mSjgXId?@Qmv-Wh}G_k z1Y8k*;M((!?Xx^CJXy=9$Sev{{jg)2b2Qu*w<{v=OSkkxCvfxeN}PKCT2Dws4MP}K zFz|tv*KiW2*tb4=WV|k}hCB)y&fu(qk&oYX8jj;^V9SSTx)ZQ=My-66HIH8`kfcn(*Er@=>{ z;)RASY%7>-nmI9YO{?*+Z7Xu$jaw!s6*nD)^!y2b+t;vzpESJ0&kC;pKaR4k*l3Mr zS+H@KTZ6DQ8?<@&}}&}oaU+T1%i)Y@aik*P7Lv>Hsb*?Wq@pUZiU75E|=Z3l+p zn0H&Xn^R?h+)O(hlL`**m5rk>Q3=R)s`+bFLi3)AEzOx?lY%a0x?3M2nHVT+7&$@Y zcpd%dfh4`V+`x_}l^k!i`Wl*ah;6PYCoqTiQw2w&qhsAQ%3{lLH+g(`{=DHaIBj^I zaQ#(R&bQ>yQwbk#J%jyQ67tw8^9-pS439Yanl+7`_Ku5KE;d~-doZ@wm&mFv<=DkhM z3*M7_=j`Eigm1HqQh4tjc>`r+7i~}8An_W>U&4q{Ughrv(8svL7~_)``C}Xtd{dwk zD-mMdjj{SiMt(&y(_Tf#Yp4WG5w!C)(hbmVx`MR#k@yjkZUFbkz+dvar2198h;w1O z^YwIp5Tl*8xm|QIftDR*TD6LORdny7ho;`8vCRHVri#ADqhnPZ*u}voqi=BN-gp&< zr<483DvrEGzoeCbtn~~!c^%{r&uLbC7RRX6AQKMr>p2peV$IiBv7~z;N*>cq;Sw!h zlkhR3T*M?*JI6n)DcTdfc4C@%Nz5=(Dj0cPrdMmBSLnl`SugZ2BB->j{P#lN;^=fc z^kK1B}GtYd~xS8$b_?y&v`mM&vU*LrR diff --git a/templates-java/target/test-classes/br/com/templates/config/jms_aws_sqs/MessageListenerGeneratorTest.class b/templates-java/target/test-classes/br/com/templates/config/jms_aws_sqs/MessageListenerGenerat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S_4>}}{(kBJ5Yiagh-=5FdvWks*k z;dm{8oj3Tgi9E`oV7^(V_1!<9eddmD`W+m5lj6O4ljcjEh~@%QRX5AI2d-_H<;$Ix zdC64UOoU7i2IQ>?*R#z<%Va+;KRGeWRbUn+$-F-+?KN6%%e!?^bfug6!1C;3_!WlV z_LZk(J`JN7Q*i1Xqpsl$&T?K|PRC?KtcD^=8qVRog6#Y6HVvmStl(T2@s4pwLTK1T zSwjVeg2O%w?c>0nM_$zR;x@YP6RX^q69&DRgH>J4b6QFtwCPYo-bIcYj&93kAojdaekx z?8s;s^X7#1QAn1E%`kmkRB-g5YSg+|-6PtW_P0R`?OQ3dv{wpE3VK=TPNW;@Fp)ng zQZ%HVj=#4CN$+0UGecpKiq`C}#YsZ!QhzA9RO=@crQodCwDp?UvFvT07mmBAI}BEJ z#}T%>Zc9mvk3Ny<{XM61a4SNdQ#BqM&6D6E)lQxu6x5RBd)*3DMM3jhH9@p95h{-Y zt^GXYMr-FZbUHXLK)L+P(`EVd2gDsPDH|B(VSkE$1Tmic+}d0bD9-Xa!gYf8PkHZ> zLcx2S&lDYAvwWIol*0Q!_7#-uKDr*iLhL2tzxom5yvqLxAkDaAnBYna{4t3sJ}JmC zSIp0KC(M<}W`9FG-Q7UqC6Y{DY=%;C5Wg>kzoo-<8(fC9INA_{_@%SqoyF1yy zN3-!vyn*Adk&&=skiDKm53gtWhckjfJ`Itv5udFrrs*+5pjQb{!o3g_580CCuX}z zkD4B8;N#guCXwlWjgzg;r}*awlAR*zL3T34UPjo*7_m>YhZ!Qjf;rqKuKQd`25ttZ rA_i_p3|x#DI2|!?B4pqS^Isv0-OQE30#}JPR%GPcSh>c!U0D1Vje*(7 diff --git a/templates-java/target/test-classes/br/com/templates/config/jms_aws_sqs/SQSDependencyGeneratorTest.class b/templates-java/target/test-classes/br/com/templates/config/jms_aws_sqs/SQSDependencyGeneratorTest.class deleted file mode 100644 index d5101c8a8bfcd3ddb2818d048b0fb06df21883f6..0000000000000000000000000000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JbE8{sU(9sa< zjO{PtKoMOXk?Q+>JYH4SjV8u8N@mAc%j4)Ew=VMPA=?2eI7#kFvX=^n0zMUmiBMq| qR|ADT^a&IW5aBFFso^B{VvKJMCDql^$^A1-)N%e4oa3_&=l=l(ZU!^} diff --git a/templates-java/target/test-classes/br/com/templates/config/openj9/OpenJ9DockerfileGeneratorTest.class b/templates-java/target/test-classes/br/com/templates/config/openj9/OpenJ9DockerfileGeneratorTest.class deleted file mode 100644 index 1044aa9fa05ad9423edbd2314570924271ebd29b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2378 zcmbVN>sA|86#fnbCJe)+P?Vsyf)+x!Or=Fjid4#_whb2{pw#OmIV3}qnRw>J(g*N? zblJd?wR`{{%H=*YlL;6UmVeG|_Wt&_uk+_$zyAT?K8|!Gkk;@}M;p>z7{+28pQ_7} zx;)bGnT~kyWm&^x9o`_LY7ymWlQob_aqk#)0vzw^KQkI;Rnww@p6?5Gt(mdkfBeBxxx~!*WGeK0gPr` zQ8bTgjx9}5D|63OCeDeFR$`~-NV~%KZO_h?`Lg4<(vr68cntmL^mj;~#Cswm+mg+~Tx2aWLmp?`yj9+}gstx3 zV@#H8vb)skc;0mm?V{;cxpTB&ZqfE^Vb#sQO*KH&}*mUM**9kJ~2xZJBU=xfJ$ zUiH1vuk0IT_X(siWz7cXvIeRfLp~r)P6FXeigtOv0k~mP<30j?kXI@Yd z@bgu+oT9lah3ymxwjs85T;+MG#PnUaCh}o4#{M(hvkK6_7(QUQeMP+)co*+c(MU?u zOcVeES?n2jAEOMZ>zBNN5xm1N9%@{X7Y+LczQk7s4)B8EL5rPhWmKFJcy=dX0RigC}R@u{3aqqJa`@hQE4)xg$y_ z!(gLHpKe7R!O-RKSB+6ImTWDI$$$2?(SQlMq_4>3a?W$hHOYf%a5EX|T&%BNYR6UL zW;_05VHmp18cmC-Yj>HNE#0E#gzcxAqG9{oEaJzuCuyM2ETWtb2b1tnSQY-t6)$NT zdUD0`NLj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x`P1@p zl@nJsW4waCrv40PW0_{+ppIUyTFTp9&C1supM3>%^A$S8r)mqIr0n$kC)D`hx`+SU z_}$CzCN($s&2Y~d#C1P+2PwrigUHKxHTtnu=NMe|)dgub%DR&1(_|J&> zaR85TC#Yc`btqk@5?x*W{U0NfYptQ}8Z;`+Qt9Sv&>Kp(k`;7(3tzB1u(L^VSEBe3 z&y}l(>p_f0=8n|O{f|0YNqg!h+G)VZ574Yu!>d^NP8Ih3 zD(oA0V7Qeq>bVDN*freN)t2kc_0>Qm2fA7t|8HQhfz8A88LX)+J=(@f=ptg>L}8H8 zKSYFv8O33YGTI}IbsS|PpfEZSdtJw9KEbFP6A4Dc#PK*LiP2$V9Ak8xSvZ5U#CHmJ d@pqQ^q`1YBDQ=DOQ8lbko90hohU+Gr`wZ8hyrBR9 diff --git a/templates-java/target/test-classes/br/com/templates/entity/EntityGeneratorTest.class b/templates-java/target/test-classes/br/com/templates/entity/EntityGeneratorTest.class deleted file mode 100644 index 671bc926ef4737f5ec20c8c21ba483c858956fe1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4925 zcmbW3`EwLS6vtmDfpj(#2pb4TKvzX_;wmCS!j*&|=x)#uf_UNVZfAGG?#wbX8xkSn ziTC}3#}6KVf>nx^R{00`M_GP*uAL3NW!zL{XQunT_jyP6>;C(nKmH=3!}Mi>#_0J@ zx{{zadcKQB=><+Na(ao=%W~+I1YM<96Qom)Q(le~I0;URoQj-Ea=_rU#OWHRGN%eB zlas}%%IP{Mo0G%I|%PU2ItaKV$re%6q8QLs+9}Vwm?vRER1@@N>$`tQCQH+ zHP6!}eOXVJb+eeh=-P%^gl3N|+?s7hLcKBbfmb_x<8z+i%t~HVr7MhhX#c+x3lEHf ztO1B)MPpf*^Q%=cU((%K%bi&<9M`$(Q_h>q)-@5M?2gkf8*XV%pmKgLdX{BmlXkII zK^+6oLCgLF!RE>dZQ%5*_le!U2Rt2W&y(kS&z^Lqr)D- z&%=~(ZwO&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templates/helper/LoadTemplateTester.class b/templates-java/target/test-classes/br/com/templates/helper/LoadTemplateTester.class deleted file mode 100644 index ddcfac8f2bf77f35d7eed6e6999fc49b5d1ccb19..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 889 zcma)4%Wl&^6g`tTvE#ZA5=wa$D36l3Dc-O^3PM5^m5@w}XxjbQ9mP}mC3}MSEZ7vp zf)C)M5O?f^Mnp*1^1YrjbI!eUW`6$q{sX{s3~iXWt-~D~cd>2Zo{jr>U}DF_Lx%QC znM(DFq1hjtF&GEgxnNlLWh#!QNg#?b4`M>Peirihj2BXmXP}`XSuza$pzy*h@svpN zm@83wk%)6qcz(vu$1`v&N+pUBgA*^H47+{*f`8;*%+rZ?q6(Q#MuTODcysypTt&L0 zB^pCRrVN|)jLf{ZX+Bk?DR@GKJ1P=&0S5ccr%>cdW@%~S5sgo>X%UJ;sW-c|-1jqG z%z=fDgU5JcV%Nb_^ch;G@m3i?*+rg)fSF}3lS=YUIppikN>pDU`>QN zhcmpn+|JQV_Aia)BU`MxrRdhInIiFV ejXt_O^!9L_n7YCyVNKj1wn1}S^xdpfZ~X@0z}Z0n diff --git a/templates-java/target/test-classes/templates/config/fake-application.properties b/templates-java/target/test-classes/templates/config/fake-application.properties deleted file mode 100644 index aaf084c..0000000 --- a/templates-java/target/test-classes/templates/config/fake-application.properties +++ /dev/null @@ -1 +0,0 @@ -my-var=my-value \ No newline at end of file diff --git a/templates-java/target/test-classes/templates/config/openj9/dockerfile-template-test.txt b/templates-java/target/test-classes/templates/config/openj9/dockerfile-template-test.txt deleted file mode 100644 index a9a3202..0000000 --- a/templates-java/target/test-classes/templates/config/openj9/dockerfile-template-test.txt +++ /dev/null @@ -1,10 +0,0 @@ -FROM adoptopenjdk/openjdk8-openj9 - -RUN mkdir /opt/shareclasses -RUN mkdir /opt/app - -ADD ../target/*.jar /opt/app.jar - -EXPOSE 8080 - -CMD ["java", "-Xmx512m", "-XX:+IdleTuningGcOnIdle", "-Xtune:virtualized", "-Xscmx512m", "-Xscmaxaot100m", "-Xshareclasses:cacheDir=/opt/shareclasses", "-jar", "/opt/app.jar"] diff --git a/templates-java/target/test-classes/templates/config/openj9/template-pom-test.xml b/templates-java/target/test-classes/templates/config/openj9/template-pom-test.xml deleted file mode 100644 index 847bc58..0000000 --- a/templates-java/target/test-classes/templates/config/openj9/template-pom-test.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.cloud - spring-cloud-aws-messaging - 2.1.1.RELEASE - - - org.springframework.cloud - spring-cloud-starter-aws - 2.1.1.RELEASE - - - - - - - org.apache.maven.plugins - maven-shade-plugin - 2.4.3 - - - org.springframework.boot - spring-boot-maven-plugin - 2.1.5.RELEASE - - - - - package - - shade - - - - - META-INF/spring.handlers - - - META-INF/spring.factories - - - META-INF/spring.schemas - - - - br.com.example.DemoApplication - - - - - - - false - - - - \ No newline at end of file diff --git a/templates-java/target/test-classes/templates/config/template-entrypoint-listener-test.txt b/templates-java/target/test-classes/templates/config/template-entrypoint-listener-test.txt deleted file mode 100644 index a7ebc66..0000000 --- a/templates-java/target/test-classes/templates/config/template-entrypoint-listener-test.txt +++ /dev/null @@ -1,18 +0,0 @@ -package br.com.example; - -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.springframework.cloud.aws.messaging.listener.SqsMessageDeletionPolicy; -import org.springframework.cloud.aws.messaging.listener.annotation.SqsListener; - -public class EntryPointMessage implements MessageListener { - - private static final Logger log = LogManager.getLogger(EntryPointMessage.class); - - @Override - @SqsListener(value = "${cloud.aws.sqs.queue-name}", deletionPolicy = SqsMessageDeletionPolicy.ON_SUCCESS) - public void queueListener(String String) { - - } - -} diff --git a/templates-java/target/test-classes/templates/config/template-message-listener-test.txt b/templates-java/target/test-classes/templates/config/template-message-listener-test.txt deleted file mode 100644 index 6b27063..0000000 --- a/templates-java/target/test-classes/templates/config/template-message-listener-test.txt +++ /dev/null @@ -1,5 +0,0 @@ -package br.com.example; - -public interface MessageListener { - void queueListener(String String); -} diff --git a/templates-java/target/test-classes/templates/config/template-pom-test.xml b/templates-java/target/test-classes/templates/config/template-pom-test.xml deleted file mode 100644 index ca321db..0000000 --- a/templates-java/target/test-classes/templates/config/template-pom-test.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.cloud - spring-cloud-aws-messaging - 2.1.1.RELEASE - - - org.springframework.cloud - spring-cloud-starter-aws - 2.1.1.RELEASE - - \ No newline at end of file diff --git a/templates-java/target/test-classes/templates/config/template-pom.xml b/templates-java/target/test-classes/templates/config/template-pom.xml deleted file mode 100644 index c9c1d6b..0000000 --- a/templates-java/target/test-classes/templates/config/template-pom.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - org.springframework.boot - spring-boot-starter-web - - - - - - - \ No newline at end of file diff --git a/templates-java/target/test-classes/templates/config/template-producer-message-test.txt b/templates-java/target/test-classes/templates/config/template-producer-message-test.txt deleted file mode 100644 index 2156c06..0000000 --- a/templates-java/target/test-classes/templates/config/template-producer-message-test.txt +++ /dev/null @@ -1,39 +0,0 @@ -package br.com.example; - -import com.amazonaws.services.sqs.AmazonSQSAsync; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.cloud.aws.messaging.core.QueueMessagingTemplate; -import org.springframework.cloud.aws.messaging.core.SqsMessageHeaders; -import org.springframework.stereotype.Component; - -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - -@Component -public class ProducerMessage { - - @Value("${cloud.aws.sqs.queue-name}") - private String queueName; - - private QueueMessagingTemplate queueMessagingTemplate; - - @Autowired - public ProducerMessage(AmazonSQSAsync amazonSqs) { - this.queueMessagingTemplate = new QueueMessagingTemplate(amazonSqs); - } - - public void sendMessage() { - this.queueMessagingTemplate.convertAndSend(queueName, "YOUR_MESSAGE_OBJECT", getHeader()); - } - - private Map getHeader() { - Map headers = new HashMap<>(); - headers.put(SqsMessageHeaders.SQS_GROUP_ID_HEADER, UUID.randomUUID().toString()); - headers.put(SqsMessageHeaders.SQS_DEDUPLICATION_ID_HEADER, UUID.randomUUID().toString()); - headers.put(SqsMessageHeaders.CONTENT_TYPE, "application/json"); - return headers; - } - -} diff --git a/templates/src/main/java/br/com/templates/entity/EntityCache.java b/templates/src/main/java/br/com/templates/entity/EntityCache.java new file mode 100644 index 0000000..8f8d692 --- /dev/null +++ b/templates/src/main/java/br/com/templates/entity/EntityCache.java @@ -0,0 +1,28 @@ +package br.com.templates.entity; + +public class EntityCache { + + private String name; + private String content; + + public EntityCache(String name, String content) { + this.name = name; + this.content = content; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } +} diff --git a/templates/src/main/java/br/com/templates/entity/EntityExecutor.java b/templates/src/main/java/br/com/templates/entity/EntityExecutor.java new file mode 100644 index 0000000..330cb64 --- /dev/null +++ b/templates/src/main/java/br/com/templates/entity/EntityExecutor.java @@ -0,0 +1,138 @@ +package br.com.templates.entity; + +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static java.util.Arrays.asList; + +public class EntityExecutor { + + private static final List supportedTypes = asList("String", "Int", "Date"); + private List entities; + + public String run(String nameClass, String argumentValue) { + entities = new ArrayList<>(); + String generatedClass = this.generateClass(nameClass); + + argumentValue = toPatternScaffold(argumentValue); + String[] attributes = argumentValue.split(" "); + + StringBuilder attributeToReplace = new StringBuilder(); + for (int i = 0; i < attributes.length; i++) { + String attribute = generateAttribute(attributes[i]); + attributeToReplace.append("\t".concat(attribute.concat("\n"))); + } + + generatedClass = generatedClass.replace("${attributes}", attributeToReplace.toString()); + entities.add(new EntityCache(nameClass, generatedClass)); + return generatedClass; + } + + public String generateAttribute(String attribute) { + if (attribute.contains("references")) { + String relationship = generateRelationship(attribute); + if (relationship != null) return relationship; + } + + validateTokenAtrribute(attribute); + String[] splitAttribute = attribute.split(":"); + validateTypes(splitAttribute[1]); + + if (attribute.contains("Int")) return "private Integer ".concat(splitAttribute[0]).concat(";"); + if (attribute.contains("Date")) return "private Date ".concat(splitAttribute[0]).concat(";"); + if (attribute.contains("String")) return "private String ".concat(splitAttribute[0]).concat(";"); + + return null; + } + + private String generateRelationship(String attribute) { + String attributesOfReferences = getAttributesOfReferences(attribute); + String[] attributes = attributesOfReferences.split(","); + + String classIdentify = attribute.replace(attributesOfReferences, ""); + String[] indentifySplit = classIdentify.split(":"); + + String clazzName = indentifySplit[0]; + String relation = attributes[0].split(":")[1]; + + generateRelationshipClass(attributes, clazzName); + + if (relation.equals("hasMany")) + return ("\t\n" + + "\t@OneToMany\n"+ + "\tprivate List<").concat(clazzName).concat(">").concat(" ".concat(clazzName.toLowerCase()).concat(";")); + if (relation.equals("belongsTo")) + return ("\t\n" + + "\t@OneToOne\n" + + "\tprivate ").concat(clazzName).concat(" ".concat(clazzName.toLowerCase()).concat(";")); + return null; + } + + private void generateRelationshipClass(String[] attributes, String clazzName) { + String generatedClass = this.generateClass(clazzName); + StringBuilder attributeToReplace = new StringBuilder(); + for (int i = 1; i < attributes.length; i++) { + String attributeOfRelation = generateAttribute(attributes[i]); + attributeToReplace.append("\t".concat(attributeOfRelation.concat("\n"))); + } + + generatedClass = generatedClass.replace("${attributes}", attributeToReplace.toString()); + if (entities != null) entities.add(new EntityCache(clazzName, generatedClass)); + } + + private void validateTypes(String o) { + if (!supportedTypes.contains(o)) + throw new EntityValidator(o.concat(" not supported.")); + } + + private void validateTokenAtrribute(String attribute) { + if (!attribute.contains(":")) throw new EntityValidator("attribute should contains ':' "); + } + + public String generateClass(String nameClass) { + return "" + + "@Data\n" + + "public class ".concat(nameClass).concat(" {\n") + + "${attributes}" + + "}"; + } + + public String getAttributesOfReferences(String attributes) { + Pattern pattern = Pattern.compile("\\((.*?)\\)"); + Matcher matcher = pattern.matcher(attributes); + String result = ""; + if (matcher.find()) { + result = matcher.group(1); + } + return result; + } + + public String getRelation(String attributes) { + String[] splitAttributes = attributes.split(" "); + String[] splitRelation = splitAttributes[0].split(":"); + return splitRelation[1]; + } + + public List getReferencesComplete(String attributes) { + String attributesConverted = toPatternScaffold(attributes); + String[] attributesSplited = attributesConverted.split(" "); + + List attributesToReturn = new ArrayList<>(); + for (int i = 0; i < attributesSplited.length; i++) { + if (attributesSplited[i].contains("references")) { + attributesToReturn.add(attributesSplited[i]); + } + } + return attributesToReturn; + } + + public String toPatternScaffold(String attributes) { + return attributes.replace(", ", ","); + } + + public List getEntities() { + return entities; + } +} diff --git a/templates/src/main/java/br/com/templates/entity/EntityGenerator.java b/templates/src/main/java/br/com/templates/entity/EntityGenerator.java index 0609ccc..48b4e33 100644 --- a/templates/src/main/java/br/com/templates/entity/EntityGenerator.java +++ b/templates/src/main/java/br/com/templates/entity/EntityGenerator.java @@ -1,132 +1,22 @@ package br.com.templates.entity; -import java.util.ArrayList; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; +import br.com.generator.core.Generator; +import br.com.generator.core.GeneratorOptions; -import static java.util.Arrays.asList; +import java.io.File; +import java.io.IOException; -public class EntityGenerator { +public class EntityGenerator extends Generator { - private static final List supportedTypes = asList("String", "Int", "Date"); + private GeneratorOptions generatorOptions; - public String run(String nameClass, String argumentValue) { -// if (argumentValue.contains("references")) { -// return "" + -// "@Data\n" + -// "class User {\n" + -// " private String name;\n" + -// " private Integer age;\n" + -// " private List foo;\n" + -// "}\n"; -// } - - String generatedClass = this.generateClass(nameClass); - - argumentValue = toPatternScaffold(argumentValue); - String[] attributes = argumentValue.split(" "); - - StringBuilder attributeToReplace = new StringBuilder(); - for (int i = 0; i < attributes.length; i++) { - String attribute = generateAttribute(attributes[i]); - attributeToReplace.append("\t".concat(attribute.concat("\n"))); - } - - generatedClass = generatedClass.replace("${attributes}", attributeToReplace.toString()); - - return generatedClass; - } - - public String generateAttribute(String attribute) { - if (attribute.contains("references")) { - String attributesOfReferences = getAttributesOfReferences(attribute); - String[] attributes = attributesOfReferences.split(","); - - String classIdentify = attribute.replace(attributesOfReferences, ""); - String[] indentifySplit = classIdentify.split(":"); - - String clazzName = indentifySplit[0]; - String relation = attributes[0].split(":")[1]; - if (relation.equals("hasMany")) return "private List<".concat(clazzName).concat(">").concat(" ".concat(clazzName.toLowerCase()).concat(";")); - if (relation.equals("belongsTo")) return "private ".concat(clazzName).concat(" ".concat(clazzName.toLowerCase()).concat(";")); - } - - if (!attribute.contains(":")) throw new EntityValidator("attribute should contains ':' "); - String[] splitAttribute = attribute.split(":"); - if (!supportedTypes.contains(splitAttribute[1])) throw new EntityValidator(splitAttribute[1].concat(" not supported.")); - - if (attribute.contains("Int")) return "private Integer ".concat(splitAttribute[0]).concat(";"); - if (attribute.contains("Date")) return "private Date ".concat(splitAttribute[0]).concat(";"); - if (attribute.contains("String")) return "private String ".concat(splitAttribute[0]).concat(";"); - - return null; - } - - public String generateClass(String nameClass) { - return "" + - "@Data\n" + - "public class ".concat(nameClass).concat(" {\n")+ - "${attributes}" + - "}"; - } - - public Boolean metodoReturnTrue() { - return true; - } - - public String getAttributesOfReferences(String attributes) { - Pattern pattern = Pattern.compile("\\((.*?)\\)"); - Matcher matcher = pattern.matcher(attributes); - String result = ""; - if (matcher.find()) { - result = matcher.group(1); - } - return result; - } - - public String getRelation(String attributes) { - String[] splitAttributes = attributes.split(" "); - String[] splitRelation = splitAttributes[0].split(":"); - return splitRelation[1]; - } - - public List getReferencesComplete(String attributes) { - String attributesConverted = toPatternScaffold(attributes); - String[] attributesSplited = attributesConverted.split(" "); - - List attributesToReturn = new ArrayList<>(); - for (int i = 0; i < attributesSplited.length; i++) { - if (attributesSplited[i].contains("references")){ - attributesToReturn.add(attributesSplited[i]); - } - } - return attributesToReturn; + public EntityGenerator(GeneratorOptions generatorOptions) { + this.generatorOptions = generatorOptions; } - public String toPatternScaffold(String attributes) { - return attributes.replace(", ", ","); - } - - class RelationShip { - - String nameClass; - String attributes; - - public String getNameClass() { - return nameClass; - } - - public void setNameClass(String nameClass) { - this.nameClass = nameClass; - } - - public String getAttributes() { - return attributes; - } - - public void setAttributes(String attributes) { - this.attributes = attributes; - } + @Override + public File runGenerate() throws IOException { + this.generatorOptions.setTemplatePath("/templates.entity/entity-template.txt"); + return generate(this.generatorOptions); } } diff --git a/templates/src/main/resources/templates.entity/entity-template.txt b/templates/src/main/resources/templates.entity/entity-template.txt new file mode 100644 index 0000000..1fcf5ab --- /dev/null +++ b/templates/src/main/resources/templates.entity/entity-template.txt @@ -0,0 +1,3 @@ +package ${package}; + +${content} \ No newline at end of file diff --git a/templates/src/test/java/br/com/templates/entity/EntityCacheTest.java b/templates/src/test/java/br/com/templates/entity/EntityCacheTest.java new file mode 100644 index 0000000..4bd3ff2 --- /dev/null +++ b/templates/src/test/java/br/com/templates/entity/EntityCacheTest.java @@ -0,0 +1,61 @@ +package br.com.templates.entity; + +import org.junit.Before; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + +public class EntityCacheTest { + + private EntityExecutor entityExecutor; + + @Before + public void setUp() { + entityExecutor = new EntityExecutor(); + } + + @Test + public void shouldReturnTwoEntities() { + String valueArgument = "name:String age:Int Foo:references(relation:hasMany, foo:String)"; + entityExecutor.run("User", valueArgument); + assertEquals(2, entityExecutor.getEntities().size()); + } + + @Test + public void shouldReturnContentOfUser() { + String valueArgument = "name:String age:Int Foo:references(relation:hasMany, foo:String)"; + entityExecutor.run("User", valueArgument); + + String expectedValue = "" + + "@Data\n" + + "public class User {\n" + + "\tprivate String name;\n" + + "\tprivate Integer age;\n" + + "\t\t\n" + + "\t@OneToMany\n" + + "\tprivate List foo;\n" + + "}\n"; + assertEquals(expectedValue.trim(), entityExecutor.getEntities().get(1).getContent()); + } + + @Test + public void shouldReturnContentOfFoo() { + String valueArgument = "name:String age:Int Foo:references(relation:hasMany, foo:String)"; + entityExecutor.run("User", valueArgument); + + String expectedValue = "" + + "@Data\n" + + "public class Foo {\n" + + "\tprivate String foo;\n" + + "}\n"; + assertEquals(expectedValue.trim(), entityExecutor.getEntities().get(0).getContent()); + } + + @Test + public void shouldReturnThreeCount() { + String valueArgument = "name:String age:Int Foo:references(relation:hasMany, foo:String) Bar:references(relation:belongsTo, bar:String)"; + entityExecutor.run("User", valueArgument); + assertEquals(3, entityExecutor.getEntities().size()); + } + +} diff --git a/templates/src/test/java/br/com/templates/entity/EntityGeneratorTest.java b/templates/src/test/java/br/com/templates/entity/EntityExecutorTest.java similarity index 61% rename from templates/src/test/java/br/com/templates/entity/EntityGeneratorTest.java rename to templates/src/test/java/br/com/templates/entity/EntityExecutorTest.java index a3cd7b6..1b86ba1 100644 --- a/templates/src/test/java/br/com/templates/entity/EntityGeneratorTest.java +++ b/templates/src/test/java/br/com/templates/entity/EntityExecutorTest.java @@ -7,13 +7,13 @@ import static org.junit.Assert.assertEquals; -public class EntityGeneratorTest { +public class EntityExecutorTest { - private EntityGenerator entityGenerator; + private EntityExecutor entityExecutor; @Before public void setUp() { - entityGenerator = new EntityGenerator(); + entityExecutor = new EntityExecutor(); } @Test @@ -25,32 +25,51 @@ public void shouldCreateEntity() { "\tprivate Integer age;\n" + "}\n"; - String returnedValue = entityGenerator.run("User", "name:String age:Int"); + String returnedValue = entityExecutor.run("User", "name:String age:Int"); assertEquals(expectedValue.trim(), returnedValue.trim()); } @Test(expected = EntityValidator.class) public void shouldReturnException() { - entityGenerator.generateAttribute("name"); + entityExecutor.generateAttribute("name"); } @Test(expected = EntityValidator.class) public void givenTypeThatNotExists_shouldInvokeException() { - entityGenerator.generateAttribute("name:OtherType"); + entityExecutor.generateAttribute("name:OtherType"); } @Test - public void shouldReturnWithRelations() { + public void givenRelationHasMany_shouldReturnWithRelation() { String expectedValue = "" + "@Data\n" + "public class User {\n" + "\tprivate String name;\n" + "\tprivate Integer age;\n" + + "\t\t\n" + + "\t@OneToMany\n" + "\tprivate List foo;\n" + "}\n"; String valueArgument = "name:String age:Int Foo:references(relation:hasMany, foo:String)"; - String returnedValue = entityGenerator.run("User", valueArgument); + String returnedValue = entityExecutor.run("User", valueArgument); + assertEquals(expectedValue.trim(), returnedValue.trim()); + } + + @Test + public void givenRelationBelongsTo_shouldReturnWithRelation() { + String expectedValue = "" + + "@Data\n" + + "public class User {\n" + + "\tprivate String name;\n" + + "\tprivate Integer age;\n" + + "\t\t\n" + + "\t@OneToOne\n" + + "\tprivate Foo foo;\n" + + "}\n"; + + String valueArgument = "name:String age:Int Foo:references(relation:belongsTo, foo:String)"; + String returnedValue = entityExecutor.run("User", valueArgument); assertEquals(expectedValue.trim(), returnedValue.trim()); } @@ -62,7 +81,7 @@ public void shouldGenerateClass() { "${attributes}" + "}"; - String returned = entityGenerator.generateClass("User"); + String returned = entityExecutor.generateClass("User"); assertEquals(expectedValue, returned); } @@ -74,111 +93,125 @@ public void shouldGenerateClassWithCorrectName() { "${attributes}" + "}"; - String returned = entityGenerator.generateClass("Foo"); + String returned = entityExecutor.generateClass("Foo"); assertEquals(expectedValue, returned); } @Test public void shouldGenerateStringAttribute() { String attributes = "name:String"; - String valueReturned = entityGenerator.generateAttribute(attributes); + String valueReturned = entityExecutor.generateAttribute(attributes); assertEquals("private String name;", valueReturned); } @Test public void shouldGeneratorIntegerAttribute() { String attributes = "age:Int"; - String valueReturned = entityGenerator.generateAttribute(attributes); + String valueReturned = entityExecutor.generateAttribute(attributes); assertEquals("private Integer age;", valueReturned); } @Test public void shouldGeneratorDateAttribute() { String attributes = "created:Date"; - String valueReturned = entityGenerator.generateAttribute(attributes); + String valueReturned = entityExecutor.generateAttribute(attributes); assertEquals("private Date created;", valueReturned); } @Test public void shouldReturnCorrectNameStringAttribute() { String attributes = "description:String"; - String valueReturned = entityGenerator.generateAttribute(attributes); + String valueReturned = entityExecutor.generateAttribute(attributes); assertEquals("private String description;", valueReturned); } @Test public void shouldReturnCorrectNameIntegerAttribute() { String attributes = "count:Int"; - String valueReturned = entityGenerator.generateAttribute(attributes); + String valueReturned = entityExecutor.generateAttribute(attributes); assertEquals("private Integer count;", valueReturned); } @Test public void shouldReturnCorrectNameDateAttribute() { String attributes = "updated:Date"; - String valueReturned = entityGenerator.generateAttribute(attributes); + String valueReturned = entityExecutor.generateAttribute(attributes); assertEquals("private Date updated;", valueReturned); } @Test public void shouldReturnHasManyRelation() { String attributes = "Foo:references(relation:hasMany, foo:String)"; - String valueReturned = entityGenerator.generateAttribute(attributes); - assertEquals("private List foo;", valueReturned); + String valueReturned = entityExecutor.generateAttribute(attributes); + + String expectedValue = "\t\n" + + "\t@OneToMany\n" + + "\tprivate List foo;"; + assertEquals(expectedValue, valueReturned); } @Test public void shouldReturnBelongsToRelation() { String attributes = "Foo:references(relation:belongsTo, foo:String)"; - String valueReturned = entityGenerator.generateAttribute(attributes); - assertEquals("private Foo foo;", valueReturned); + String valueReturned = entityExecutor.generateAttribute(attributes); + + String expectedValue = "\t\n" + + "\t@OneToOne\n" + + "\tprivate Foo foo;"; + + assertEquals(expectedValue, valueReturned); } @Test(expected = EntityValidator.class) public void givenReferences_wheRelationEmpty_shouldInvokeException() { String attributes = "Foo:references(foo:String)"; - entityGenerator.generateAttribute(attributes); + entityExecutor.generateAttribute(attributes); } @Test public void shouldReturnCorrectNameHasNameRelation() { String attributes = "Books:references(relation:hasMany, foo:String)"; - String valueReturned = entityGenerator.generateAttribute(attributes); - assertEquals("private List books;", valueReturned); + String valueReturned = entityExecutor.generateAttribute(attributes); + + String expectedValue = "\t\n" + + "\t@OneToMany\n" + + "\tprivate List books;"; + + assertEquals(expectedValue, valueReturned); } @Test public void givenStringBetweenParentheses_shouldReturnAttributes() { String attributes = "Foo:references(relation:belongsTo foo:String)"; - String getAttributesReferences = entityGenerator.getAttributesOfReferences(attributes); + String getAttributesReferences = entityExecutor.getAttributesOfReferences(attributes); assertEquals("relation:belongsTo foo:String", getAttributesReferences); } @Test public void shouldReturnRelation() { String attributes = "relation:belongsTo foo:String"; - String getAttributesReferences = entityGenerator.getRelation(attributes); + String getAttributesReferences = entityExecutor.getRelation(attributes); assertEquals("belongsTo", getAttributesReferences); } @Test public void shouldReturnScaffoldPattern() { String attributes = "name:String age:Int Foo:references(relation:hasMany, foo:String)"; - String returnConverted = entityGenerator.toPatternScaffold(attributes); + String returnConverted = entityExecutor.toPatternScaffold(attributes); assertEquals("name:String age:Int Foo:references(relation:hasMany,foo:String)", returnConverted); } @Test public void shouldReturnReferencesAttributeComplete() { String attributes = "name:String age:Int Foo:references(relation:hasMany, foo:String)"; - List getAttributesReferences = entityGenerator.getReferencesComplete(attributes); + List getAttributesReferences = entityExecutor.getReferencesComplete(attributes); assertEquals("Foo:references(relation:hasMany,foo:String)", getAttributesReferences.get(0)); } @Test public void shouldReturnReferencesAttributes() { String attributes = "name:String age:Int Foo:references(relation:hasMany, foo:String) Books:references(relation:belongsTo, foo:String)"; - List getAttributesReferences = entityGenerator.getReferencesComplete(attributes); + List getAttributesReferences = entityExecutor.getReferencesComplete(attributes); assertEquals("Foo:references(relation:hasMany,foo:String)", getAttributesReferences.get(0)); assertEquals("Books:references(relation:belongsTo,foo:String)", getAttributesReferences.get(1)); } diff --git a/templates/target/classes/templates/config/openj9/dockerfile-template.txt b/templates/target/classes/templates/config/openj9/dockerfile-template.txt deleted file mode 100644 index a9a3202..0000000 --- a/templates/target/classes/templates/config/openj9/dockerfile-template.txt +++ /dev/null @@ -1,10 +0,0 @@ -FROM adoptopenjdk/openjdk8-openj9 - -RUN mkdir /opt/shareclasses -RUN mkdir /opt/app - -ADD ../target/*.jar /opt/app.jar - -EXPOSE 8080 - -CMD ["java", "-Xmx512m", "-XX:+IdleTuningGcOnIdle", "-Xtune:virtualized", "-Xscmx512m", "-Xscmaxaot100m", "-Xshareclasses:cacheDir=/opt/shareclasses", "-jar", "/opt/app.jar"] diff --git a/templates/target/classes/templates/config/template-entrypoint-listener.txt b/templates/target/classes/templates/config/template-entrypoint-listener.txt deleted file mode 100644 index fa1ff45..0000000 --- a/templates/target/classes/templates/config/template-entrypoint-listener.txt +++ /dev/null @@ -1,18 +0,0 @@ -package ${package}; - -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.springframework.cloud.aws.messaging.listener.SqsMessageDeletionPolicy; -import org.springframework.cloud.aws.messaging.listener.annotation.SqsListener; - -public class EntryPointMessage implements MessageListener { - - private static final Logger log = LogManager.getLogger(EntryPointMessage.class); - - @Override - @SqsListener(value = "${cloud.aws.sqs.queue-name}", deletionPolicy = SqsMessageDeletionPolicy.ON_SUCCESS) - public void queueListener(String String) { - - } - -} diff --git a/templates/target/classes/templates/config/template-message-listener.txt b/templates/target/classes/templates/config/template-message-listener.txt deleted file mode 100644 index a020d0b..0000000 --- a/templates/target/classes/templates/config/template-message-listener.txt +++ /dev/null @@ -1,5 +0,0 @@ -package ${package}; - -public interface MessageListener { - void queueListener(String String); -} diff --git a/templates/target/classes/templates/config/template-producer-message.txt b/templates/target/classes/templates/config/template-producer-message.txt deleted file mode 100644 index dda6b28..0000000 --- a/templates/target/classes/templates/config/template-producer-message.txt +++ /dev/null @@ -1,39 +0,0 @@ -package ${package}; - -import com.amazonaws.services.sqs.AmazonSQSAsync; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.cloud.aws.messaging.core.QueueMessagingTemplate; -import org.springframework.cloud.aws.messaging.core.SqsMessageHeaders; -import org.springframework.stereotype.Component; - -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - -@Component -public class ProducerMessage { - - @Value("${cloud.aws.sqs.queue-name}") - private String queueName; - - private QueueMessagingTemplate queueMessagingTemplate; - - @Autowired - public ProducerMessage(AmazonSQSAsync amazonSqs) { - this.queueMessagingTemplate = new QueueMessagingTemplate(amazonSqs); - } - - public void sendMessage() { - this.queueMessagingTemplate.convertAndSend(queueName, "YOUR_MESSAGE_OBJECT", getHeader()); - } - - private Map getHeader() { - Map headers = new HashMap<>(); - headers.put(SqsMessageHeaders.SQS_GROUP_ID_HEADER, UUID.randomUUID().toString()); - headers.put(SqsMessageHeaders.SQS_DEDUPLICATION_ID_HEADER, UUID.randomUUID().toString()); - headers.put(SqsMessageHeaders.CONTENT_TYPE, "application/json"); - return headers; - } - -} diff --git a/templates/target/maven-archiver/pom.properties b/templates/target/maven-archiver/pom.properties deleted file mode 100644 index c08e9d4..0000000 --- a/templates/target/maven-archiver/pom.properties +++ /dev/null @@ -1,5 +0,0 @@ -#Generated by Maven -#Sun Jul 14 14:43:40 BRT 2019 -version=0.0.2.BUILD-SNAPSHOT -groupId=br.com.netodevel -artifactId=templates diff --git a/templates/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/templates/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst deleted file mode 100644 index 67bc33b..0000000 --- a/templates/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +++ /dev/null @@ -1,10 +0,0 @@ -br\com\templates\config\openj9\OpenJ9MavenPluginGenerator.class -br\com\templates\entity\EntityValidator.class -br\com\templates\config\openj9\OpenJ9DockerfileGenerator.class -br\com\templates\config\jms_aws_sqs\ProducerMessageGenerator.class -br\com\templates\config\jms_aws_sqs\SQSDependencyGenerator.class -br\com\templates\entity\EntityGenerator.class -br\com\templates\config\jms_aws_sqs\MessageListenerGenerator.class -br\com\templates\config\jms_aws_sqs\SQSPropertiesGenerator.class -br\com\templates\ComposeTemplate.class -br\com\templates\config\jms_aws_sqs\EntryPointMessageGenerator.class diff --git a/templates/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/templates/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst deleted file mode 100644 index 71595c9..0000000 --- a/templates/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +++ /dev/null @@ -1,10 +0,0 @@ -C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\main\java\br\com\templates\config\openj9\OpenJ9DockerfileGenerator.java -C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\main\java\br\com\templates\config\jms_aws_sqs\SQSPropertiesGenerator.java -C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\main\java\br\com\templates\config\openj9\OpenJ9MavenPluginGenerator.java -C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\main\java\br\com\templates\entity\EntityGenerator.java -C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\main\java\br\com\templates\entity\EntityValidator.java -C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\main\java\br\com\templates\config\jms_aws_sqs\EntryPointMessageGenerator.java -C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\main\java\br\com\templates\config\jms_aws_sqs\MessageListenerGenerator.java -C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\main\java\br\com\templates\config\jms_aws_sqs\ProducerMessageGenerator.java -C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\main\java\br\com\templates\ComposeTemplate.java -C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\main\java\br\com\templates\config\jms_aws_sqs\SQSDependencyGenerator.java diff --git a/templates/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst b/templates/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst deleted file mode 100644 index 2b00621..0000000 --- a/templates/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst +++ /dev/null @@ -1,8 +0,0 @@ -br\com\templates\entity\EntityGeneratorTest.class -br\com\templates\helper\LoadTemplateTester.class -br\com\templates\config\openj9\OpenJ9DockerfileGeneratorTest.class -br\com\templates\config\jms_aws_sqs\ProducerMessageGeneratorTest.class -br\com\templates\config\jms_aws_sqs\EntryPointMessageGeneratorTest.class -br\com\templates\config\jms_aws_sqs\MessageListenerGeneratorTest.class -br\com\templates\config\jms_aws_sqs\SQSDependencyGeneratorTest.class -br\com\templates\config\openj9\OpenJ9MavenPluginGeneratorTest.class diff --git a/templates/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/templates/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst deleted file mode 100644 index bd71437..0000000 --- a/templates/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst +++ /dev/null @@ -1,8 +0,0 @@ -C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\test\java\br\com\templates\config\jms_aws_sqs\EntryPointMessageGeneratorTest.java -C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\test\java\br\com\templates\config\jms_aws_sqs\ProducerMessageGeneratorTest.java -C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\test\java\br\com\templates\entity\EntityGeneratorTest.java -C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\test\java\br\com\templates\config\openj9\OpenJ9MavenPluginGeneratorTest.java -C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\test\java\br\com\templates\config\openj9\OpenJ9DockerfileGeneratorTest.java -C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\test\java\br\com\templates\config\jms_aws_sqs\SQSDependencyGeneratorTest.java -C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\test\java\br\com\templates\helper\LoadTemplateTester.java -C:\Users\jose.da.silva.neto\Desktop\new-github\cli-spring-boot-scaffold\templates\src\test\java\br\com\templates\config\jms_aws_sqs\MessageListenerGeneratorTest.java diff --git a/templates/target/test-classes/templates/config/fake-application.properties b/templates/target/test-classes/templates/config/fake-application.properties deleted file mode 100644 index aaf084c..0000000 --- a/templates/target/test-classes/templates/config/fake-application.properties +++ /dev/null @@ -1 +0,0 @@ -my-var=my-value \ No newline at end of file diff --git a/templates/target/test-classes/templates/config/openj9/dockerfile-template-test.txt b/templates/target/test-classes/templates/config/openj9/dockerfile-template-test.txt deleted file mode 100644 index a9a3202..0000000 --- a/templates/target/test-classes/templates/config/openj9/dockerfile-template-test.txt +++ /dev/null @@ -1,10 +0,0 @@ -FROM adoptopenjdk/openjdk8-openj9 - -RUN mkdir /opt/shareclasses -RUN mkdir /opt/app - -ADD ../target/*.jar /opt/app.jar - -EXPOSE 8080 - -CMD ["java", "-Xmx512m", "-XX:+IdleTuningGcOnIdle", "-Xtune:virtualized", "-Xscmx512m", "-Xscmaxaot100m", "-Xshareclasses:cacheDir=/opt/shareclasses", "-jar", "/opt/app.jar"] diff --git a/templates/target/test-classes/templates/config/openj9/template-pom-test.xml b/templates/target/test-classes/templates/config/openj9/template-pom-test.xml deleted file mode 100644 index 847bc58..0000000 --- a/templates/target/test-classes/templates/config/openj9/template-pom-test.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.cloud - spring-cloud-aws-messaging - 2.1.1.RELEASE - - - org.springframework.cloud - spring-cloud-starter-aws - 2.1.1.RELEASE - - - - - - - org.apache.maven.plugins - maven-shade-plugin - 2.4.3 - - - org.springframework.boot - spring-boot-maven-plugin - 2.1.5.RELEASE - - - - - package - - shade - - - - - META-INF/spring.handlers - - - META-INF/spring.factories - - - META-INF/spring.schemas - - - - br.com.example.DemoApplication - - - - - - - false - - - - \ No newline at end of file diff --git a/templates/target/test-classes/templates/config/template-entrypoint-listener-test.txt b/templates/target/test-classes/templates/config/template-entrypoint-listener-test.txt deleted file mode 100644 index a7ebc66..0000000 --- a/templates/target/test-classes/templates/config/template-entrypoint-listener-test.txt +++ /dev/null @@ -1,18 +0,0 @@ -package br.com.example; - -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.springframework.cloud.aws.messaging.listener.SqsMessageDeletionPolicy; -import org.springframework.cloud.aws.messaging.listener.annotation.SqsListener; - -public class EntryPointMessage implements MessageListener { - - private static final Logger log = LogManager.getLogger(EntryPointMessage.class); - - @Override - @SqsListener(value = "${cloud.aws.sqs.queue-name}", deletionPolicy = SqsMessageDeletionPolicy.ON_SUCCESS) - public void queueListener(String String) { - - } - -} diff --git a/templates/target/test-classes/templates/config/template-message-listener-test.txt b/templates/target/test-classes/templates/config/template-message-listener-test.txt deleted file mode 100644 index 6b27063..0000000 --- a/templates/target/test-classes/templates/config/template-message-listener-test.txt +++ /dev/null @@ -1,5 +0,0 @@ -package br.com.example; - -public interface MessageListener { - void queueListener(String String); -} diff --git a/templates/target/test-classes/templates/config/template-pom-test.xml b/templates/target/test-classes/templates/config/template-pom-test.xml deleted file mode 100644 index ca321db..0000000 --- a/templates/target/test-classes/templates/config/template-pom-test.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.cloud - spring-cloud-aws-messaging - 2.1.1.RELEASE - - - org.springframework.cloud - spring-cloud-starter-aws - 2.1.1.RELEASE - - \ No newline at end of file diff --git a/templates/target/test-classes/templates/config/template-pom.xml b/templates/target/test-classes/templates/config/template-pom.xml deleted file mode 100644 index c9c1d6b..0000000 --- a/templates/target/test-classes/templates/config/template-pom.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - org.springframework.boot - spring-boot-starter-web - - - - - - - \ No newline at end of file diff --git a/templates/target/test-classes/templates/config/template-producer-message-test.txt b/templates/target/test-classes/templates/config/template-producer-message-test.txt deleted file mode 100644 index 2156c06..0000000 --- a/templates/target/test-classes/templates/config/template-producer-message-test.txt +++ /dev/null @@ -1,39 +0,0 @@ -package br.com.example; - -import com.amazonaws.services.sqs.AmazonSQSAsync; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.cloud.aws.messaging.core.QueueMessagingTemplate; -import org.springframework.cloud.aws.messaging.core.SqsMessageHeaders; -import org.springframework.stereotype.Component; - -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - -@Component -public class ProducerMessage { - - @Value("${cloud.aws.sqs.queue-name}") - private String queueName; - - private QueueMessagingTemplate queueMessagingTemplate; - - @Autowired - public ProducerMessage(AmazonSQSAsync amazonSqs) { - this.queueMessagingTemplate = new QueueMessagingTemplate(amazonSqs); - } - - public void sendMessage() { - this.queueMessagingTemplate.convertAndSend(queueName, "YOUR_MESSAGE_OBJECT", getHeader()); - } - - private Map getHeader() { - Map headers = new HashMap<>(); - headers.put(SqsMessageHeaders.SQS_GROUP_ID_HEADER, UUID.randomUUID().toString()); - headers.put(SqsMessageHeaders.SQS_DEDUPLICATION_ID_HEADER, UUID.randomUUID().toString()); - headers.put(SqsMessageHeaders.CONTENT_TYPE, "application/json"); - return headers; - } - -} From fab764ba41c65021c2a0b9a38e417df2da1df02b Mon Sep 17 00:00:00 2001 From: NetoDevel Date: Sat, 3 Aug 2019 20:58:31 -0300 Subject: [PATCH 07/10] Add @Id template entity --- .../src/main/java/br/com/command/model/ModelHandler.java | 2 +- .../src/main/resources/templates.entity/entity-template.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/spring-scaffold-cli/src/main/java/br/com/command/model/ModelHandler.java b/spring-scaffold-cli/src/main/java/br/com/command/model/ModelHandler.java index f173823..9f9c009 100644 --- a/spring-scaffold-cli/src/main/java/br/com/command/model/ModelHandler.java +++ b/spring-scaffold-cli/src/main/java/br/com/command/model/ModelHandler.java @@ -71,7 +71,7 @@ private void generateModelJava(String nameClass, String parameters) throws IOExc Map keyValue = new HashMap<>(); keyValue.put("${content}", entity.getContent()); - keyValue.put("${package}", scaffoldInfoHelper.getPackage().concat("models")); + keyValue.put("${package}", scaffoldInfoHelper.getPackage().concat(".models")); generatorOptions.setKeyValue(keyValue); diff --git a/templates/src/main/resources/templates.entity/entity-template.txt b/templates/src/main/resources/templates.entity/entity-template.txt index 1fcf5ab..f452695 100644 --- a/templates/src/main/resources/templates.entity/entity-template.txt +++ b/templates/src/main/resources/templates.entity/entity-template.txt @@ -1,3 +1,6 @@ package ${package}; + @Id @GeneratedValue(strategy = GenerationType.AUTO) + private Integer id; + ${content} \ No newline at end of file From c46ca97e084ccc21292d17fc60996a2525e9f29a Mon Sep 17 00:00:00 2001 From: NetoDevel Date: Sat, 3 Aug 2019 21:04:53 -0300 Subject: [PATCH 08/10] Adds @Entity into generator model --- .../main/java/br/com/templates/entity/EntityExecutor.java | 1 + .../test/java/br/com/templates/entity/EntityCacheTest.java | 2 ++ .../java/br/com/templates/entity/EntityExecutorTest.java | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/templates/src/main/java/br/com/templates/entity/EntityExecutor.java b/templates/src/main/java/br/com/templates/entity/EntityExecutor.java index 330cb64..d097286 100644 --- a/templates/src/main/java/br/com/templates/entity/EntityExecutor.java +++ b/templates/src/main/java/br/com/templates/entity/EntityExecutor.java @@ -93,6 +93,7 @@ private void validateTokenAtrribute(String attribute) { public String generateClass(String nameClass) { return "" + + "@Entity\n" + "@Data\n" + "public class ".concat(nameClass).concat(" {\n") + "${attributes}" + diff --git a/templates/src/test/java/br/com/templates/entity/EntityCacheTest.java b/templates/src/test/java/br/com/templates/entity/EntityCacheTest.java index 4bd3ff2..9674ca5 100644 --- a/templates/src/test/java/br/com/templates/entity/EntityCacheTest.java +++ b/templates/src/test/java/br/com/templates/entity/EntityCacheTest.java @@ -27,6 +27,7 @@ public void shouldReturnContentOfUser() { entityExecutor.run("User", valueArgument); String expectedValue = "" + + "@Entity\n" + "@Data\n" + "public class User {\n" + "\tprivate String name;\n" + @@ -44,6 +45,7 @@ public void shouldReturnContentOfFoo() { entityExecutor.run("User", valueArgument); String expectedValue = "" + + "@Entity\n" + "@Data\n" + "public class Foo {\n" + "\tprivate String foo;\n" + diff --git a/templates/src/test/java/br/com/templates/entity/EntityExecutorTest.java b/templates/src/test/java/br/com/templates/entity/EntityExecutorTest.java index 1b86ba1..ddf37f0 100644 --- a/templates/src/test/java/br/com/templates/entity/EntityExecutorTest.java +++ b/templates/src/test/java/br/com/templates/entity/EntityExecutorTest.java @@ -19,6 +19,7 @@ public void setUp() { @Test public void shouldCreateEntity() { String expectedValue = "" + + "@Entity\n" + "@Data\n" + "public class User {\n" + "\tprivate String name;\n" + @@ -42,6 +43,7 @@ public void givenTypeThatNotExists_shouldInvokeException() { @Test public void givenRelationHasMany_shouldReturnWithRelation() { String expectedValue = "" + + "@Entity\n" + "@Data\n" + "public class User {\n" + "\tprivate String name;\n" + @@ -59,6 +61,7 @@ public void givenRelationHasMany_shouldReturnWithRelation() { @Test public void givenRelationBelongsTo_shouldReturnWithRelation() { String expectedValue = "" + + "@Entity\n" + "@Data\n" + "public class User {\n" + "\tprivate String name;\n" + @@ -76,6 +79,7 @@ public void givenRelationBelongsTo_shouldReturnWithRelation() { @Test public void shouldGenerateClass() { String expectedValue = "" + + "@Entity\n" + "@Data\n" + "public class User {\n" + "${attributes}" + @@ -88,6 +92,7 @@ public void shouldGenerateClass() { @Test public void shouldGenerateClassWithCorrectName() { String expectedValue = "" + + "@Entity\n" + "@Data\n" + "public class Foo {\n" + "${attributes}" + From efd81d1d2f8486f18de47c138a7fb21e9eef43cf Mon Sep 17 00:00:00 2001 From: NetoDevel Date: Sat, 3 Aug 2019 21:38:37 -0300 Subject: [PATCH 09/10] Adds lombok generator --- .../com/generator/core/GeneratorExecutor.java | 12 ++++++ .../com/generator/core/GeneratorOptions.java | 10 +++++ .../br/com/command/model/ModelHandler.java | 13 +++++++ .../com/command/model/ModelHandlerTest.java | 2 + .../com/templates/entity/EntityExecutor.java | 8 ++++ .../entity/LombokDependencyGenerator.java | 38 +++++++++++++++++++ .../templates.entity/entity-template.txt | 4 +- .../com/templates/entity/EntityCacheTest.java | 6 ++- .../templates/entity/EntityExecutorTest.java | 9 +++++ 9 files changed, 99 insertions(+), 3 deletions(-) create mode 100644 templates/src/main/java/br/com/templates/entity/LombokDependencyGenerator.java diff --git a/generator-core/src/main/java/br/com/generator/core/GeneratorExecutor.java b/generator-core/src/main/java/br/com/generator/core/GeneratorExecutor.java index 7b8bbcb..b46be23 100644 --- a/generator-core/src/main/java/br/com/generator/core/GeneratorExecutor.java +++ b/generator-core/src/main/java/br/com/generator/core/GeneratorExecutor.java @@ -30,6 +30,18 @@ public File generate(GeneratorOptions options) throws IOException { public File addDependecies(GeneratorOptions options) throws IOException { String contentTemplate = loadPom(options.getTemplatePath()); + + Boolean alreadyDeps = false; + if (options.getDependencies() != null) { + for (int i = 0; i < options.getDependencies().size(); i++) { + if (contentTemplate.contains(options.getDependencies().get(i))) { + System.out.println("[INFO] ".concat(options.getDependencies().get(i)).concat(" already added.")); + alreadyDeps = true; + } + } + } + if (alreadyDeps) return null; + String contentReplaced = templateEngine.replaceValues(contentTemplate, options.getKeyValue()); File fileGenerated = new File(options.getDestination()); diff --git a/generator-core/src/main/java/br/com/generator/core/GeneratorOptions.java b/generator-core/src/main/java/br/com/generator/core/GeneratorOptions.java index 07c4ef0..39637db 100644 --- a/generator-core/src/main/java/br/com/generator/core/GeneratorOptions.java +++ b/generator-core/src/main/java/br/com/generator/core/GeneratorOptions.java @@ -1,5 +1,6 @@ package br.com.generator.core; +import java.util.List; import java.util.Map; public class GeneratorOptions { @@ -10,6 +11,7 @@ public class GeneratorOptions { private String properties; private Map pluginValues; private Map keyValue; + private List dependencies; public String getDestination() { return destination; @@ -58,4 +60,12 @@ public Map getPluginValues() { public void setPluginValues(Map pluginValues) { this.pluginValues = pluginValues; } + + public List getDependencies() { + return dependencies; + } + + public void setDependencies(List dependencies) { + this.dependencies = dependencies; + } } diff --git a/spring-scaffold-cli/src/main/java/br/com/command/model/ModelHandler.java b/spring-scaffold-cli/src/main/java/br/com/command/model/ModelHandler.java index 9f9c009..ac8fb2f 100644 --- a/spring-scaffold-cli/src/main/java/br/com/command/model/ModelHandler.java +++ b/spring-scaffold-cli/src/main/java/br/com/command/model/ModelHandler.java @@ -5,6 +5,7 @@ import br.com.templates.entity.EntityCache; import br.com.templates.entity.EntityExecutor; import br.com.templates.entity.EntityGenerator; +import br.com.templates.entity.LombokDependencyGenerator; import joptsimple.OptionSet; import joptsimple.OptionSpec; import org.springframework.boot.cli.command.options.OptionHandler; @@ -64,6 +65,8 @@ private void generateModelJava(String nameClass, String parameters) throws IOExc EntityExecutor entityExecutor = new EntityExecutor(); entityExecutor.run(nameClass, parameters); + lombokGenerate(); + for (EntityCache entity : entityExecutor.getEntities()) { GeneratorOptions generatorOptions = new GeneratorOptions(); generatorOptions.setName(entity.getName().concat(".java")); @@ -78,6 +81,16 @@ private void generateModelJava(String nameClass, String parameters) throws IOExc EntityGenerator entityGenerator = new EntityGenerator(generatorOptions); entityGenerator.runGenerate(); } + + } + + private void lombokGenerate() throws IOException { + GeneratorOptions lombokDepsOptions = new GeneratorOptions(); + lombokDepsOptions.setTemplatePath(scaffoldInfoHelper.getPomPath()); + lombokDepsOptions.setDestination(scaffoldInfoHelper.getPomDest()); + + LombokDependencyGenerator lombokDependencyGenerator = new LombokDependencyGenerator(lombokDepsOptions); + lombokDependencyGenerator.runGenerate(); } } diff --git a/spring-scaffold-cli/src/test/java/br/com/command/model/ModelHandlerTest.java b/spring-scaffold-cli/src/test/java/br/com/command/model/ModelHandlerTest.java index e7e3f75..ec238c8 100644 --- a/spring-scaffold-cli/src/test/java/br/com/command/model/ModelHandlerTest.java +++ b/spring-scaffold-cli/src/test/java/br/com/command/model/ModelHandlerTest.java @@ -32,6 +32,8 @@ public void shouldReturnOk() throws Exception { Mockito.when(scaffoldInfoHelper.getPackage()).thenReturn("com.example"); Mockito.when(scaffoldInfoHelper.getPathPackage()).thenReturn(temporaryPath.getAbsolutePath().concat("\\com\\example\\")); + Mockito.when(scaffoldInfoHelper.getPomPath()).thenReturn(getClass().getResource("/templates/template-fake-pom.xml").toURI().getPath()); + Mockito.when(scaffoldInfoHelper.getPomDest()).thenReturn(temporaryPath.getAbsolutePath().concat("/pom.xml")); ModelHandler modelHandler = new ModelHandler(scaffoldInfoHelper); ExitStatus exitStatus = modelHandler.run("-n", "User", "-p", "name:String Foo:references(relation:hasMany, name:String)"); diff --git a/templates/src/main/java/br/com/templates/entity/EntityExecutor.java b/templates/src/main/java/br/com/templates/entity/EntityExecutor.java index d097286..951f101 100644 --- a/templates/src/main/java/br/com/templates/entity/EntityExecutor.java +++ b/templates/src/main/java/br/com/templates/entity/EntityExecutor.java @@ -20,6 +20,14 @@ public String run(String nameClass, String argumentValue) { String[] attributes = argumentValue.split(" "); StringBuilder attributeToReplace = new StringBuilder(); + + String idAttribute = + "\n" + + "\t@Id @GeneratedValue(strategy = GenerationType.AUTO)\n" + + "\tprivate Integer id;"; + + attributeToReplace.append("\t".concat(idAttribute.concat("\n"))); + for (int i = 0; i < attributes.length; i++) { String attribute = generateAttribute(attributes[i]); attributeToReplace.append("\t".concat(attribute.concat("\n"))); diff --git a/templates/src/main/java/br/com/templates/entity/LombokDependencyGenerator.java b/templates/src/main/java/br/com/templates/entity/LombokDependencyGenerator.java new file mode 100644 index 0000000..d8b07c7 --- /dev/null +++ b/templates/src/main/java/br/com/templates/entity/LombokDependencyGenerator.java @@ -0,0 +1,38 @@ +package br.com.templates.entity; + +import br.com.generator.core.Generator; +import br.com.generator.core.GeneratorOptions; + +import java.io.File; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +public class LombokDependencyGenerator extends Generator { + + private GeneratorOptions generatorOptions; + + public LombokDependencyGenerator(GeneratorOptions generatorOptions) { + this.generatorOptions = generatorOptions; + } + + public File runGenerate() throws IOException { + String dependency = "\n" + + " \n" + + " org.projectlombok\n" + + " lombok\n" + + " provided\n" + + " \n" + + ""; + + Map keyValue = new HashMap(); + keyValue.put("", dependency); + this.generatorOptions.setKeyValue(keyValue); + this.generatorOptions.setName("pom.xml"); + this.generatorOptions.setDependencies(Collections.singletonList("org.projectlombok")); + + return addDependency(this.generatorOptions); + } + +} diff --git a/templates/src/main/resources/templates.entity/entity-template.txt b/templates/src/main/resources/templates.entity/entity-template.txt index f452695..e26697f 100644 --- a/templates/src/main/resources/templates.entity/entity-template.txt +++ b/templates/src/main/resources/templates.entity/entity-template.txt @@ -1,6 +1,6 @@ package ${package}; - @Id @GeneratedValue(strategy = GenerationType.AUTO) - private Integer id; +import lombok.Data; +import java.util.List; ${content} \ No newline at end of file diff --git a/templates/src/test/java/br/com/templates/entity/EntityCacheTest.java b/templates/src/test/java/br/com/templates/entity/EntityCacheTest.java index 9674ca5..c8f8cdb 100644 --- a/templates/src/test/java/br/com/templates/entity/EntityCacheTest.java +++ b/templates/src/test/java/br/com/templates/entity/EntityCacheTest.java @@ -30,13 +30,17 @@ public void shouldReturnContentOfUser() { "@Entity\n" + "@Data\n" + "public class User {\n" + + "\t\n" + + "\t@Id @GeneratedValue(strategy = GenerationType.AUTO)\n" + + "\tprivate Integer id;\n" + "\tprivate String name;\n" + "\tprivate Integer age;\n" + "\t\t\n" + "\t@OneToMany\n" + "\tprivate List foo;\n" + "}\n"; - assertEquals(expectedValue.trim(), entityExecutor.getEntities().get(1).getContent()); + + assertEquals(expectedValue.trim(), entityExecutor.getEntities().get(1).getContent().trim()); } @Test diff --git a/templates/src/test/java/br/com/templates/entity/EntityExecutorTest.java b/templates/src/test/java/br/com/templates/entity/EntityExecutorTest.java index ddf37f0..22b52a9 100644 --- a/templates/src/test/java/br/com/templates/entity/EntityExecutorTest.java +++ b/templates/src/test/java/br/com/templates/entity/EntityExecutorTest.java @@ -22,6 +22,9 @@ public void shouldCreateEntity() { "@Entity\n" + "@Data\n" + "public class User {\n" + + "\t\n" + + "\t@Id @GeneratedValue(strategy = GenerationType.AUTO)\n" + + "\tprivate Integer id;\n" + "\tprivate String name;\n" + "\tprivate Integer age;\n" + "}\n"; @@ -46,6 +49,9 @@ public void givenRelationHasMany_shouldReturnWithRelation() { "@Entity\n" + "@Data\n" + "public class User {\n" + + "\t\n" + + "\t@Id @GeneratedValue(strategy = GenerationType.AUTO)\n" + + "\tprivate Integer id;\n" + "\tprivate String name;\n" + "\tprivate Integer age;\n" + "\t\t\n" + @@ -64,6 +70,9 @@ public void givenRelationBelongsTo_shouldReturnWithRelation() { "@Entity\n" + "@Data\n" + "public class User {\n" + + "\t\n" + + "\t@Id @GeneratedValue(strategy = GenerationType.AUTO)\n" + + "\tprivate Integer id;\n" + "\tprivate String name;\n" + "\tprivate Integer age;\n" + "\t\t\n" + From ae9fb564497db94dde50d5b3e33470f46b7d1ecc Mon Sep 17 00:00:00 2001 From: NetoDevel Date: Sat, 3 Aug 2019 21:45:49 -0300 Subject: [PATCH 10/10] Updated version --- generator-core/pom.xml | 2 +- pom.xml | 2 +- spring-boot-generate/pom.xml | 2 +- spring-scaffold-cli/pom.xml | 6 +++--- templates/pom.xml | 10 +++++----- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/generator-core/pom.xml b/generator-core/pom.xml index bcb8260..07ac8bb 100644 --- a/generator-core/pom.xml +++ b/generator-core/pom.xml @@ -5,7 +5,7 @@ spring-boot-cli br.com.netodevel - 0.0.2.BUILD-SNAPSHOT + 1.1.0.BUILD-SNAPSHOT 4.0.0 generator-core diff --git a/pom.xml b/pom.xml index 9d81d0e..3a6af01 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 br.com.netodevel spring-boot-cli - 0.0.2.BUILD-SNAPSHOT + 1.1.0.BUILD-SNAPSHOT pom cli-spring-boot-scaffold diff --git a/spring-boot-generate/pom.xml b/spring-boot-generate/pom.xml index e10031c..35f5194 100644 --- a/spring-boot-generate/pom.xml +++ b/spring-boot-generate/pom.xml @@ -3,7 +3,7 @@ 4.0.0 br.com spring-boot-generate - 0.0.2-SNAPSHOT + 1.1.0.BUILD-SNAPSHOT UTF-8 diff --git a/spring-scaffold-cli/pom.xml b/spring-scaffold-cli/pom.xml index 33a6718..a23a137 100644 --- a/spring-scaffold-cli/pom.xml +++ b/spring-scaffold-cli/pom.xml @@ -3,7 +3,7 @@ 4.0.0 br.com.netodevel spring-scaffold-cli - 0.0.2-SNAPSHOT + 1.1.0.BUILD-SNAPSHOT org.springframework.boot @@ -26,13 +26,13 @@ br.com spring-boot-generate - 0.0.2-SNAPSHOT + 1.1.0.BUILD-SNAPSHOT br.com.netodevel templates - 0.0.2.BUILD-SNAPSHOT + 1.1.0.BUILD-SNAPSHOT diff --git a/templates/pom.xml b/templates/pom.xml index 963279a..cbeac07 100644 --- a/templates/pom.xml +++ b/templates/pom.xml @@ -5,11 +5,8 @@ spring-boot-cli br.com.netodevel - 0.0.2.BUILD-SNAPSHOT + 1.1.0.BUILD-SNAPSHOT - 4.0.0 - templates - @@ -22,11 +19,14 @@ + 4.0.0 + + templates br.com.netodevel generator-core - 0.0.2.BUILD-SNAPSHOT + 1.1.0.BUILD-SNAPSHOT compile