首页 > 其他 > 详细

Error:Artifact 'xx.war exploded' has invalid extension

时间:2014-12-02 14:59:34      阅读:1794      评论:0      收藏:0      [点我收藏+]

环境信息:  IDEA 13 ,  MAVEN, JBOSS 7.   

配置信息: 常规配置。

出错信息: Error:Artifact ‘xx.war exploded‘ has invalid extension 

原因: 出现这种错误的原因是 build 打的 war 包不正确造成的, 修改 pom.xml build war 包部分代码既可。

代码如下:

 <plugin>
       <artifactId>maven-war-plugin</artifactId>
       <configuration>
             <webappDirectory>${project.build.directory}/${project.artifactId}.${project.packaging}</webappDirectory>
             <failOnMissingWebXml>false</failOnMissingWebXml>
       </configuration>
</plugin>

 

mvn clean package ,后错误信息就不在了。

 

参考: stackoverflow : http://stackoverflow.com/questions/24725644/intellij-idea-artifact-xxxxwar-exploded-has-invalid-extension

Actually, you should leave the finalName attribute alone, otherwise you‘ll get the problems you describe. Rather, you should change the config for the maven war plugin to use the webappDirectorylike this:

<plugin>
    <artifactId>maven-war-plugin</artifactId>
    <configuration>
        <webappDirectory>${project.build.directory}/${project.artifactId}.${project.packaging}</webappDirectory>
        <failOnMissingWebXml>false</failOnMissingWebXml>
    </configuration>
</plugin>

 

 

Error:Artifact 'xx.war exploded' has invalid extension

原文:http://www.cnblogs.com/chenzc/p/4137387.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!