From 7af674d5156637257f842017ce7d0facbf4672ef Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Sat, 5 Oct 2024 15:15:39 +0200 Subject: [PATCH] [ARCHETYPE-679] Add additional modules for groovy - groovy-templates - groovy-xml - groovy-yaml --- archetype-common/pom.xml | 16 ++++++++++++++++ .../archetype.properties | 0 .../archetype/pom.xml | 4 ++-- .../META-INF/archetype-post-generate.groovy | 8 +++++++- .../META-INF/maven/archetype-metadata.xml | 0 .../main/resources/archetype-resources/pom.xml | 0 .../invoker.properties | 0 .../pom.xml | 2 +- .../project.properties | 2 +- .../verify.groovy | 0 10 files changed, 27 insertions(+), 5 deletions(-) rename maven-archetype-plugin/src/it/projects/{ARCHETYPE-565_groovy-json => ARCHETYPE-679_groovy-modules}/archetype.properties (100%) rename maven-archetype-plugin/src/it/projects/{ARCHETYPE-565_groovy-json => ARCHETYPE-679_groovy-modules}/archetype/pom.xml (93%) rename maven-archetype-plugin/src/it/projects/{ARCHETYPE-565_groovy-json => ARCHETYPE-679_groovy-modules}/archetype/src/main/resources/META-INF/archetype-post-generate.groovy (83%) rename maven-archetype-plugin/src/it/projects/{ARCHETYPE-565_groovy-json => ARCHETYPE-679_groovy-modules}/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml (100%) rename maven-archetype-plugin/src/it/projects/{ARCHETYPE-565_groovy-json => ARCHETYPE-679_groovy-modules}/archetype/src/main/resources/archetype-resources/pom.xml (100%) rename maven-archetype-plugin/src/it/projects/{ARCHETYPE-565_groovy-json => ARCHETYPE-679_groovy-modules}/invoker.properties (100%) rename maven-archetype-plugin/src/it/projects/{ARCHETYPE-565_groovy-json => ARCHETYPE-679_groovy-modules}/pom.xml (97%) rename maven-archetype-plugin/src/it/projects/{ARCHETYPE-565_groovy-json => ARCHETYPE-679_groovy-modules}/project.properties (95%) rename maven-archetype-plugin/src/it/projects/{ARCHETYPE-565_groovy-json => ARCHETYPE-679_groovy-modules}/verify.groovy (100%) diff --git a/archetype-common/pom.xml b/archetype-common/pom.xml index 22966a5da..5c0b482da 100644 --- a/archetype-common/pom.xml +++ b/archetype-common/pom.xml @@ -57,6 +57,22 @@ groovy-json runtime + + org.apache.groovy + groovy-templates + runtime + + + org.apache.groovy + groovy-xml + runtime + + + org.apache.groovy + groovy-yaml + runtime + + org.apache.ivy ivy diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/archetype.properties b/maven-archetype-plugin/src/it/projects/ARCHETYPE-679_groovy-modules/archetype.properties similarity index 100% rename from maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/archetype.properties rename to maven-archetype-plugin/src/it/projects/ARCHETYPE-679_groovy-modules/archetype.properties diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/archetype/pom.xml b/maven-archetype-plugin/src/it/projects/ARCHETYPE-679_groovy-modules/archetype/pom.xml similarity index 93% rename from maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/archetype/pom.xml rename to maven-archetype-plugin/src/it/projects/ARCHETYPE-679_groovy-modules/archetype/pom.xml index f351a8c23..43363aeba 100644 --- a/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/archetype/pom.xml +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-679_groovy-modules/archetype/pom.xml @@ -24,10 +24,10 @@ under the License. org.apache.maven.plugins.archetype.its - archetype565-parent + archetype679-parent 1.0-SNAPSHOT - archetype565-archetype + archetype679-archetype maven-archetype diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/archetype/src/main/resources/META-INF/archetype-post-generate.groovy b/maven-archetype-plugin/src/it/projects/ARCHETYPE-679_groovy-modules/archetype/src/main/resources/META-INF/archetype-post-generate.groovy similarity index 83% rename from maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/archetype/src/main/resources/META-INF/archetype-post-generate.groovy rename to maven-archetype-plugin/src/it/projects/ARCHETYPE-679_groovy-modules/archetype/src/main/resources/META-INF/archetype-post-generate.groovy index 41b6e7b78..0ac8bc081 100644 --- a/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/archetype/src/main/resources/META-INF/archetype-post-generate.groovy +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-679_groovy-modules/archetype/src/main/resources/META-INF/archetype-post-generate.groovy @@ -18,7 +18,13 @@ */ import java.nio.file.Files import java.nio.file.Paths -import groovy.json.JsonException // Should error on this line if test fails. + +// imports for groovy additional modules should not fail test + +import groovy.json.JsonSlurper +import groovy.text.SimpleTemplateEngine +import groovy.xml.XmlSlurper +import groovy.yaml.YamlSlurper def p = Paths.get(request.getOutputDirectory(), request.getArtifactId(), 'test.txt') diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/maven-archetype-plugin/src/it/projects/ARCHETYPE-679_groovy-modules/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml rename to maven-archetype-plugin/src/it/projects/ARCHETYPE-679_groovy-modules/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/archetype/src/main/resources/archetype-resources/pom.xml b/maven-archetype-plugin/src/it/projects/ARCHETYPE-679_groovy-modules/archetype/src/main/resources/archetype-resources/pom.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/archetype/src/main/resources/archetype-resources/pom.xml rename to maven-archetype-plugin/src/it/projects/ARCHETYPE-679_groovy-modules/archetype/src/main/resources/archetype-resources/pom.xml diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/invoker.properties b/maven-archetype-plugin/src/it/projects/ARCHETYPE-679_groovy-modules/invoker.properties similarity index 100% rename from maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/invoker.properties rename to maven-archetype-plugin/src/it/projects/ARCHETYPE-679_groovy-modules/invoker.properties diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/pom.xml b/maven-archetype-plugin/src/it/projects/ARCHETYPE-679_groovy-modules/pom.xml similarity index 97% rename from maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/pom.xml rename to maven-archetype-plugin/src/it/projects/ARCHETYPE-679_groovy-modules/pom.xml index ce11999e7..0f7c776be 100644 --- a/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/pom.xml +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-679_groovy-modules/pom.xml @@ -23,7 +23,7 @@ under the License. 4.0.0 org.apache.maven.plugins.archetype.its - archetype565-parent + archetype679-parent 1.0-SNAPSHOT pom diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/project.properties b/maven-archetype-plugin/src/it/projects/ARCHETYPE-679_groovy-modules/project.properties similarity index 95% rename from maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/project.properties rename to maven-archetype-plugin/src/it/projects/ARCHETYPE-679_groovy-modules/project.properties index 7e165742b..652e1ec3a 100644 --- a/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/project.properties +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-679_groovy-modules/project.properties @@ -16,7 +16,7 @@ # under the License. archetypeGroupId=org.apache.maven.plugins.archetype.its -archetypeArtifactId=archetype565-archetype +archetypeArtifactId=archetype679-archetype archetypeVersion=1.0-SNAPSHOT groupId=com.company diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/verify.groovy b/maven-archetype-plugin/src/it/projects/ARCHETYPE-679_groovy-modules/verify.groovy similarity index 100% rename from maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/verify.groovy rename to maven-archetype-plugin/src/it/projects/ARCHETYPE-679_groovy-modules/verify.groovy