------ Maven 2 War Plugin: war:exploded ------ Pete Marvin King ------ June 19, 2006 Exploded war files gives the webapp project rapid testing capability, war files can be deployed in the web container in exploded form. War file generation of large webapp projects normally take time, using the exploded goal can speed up the processing of the war by only updating the modified files or resources on the exploded war. Default Phase ( recommended ) <> Basic Usage To explicitly execute the goal +-----+ m2 war:exploded +-----+ or with the added configuration line on your pom.xml +----------+ ... org.apache.maven maven-war-plugin 2.1 exploded ... ... ... +----------+ specifying the package phase would achieve the same result +------+ mvn package +------+ Sample Configuration Given the project structure +-------+ /project_root /project_root/pom.xml /project_root/src/main/java/package/source /project_root/src/main/resource/someresource /project_root/src/main/webapp/WEB-INF/jsp/anotherwebsource /project_root/src/main/webapp/WEB-INF/somewebsource /project_root/src/main/webapp/websources +-------+ with pom.xml +--------+ 4.0.0 com.somecompany.webapp webapp-service 0.0 war Some Company Webapp Service com.closed.package runtimedependency 0.0 runtime com.closed.package normaldependency 0.0 +--------+ executing the command +--------+ mvn war:exploded +--------+ would assemble the exploded webapp on "target/webapp-service" +--------+ target/webapp-service/META-INF/MANIFEST.MF target/webapp-service/META-INF/maven/org.apache.maven.repository/maven-repository-webapp/pom.xml target/webapp-service/META-INF/maven/org.apache.maven.repository/maven-repository-webapp/pom.properties target/webapp-service/WEB-INF/lib/runtimedependency-0.0.jar target/webapp-service/WEB-INF/classes/ target/webapp-service/WEB-INF/jsp/anotherwebsource target/webapp-service/WEB-INF/somewebsource target/webapp-service/websources +--------+ You might wonder why the other dependency is not included in WEB-INF/lib, only dependencies with a runtime scope are included in the war file.