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

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

diff --git 
a/maven-archetype-portlet/src/test/resources/projects/it-basic/verify.groovy 
b/maven-archetype-portlet/src/test/resources/projects/it-basic/verify.groovy
new file mode 100644
index 0000000..64e1bf0
--- /dev/null
+++ b/maven-archetype-portlet/src/test/resources/projects/it-basic/verify.groovy
@@ -0,0 +1,12 @@
+import java.util.zip.ZipFile
+
+File war = new File(basedir, 
'project/basic-portlet/target/basic-portlet-0.1-SNAPSHOT.war')
+assert war.isFile() : 'the generated project did not package a war'
+ZipFile zip = new ZipFile(war)
+try {
+    for (String entry in ['WEB-INF/portlet.xml', 'WEB-INF/web.xml', 
'WEB-INF/classes/it/pkg/MyPortlet.class']) {
+        assert zip.getEntry(entry) != null : entry + ' is missing from the war'
+    }
+} finally {
+    zip.close()
+}

Reply via email to