maven-play2-plugin icon indicating copy to clipboard operation
maven-play2-plugin copied to clipboard

Building WAR creates it twice, and in different forms

Open jbrugge opened this issue 11 years ago • 2 comments

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 avatar May 10 '13 19:05 jbrugge

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.

cmicali avatar Sep 30 '13 20:09 cmicali

I had set the "buildWar" property to false in the plugin "configuration" element.

jbrugge avatar Sep 30 '13 22:09 jbrugge