Maven部署Web项目报错webxml attribute is required

Maven部署Web项目报错webxml attribute is required

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war   
(default-war) on project com.alpha.webapp: Error assembling WAR:   
webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [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/MojoExecutionException  

 在pom中插入如下即可解决

  

<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.3</version>
				<configuration>
					<warSourceDirectory>src/main/webapp</warSourceDirectory>
				</configuration>
			</plugin>

猜你喜欢

转载自wangjin161.iteye.com/blog/2247556
今日推荐