Failed to execute goal org.apache.maven.plugins: The specified web.xml file 'D:\WEB-INF\web.xml' does not exist
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war- plugin:2.1.1:war (default-war) on project CRPS: The specified web.xml file 'D:\WEB-INF\web.xml' does not exist-> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e > switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException NOTE: My project is under D:\MAVEN\ project folder is: D:\MAVEN\CRPS When I click on install in intellij ideas this error is generated. Why it happens?
as you can see the plugin is looking in D:\WEB-INF path to get the web.xml needed to do war packaging and that's obviously wrong place to look. you need to specify explicitly either by passing -Dmaven.war.webxml=..../WEB-INF/web.xml argument at runtime on the terminal or you could put the configuration in your pom by adding <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.3</version> <executions> <execution> <phase>package</phase> <configuration> <webXml>..../WEB-INF/web.xml</webXml> </configuration> </execution> </executions> </plugin> Please note: you don't need to declare the absolute path, relative path to your project pom should be sufficient. Replace the dots with the correct path. I am guessing your are not using the default maven war project layout and that is why you are getting this error. if you were, the plugin would have got the web.xml from src/main/webapp/WEB-INF/web.xml by default as per the below example. pom.xml src main java resources webapp WEB-INF web.xml
Exclude hidden folders to generate archetype
How does Maven order modules in the reactor
CAS: How to overlay a package
Can child poms inherit dependency exclusions defined in the parent pom?
Failed to load class “org.slf4j.impl.StaticLoggerBinder” error
How to run maven plugin for only root of multimodule project [duplicate]
deploy maven project in tomcat8 in eclipse
One of the dependencies (ofbcore:ofbcore-xerces:jar:serializer) is nowhere to be found in the internet
What is the proper set up for Maven to communicate with Docker daemon on Mac?
Something like “mvn undeploy” to remove artifacts from Nexus?
artifactId equivalent in Gradle?
How to configure artifactory for private maven repository
Print pom.xml components variable in Jenkins
How do I figure out what file the Maven war plugin's “XML document structures must start and end within the same entity” is complaining about?
Disable HTML reporting for TestNG with Maven
Maven plug-in dependency