I am trying to make a simply "mvn clean install" execution in a Maven project but it fails with this error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war->plugin:2.2:war (default-war) on project xxxx: The specified web.xml file >'foo/target/classes/web.xml' does not exist ->
The configuration of the maven-war-plugin is:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<resource>
<directory>${basedir}/src/main/webapp</directory>
<includes>
<include>index.html</include>
<include>build-info.html</include>
<include>swagger-ui/index.html</include>
</includes>
<filtering>true</filtering>
</webResources>
<finalName>xxxx</finalName>
<failOnMissingWebXml>false</failOnMissingWebXml>
<webXml>${project.build.outputDirectory}/web.xml</webXml>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
I don't know why it fails if is false. The web.xml file in the project is allocated in another folder, not in ${project.build.outputDirectory}/web.xml, but I can't modify the POM.xml because I only need to run the Maven install process.
Besides, in my POM configuration I don't have any phase detailed, so the problem I have is different than other post related. I am trying to set maven.war.webXml path but it doesn't make none for me.
Thanks in advance.