maven


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

Related Links

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

Categories

HOME
xamarin
variables
listview
urbancode
reflection
fme
google-docs
elm
malloc
v8
survey
uber-api
node-notifier
basic
applepay
floating-action-button
mapserver
ups
progressive-web-apps
finite-automata
solaris-10
flux
samoa
lucene.net
emulator
amazonsellercentral
jasonette
graphicsmagick
web-sql
google-search-api
chromium-embedded
h2db
internet-explorer-9
virtualdub
fifo
quote
bpel
key-value-observing
google-cloud-endpoints-v2
semantic-versioning
google-qpx-express-api
http-referer
cloud-code
mmenu
ios5
vapor
total-commander
modelmapper
osx-mavericks
termination
ionicons
dropbox-php
setter
windows-iot-core-10
sqlbulkcopy
account-kit
nested-sets
file-writing
disque
actionbardrawertoggle
apachebench
system.management
msys
qdialog
libressl
dukescript
ionic
interrupted-exception
mono-embedding
pretty-print
python-green
network-interface
rdtsc
preferences
issuu
project-planning
jubula
picturefill
oracle-warehouse-builder
java.nio.file
c18
lcs
angularjs-controller
hamiltonian-cycle
hgsubversion
libc++
stage
subgurim-maps
hamachi
lang
site.master
zend-translate
filtered-index
compiler-specific
mediarss
ubuntu-9.04
multiple-languages

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App