------ Maven 2 War Plugin: war:inplace ------ Pete Marvin King ------ June 19, 2006 This mode is similar to the exploded mode but the war will ge generated in the webapp source tree. Default Phase ( recommended ) <> Basic Usage To explicitly execute the goal +-----+ m2 war:inplace +-----+ or with the added configuration line on your pom.xml +----------+ ... org.apache.maven maven-war-plugin 2.1 inplace ... ... ... +----------+ 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:inplace +--------+ or specifying the lifecycle phase package +--------+ mvn package +--------+ would generate the exploded webapp in the source tree +--------+ src/main/webapp src/main/webapp/META-INF/maven/com.somecompany.webapp/webapp-service/pom.xml src/main/webapp/META-INF/maven/com.somecompany.webapp/webapp-service/pom.properties src/main/webapp/WEB-INF/lib/runtimedependency-0.0.jar src/main/webapp/WEB-INF/classes/ src/main/webapp/WEB-INF/jsp/anotherwebsource src/main/webapp/WEB-INF/somewebsource src/main/webapp/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. If you use the lifecycle phase invocation, it will also generate the {{{war.html}war}} - "target/webapp-service.war".