maven-play2-plugin
maven-play2-plugin copied to clipboard
Building WAR creates it twice, and in different forms
I am wanting to create a WAR for Tomcat 6, and have configured my Build.scala and plugins.sbt file according to the instructions at https://github.com/dlecan/play2-war-plugin/wiki/Configuration, based on the version of Play I am using (v2.1.0) and the target container (servlet 2.5).
When I run "mvn clean package", I am seeing a WAR built twice:
- During the 'package' phase, when it appears to be using the play2-war SBT plugin, creating the web.xml file, and including the appropriate play2-core-servletNN*.jar.
- During the 'package-war' phase, immediately after this, when it appears to be using a more standard Maven WAR packaging. It ignores the war/web.xml file, and includes the incorrect play2-core-servletNN*.jar file.
This second WAR is built in the same place as the first WAR, so it replaces it in the target dir.
Curiously, if I add the "<buildWar>false</buildWar>" setting to the plugin configuration, then the first (correct) WAR is still built during the 'package' phase, but the second (incorrect) WAR is suppressed during the 'package-war' phase.
I'm using the latest plugin (1.2.2) under Java 6, Maven 3.0.3.
jbrugge - could you mention which setting you used to disable this?
Would be great to get a fix for this since the UlgifyJS step is so slow, it would shave 5-10 minutes off our build.
I had set the "buildWar" property to false in the plugin "configuration" element.