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 edfcf82cf364a465dbd459ea4d6103b51e781c33
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Sat Oct 31 11:17:50 2026 +0000

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

diff --git 
a/maven-archetype-j2ee-simple/src/test/resources/projects/it-basic/verify.groovy
 
b/maven-archetype-j2ee-simple/src/test/resources/projects/it-basic/verify.groovy
new file mode 100644
index 0000000..4e3ed9e
--- /dev/null
+++ 
b/maven-archetype-j2ee-simple/src/test/resources/projects/it-basic/verify.groovy
@@ -0,0 +1,16 @@
+import java.util.zip.ZipFile
+
+File ear = new File(basedir, 
'project/basic-j2ee-simple/ear/target/ear-0.1-SNAPSHOT.ear')
+assert ear.isFile() : 'the generated project did not package an ear'
+ZipFile zip = new ZipFile(ear)
+try {
+    // one entry per module the ear must bundle
+    for (String entry in ['META-INF/application.xml',
+                          'archetype.it-ejbs-0.1-SNAPSHOT.jar',
+                          'archetype.it-primary-source-0.1-SNAPSHOT.jar',
+                          'archetype.it-servlet-0.1-SNAPSHOT.war']) {
+        assert zip.getEntry(entry) != null : entry + ' is missing from the ear'
+    }
+} finally {
+    zip.close()
+}

Reply via email to