您的位置:首页 > 大数据 > 人工智能

maven install Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-wa

2015-09-25 08:47 691 查看
在使用maven构建web项目的时候,需要检查src-main-webapp下是否有web-info的目录,如果没有要手动的添加,并在web-info下添加web.xml文件,否则在执行maven-install命令的时候会出现报错

maven install Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war)

如果webapp目录下有web-info路径以及web.xml 则需要检查pom.xml文件中,是否有maven-war-plugin插件配置,在<build>节点中增加:

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<webResources>
<resource>
<directory>WebContent</directory>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: