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

Hot swap/Live refresh of java and static resources on IntelliJ with maven and spring boot
spark-java MatcherFilter NullPointerException from jar
Oauth2 with Spring throwing bad credentials
Multi module build in maven or separate builds
I Can't run Arquillian Tests on Wildfly 8.2.0.Final
Gradle maven-publish - custom local maven repository location
Cannot build jboss-eap-quickstarts 6.1.1
how to fix the build with maven in bluemix
Maven Dependency Log on Build?
something wrong with jbpm and kie server
mvn deploy to artifactory (large size artifact) gives broken pipe error
Integrating TestComplete scripts in maven build
Maven Parent - child project issue
Configure Maven installation in Jenkins per individual job
import dependency from a pom file without using inheritance
Using web.xml in Vaadin project

Categories

HOME
wso2
vbscript
magnific-popup
drivers
relayjs
youtube-dl
sharepoint-designer
rubygems
callback
disassembler
convolution
networkx
swagger-ui
directx
append
webrequest
add
virtualization
session-variables
kibana-4
modx-revolution
google-apps-marketplace
windows-7-x64
kryo
opencover
restful-authentication
crosstab
user-interaction
linkerd
windows-error-reporting
fluentvalidation
libuv
uisplitview
cloud-code
mapdb
fusionpbx
scaffold
streamsets
hilbert-curve
xenforo
temporary-files
bootstrapper
user-controls
squib
graphenedb
mapzen
g-code
http-redirect
taffy
xml-documentation
network-flow
upstart
komodoedit
winscp-net
veracode
tizen-native-app
idisposable
r-forge
iso8601
account-kit
yt-project
azure-sdk
sts-springsourcetoolsuite
file-writing
nsfilemanager
impresspages
qpid
persist
fadeout
php-parse-error
revolution-r
unity-networking
rtbkit
vhd
r-tree
python-3.2
quicklisp
angular-leaflet-directive
microbenchmark
sysinternals
generic-programming
e10s
dia
wordpress-theme-customize
code-access-security
dml
concurrent-collections
app42
multiprocessor
geos
rabl
seed
bluepill
broken-links
nsdatecomponents
gnu-prolog
nsobject
coredump
joyent
html-input
gallio
castle-monorail
iweb
javap
temporal-database
thread-local-storage
commodore

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App