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 cbf601db85e995408755ff9388fa8718948cf10d Author: Sylwester Lachiewicz <[email protected]> AuthorDate: Sat Oct 31 11:17:50 2026 +0000 Check the war packaged by the webapp archetype IT --- .../src/test/resources/projects/it-basic/verify.groovy | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/maven-archetype-webapp/src/test/resources/projects/it-basic/verify.groovy b/maven-archetype-webapp/src/test/resources/projects/it-basic/verify.groovy new file mode 100644 index 0000000..c6fa303 --- /dev/null +++ b/maven-archetype-webapp/src/test/resources/projects/it-basic/verify.groovy @@ -0,0 +1,11 @@ +import java.util.zip.ZipFile + +File war = new File(basedir, 'project/basic-webapp/target/basic-webapp.war') +assert war.isFile() : 'the generated project did not package a war' +ZipFile zip = new ZipFile(war) +try { + assert zip.getEntry('WEB-INF/web.xml') != null : 'web.xml is missing from the war' + assert zip.getEntry('index.jsp') != null : 'index.jsp is missing from the war' +} finally { + zip.close() +}
