zoukankan      html  css  js  c++  java
  • Error:Artifact 'xx.war exploded' has invalid extension

    环境信息:  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>
     
  • 相关阅读:
    vue中封装axios方法
    ajax请求步骤
    angular 封装公共方法
    vue 二级列表折叠面板
    eslint常规语法检
    angular 4 路由变化的时候实时监测刷新组件
    json写入到excel表
    angular4 常用pipe管道
    angular4 在页面跳转的时候传递多个参数到新页面
    easyui 动态加载语言包
  • 原文地址:https://www.cnblogs.com/chenzc/p/4137387.html
Copyright © 2011-2022 走看看