java - Why is maven-war-plugin failing for web.xml missing if I configured it not to fail on missing web.xml? -
java - Why is maven-war-plugin failing for web.xml missing if I configured it not to fail on missing web.xml? -
here's challenge: why build failing?
i have configured maven's maven-war-plugin not fail on abscent web.xml file, seems:
<plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-war-plugin</artifactid> <executions> <execution> <id>prepare-war</id> <phase>prepare-package</phase> <configuration> <failonmissingwebxml>false</failonmissingwebxml> <archiveclasses>false</archiveclasses> <archive> <manifest> <addclasspath>true</addclasspath> <classpathprefix /> </manifest> <manifestentries> <implementation-build>${build.number}</implementation-build> <implementation-title>${project.name}</implementation-title> <built-by>${user.name}</built-by> <built-os>${os.name}</built-os> <build-date>${build.date}</build-date> </manifestentries> </archive> <webresources> <resource> <!-- relative pom.xml directory --> <directory>./target/dist</directory> </resource> </webresources> </configuration> </execution> </executions> </plugin>
but despite of configuration keeps failing this:
[error] failed execute goal org.apache.maven.plugins:maven-war-plugin:2.4:war (default-war) on project com.specktro.orchid.operations.portal.frontend: error assembling war: webxml attribute required (or pre-existing web-inf/web.xml if executing in update mode) -> [help 1]
i don't have web.xml, need assemble war without it.
i tried adding bogus <webxml>none</webxml>
config, didn't alter anything...
what missing?
the execution id in pom prepare-war
. maven runs own default execution of war plugin projects packing type war
. default execution has id default-war
. pom configured, war
goal running twice.
if @ error message:
[error] failed execute goal org.apache.maven.plugins:maven-war-plugin:2.4:war (default-war) on project com.specktro.orchid.operations.portal.frontend: error assembling war: webxml attribute required (or pre-existing web-inf/web.xml if executing in update mode) -> [help 1]
you may see execution id fails in parenthesis (default-war)
. if alter execution id default-war
problem go away, , no longer have 2 executions of war goal running.
java maven maven-3 war maven-war-plugin
Comments
Post a Comment