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

slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-archetypes.git

commit 7aaa19f5e6dc14dd532d0cf3d90e791e21768d26
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Sat Oct 31 11:17:50 2026 +0000

    Check the archetype generated by the archetype archetype IT
---
 .../src/test/resources/projects/it-basic/verify.groovy    | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git 
a/maven-archetype-archetype/src/test/resources/projects/it-basic/verify.groovy 
b/maven-archetype-archetype/src/test/resources/projects/it-basic/verify.groovy
new file mode 100644
index 0000000..decaa9b
--- /dev/null
+++ 
b/maven-archetype-archetype/src/test/resources/projects/it-basic/verify.groovy
@@ -0,0 +1,15 @@
+import java.util.zip.ZipFile
+
+File archetype = new File(basedir, 
'project/basic-archetype/target/basic-archetype-0.1-SNAPSHOT.jar')
+assert archetype.isFile() : 'the generated archetype was not packaged'
+ZipFile zip = new ZipFile(archetype)
+try {
+    assert zip.getEntry('META-INF/maven/archetype-metadata.xml') != null : 
'archetype descriptor is missing'
+    assert zip.getEntry('archetype-resources/pom.xml') != null : 'archetype 
template pom is missing'
+} finally {
+    zip.close()
+}
+
+// the generated archetype ships its own IT; "verify" must have run it and 
generated a project from the archetype
+File nested = new File(basedir, 
'project/basic-archetype/target/test-classes/projects/it-basic/project/basic-project/pom.xml')
+assert nested.isFile() : 'the archetype IT of the generated archetype did not 
generate its project'

Reply via email to