This is an automated email from the ASF dual-hosted git repository.

eolivelli pushed a commit to branch ARCHETYPE-565
in repository https://gitbox.apache.org/repos/asf/maven-archetype.git

commit b958e9ec1fe175a9afe4e6b47ce4de8a146893c7
Author: joshdreagan <josh.d.rea...@gmail.com>
AuthorDate: Fri Aug 28 11:15:08 2020 -0600

    [ARCHETYPE-565] - Unable to resolve groovy.json classes when planting
      Updated groovy dependency to groovy-all since packages where moved in 2.x
---
 archetype-common/pom.xml                           |  2 +-
 .../ARCHETYPE-565_groovy-json/archetype.properties | 18 ++++++++
 .../ARCHETYPE-565_groovy-json/archetype/pom.xml    | 45 +++++++++++++++++++
 .../META-INF/archetype-post-generate.groovy        | 25 +++++++++++
 .../META-INF/maven/archetype-metadata.xml          | 31 ++++++++++++++
 .../src/main/resources/archetype-resources/pom.xml | 31 ++++++++++++++
 .../ARCHETYPE-565_groovy-json/invoker.properties   | 23 ++++++++++
 .../it/projects/ARCHETYPE-565_groovy-json/pom.xml  | 50 ++++++++++++++++++++++
 .../ARCHETYPE-565_groovy-json/project.properties   | 27 ++++++++++++
 .../ARCHETYPE-565_groovy-json/verify.groovy        | 23 ++++++++++
 10 files changed, 274 insertions(+), 1 deletion(-)

diff --git a/archetype-common/pom.xml b/archetype-common/pom.xml
index 7dcb9af..7eab5fb 100644
--- a/archetype-common/pom.xml
+++ b/archetype-common/pom.xml
@@ -52,7 +52,7 @@
     </dependency>
     <dependency>
       <groupId>org.codehaus.groovy</groupId>
-      <artifactId>groovy</artifactId>
+      <artifactId>groovy-all</artifactId>
       <version>2.4.16</version>
       <scope>compile</scope>
     </dependency>
diff --git 
a/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/archetype.properties
 
b/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/archetype.properties
new file mode 100644
index 0000000..74cf9cb
--- /dev/null
+++ 
b/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/archetype.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+excludePatterns=build.log,invoker.properties,verify.groovy
diff --git 
a/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/archetype/pom.xml
 
b/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/archetype/pom.xml
new file mode 100644
index 0000000..f351a8c
--- /dev/null
+++ 
b/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/archetype/pom.xml
@@ -0,0 +1,45 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+  
+  <parent>
+    <groupId>org.apache.maven.plugins.archetype.its</groupId>
+    <artifactId>archetype565-parent</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>archetype565-archetype</artifactId>
+  <packaging>maven-archetype</packaging>
+  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-archetype-plugin</artifactId>
+        <configuration>
+          <archetypeDirectory>src/main/resources</archetypeDirectory>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
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-565_groovy-json/archetype/src/main/resources/META-INF/archetype-post-generate.groovy
new file mode 100644
index 0000000..48f0468
--- /dev/null
+++ 
b/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/archetype/src/main/resources/META-INF/archetype-post-generate.groovy
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import groovy.json.JsonException // Should error on this line if test fails.
+
+import java.nio.file.Files
+import java.nio.file.Paths
+
+def p = Paths.get(request.getOutputDirectory(), request.getArtifactId(), 
'test.txt')
+Files.createFile(p)
\ No newline at end of file
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-565_groovy-json/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
new file mode 100644
index 0000000..37d7c80
--- /dev/null
+++ 
b/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<archetype-descriptor 
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0";
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+    
xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0
 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd";
+    name="ARCHETYPE-565">
+
+  <requiredProperties>
+    <requiredProperty key="projectName"/>
+  </requiredProperties>
+
+</archetype-descriptor>
\ No newline at end of file
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-565_groovy-json/archetype/src/main/resources/archetype-resources/pom.xml
new file mode 100644
index 0000000..4f81a0f
--- /dev/null
+++ 
b/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/archetype/src/main/resources/archetype-resources/pom.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>${groupId}</groupId>
+  <artifactId>${artifactId}</artifactId>
+  <version>${version}</version>
+  <packaging>pom</packaging>
+  
+</project>
\ No newline at end of file
diff --git 
a/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/invoker.properties
 
b/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/invoker.properties
new file mode 100644
index 0000000..aaa45c6
--- /dev/null
+++ 
b/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/invoker.properties
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+invoker.goals.1 = install
+invoker.project.1 = archetype
+
+invoker.goals.2 = 
org.apache.maven.plugins:maven-archetype-plugin:${project.version}:generate
+invoker.systemPropertiesFile = project.properties
+
diff --git 
a/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/pom.xml 
b/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/pom.xml
new file mode 100644
index 0000000..ce11999
--- /dev/null
+++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/pom.xml
@@ -0,0 +1,50 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.archetype.its</groupId>
+  <artifactId>archetype565-parent</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+  
+  <build>
+    <extensions>
+      <extension>
+        <groupId>org.apache.maven.archetype</groupId>
+        <artifactId>archetype-packaging</artifactId>
+        <version>@project.version@</version>
+      </extension>
+    </extensions>
+    
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-archetype-plugin</artifactId>
+          <version>@project.version@</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+
+</project>
diff --git 
a/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/project.properties
 
b/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/project.properties
new file mode 100644
index 0000000..7e16574
--- /dev/null
+++ 
b/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/project.properties
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+archetypeGroupId=org.apache.maven.plugins.archetype.its
+archetypeArtifactId=archetype565-archetype
+archetypeVersion=1.0-SNAPSHOT
+
+groupId=com.company
+artifactId=myArtifactId
+version=1.0-SNAPSHOT
+package=com.company.project
+
+projectName=myName
diff --git 
a/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/verify.groovy
 
b/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/verify.groovy
new file mode 100644
index 0000000..d23c155
--- /dev/null
+++ 
b/maven-archetype-plugin/src/it/projects/ARCHETYPE-565_groovy-json/verify.groovy
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import java.nio.file.Files
+import java.nio.file.Paths
+
+def p = Paths.get(basedir.getAbsolutePath(), 'myArtifactId', 'test.txt')
+assert Files.exists(p) : "The 'archetype-post-generate.groovy' script did not 
complete successfully. Test file path: [$p]"

Reply via email to