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>
 

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

时间: 2024-08-30 07:41:10

Error:Artifact 'xx.war exploded' has invalid extension的相关文章

Intellij Error:Cannot build Artifact &#39;XXX:war exploded&#39; because it is included into a circular dependency

https://stackoverflow.com/questions/42335718/intellij-errorcannot-build-artifact-xxxwar-exploded-because-it-is-included-i 基本按这个来就好了 如果到了build artfact哪里按钮是灰色 就要手动建了 https://jingyan.baidu.com/album/0a52e3f43d9f69bf62ed72f9.html?picindex=8 这里的百度经验真是久违的不

Error:Cannot build artifact &#39;XXX:war exploded&#39; because it is included into a circular dependency (artifact &#39;XXXX:war exploded&#39;, artifact &#39;XXX:war exploded&#39;) Idea启动项目报错解决方案

在Idea中使用Maven创建父子工程,第一个Model的那个项目可以很好的运行,在创建一个Model运行时报这个错.原因是tomcat部署了多个Web项目,可能最开始是两个项目的配置文件混用用,最后就报这个错. 网上找的解决方案: 步骤:File--  Porject Struccture ---- Artifacts 在Tomcat部署时war和war exploded区别: war模式:将WEB工程以包的形式上传到服务器 : war exploded模式:将WEB工程以当前文件夹的位置关系

升级到tomcat8时Artifact SpringMvcDemo:war exploded: Server is not connected. Deploy is not

The method getDispatcherType() is undefined for the type HttpServletRequest 升级到tomcat8 http://segmentfault.com/q/1010000002650778/a-1020000002657581 版权声明:本文为博主原创文章,未经博主允许不得转载. 配置项目,从tomcat低版本,放到tomcat8时,正常的项目居然报错了: The method getDispatcherType() is u

[Java Web学习]Tomcat启动时报war exploded: Error during artifact deployment

报错:Artifact FirstWeb:war exploded: Error during artifact deployment. See server log for details. SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerorg.springframewor

ideaj-tomcat中文乱码,tomcat- Artifact exampley:war exploded: Server is not connected. Deploy is not available.

jsp页面中文乱码: http://blog.csdn.net/lynxzong/article/details/12615333 在jsp的头部加上 <%@ page contentType="text/html;charset=GBK"%> tomcat控制台中文乱码: cmd中开启tomcat,日志的中文显示正常,但是在ideaj控制台里面是乱码: 原因是把jsp那个问题定位错了. 然后根据http://blog.csdn.net/silyvin/article/de

Mysql5.7.11 安装 cacti0.8.8f ,在导入cacti.sql数据库时出现下记错误,导致数据库导入终止: ERROR 1067 (42000) at line 1847: Invalid default value for &#39;status_fail_date&#39;

解决方法:vim /etc/my.cnf 文件,加入 : sql-mode="NO_ENGINE_SUBSTITUTION" , Systemctl restart mysqld 进入mysql的之后可执行: select @@sql_mode 查询当前使用的sql_mode是什么 Mysql5.7.11 安装 cacti0.8.8f ,在导入cacti.sql数据库时出现下记错误,导致数据库导入终止: ERROR 1067 (42000) at line 1847: Invalid

解决java.lang.RuntimeException: mapped-name is required for xxx.xxx.xxx/xx of deployment xx.war

从tomcat 7部署成功的过程部署到JBoss 5.1.0 出现了 java.lang.RuntimeException: mapped-name is required for xxx.xxx.xxx/xx of deployment  xx.war错误,将java文件中所有的@Resource注解改为@Qualifier成功解决,具体原因不是很清楚?

记解决一次“HTTP Error 400. The request URL is invalid”的错误

今天将图片服务切到使用了cdn的机器上面去,然后就部分图片报如下图错误"HTTP Error 400. The request URL is invalid" 看到这种错误信息,一般的开发者心中可能会猜测到两个原因 1.链接中有特殊字符 2.链接长度过长(似乎长度过长也不是这个错,模糊不清,忘记了) 错误图片的地址如下:http://{host}/SearchService.svc/rest/pic600x320/png/kv3hcxmnCmISVvFKojNBGpkN44MRx71v

严重: Error in dependencyCheck java.io.IOException: invalid header field(tomcat启动成功可是訪问web项目404错误)

tomcat启动的时候出现 严重: Error in dependencyCheck java.io.IOException: invalid header field 而且tomcat也不自己主动reload 然后訪问在eclipse里面訪问web页面出现404,原来web程序一直没有被load进tomcat里面 原因:WebContent > META-INF > MANIFEST.MF文件不是多了几个空行就是多了几个空格,导致出现IO错误 解决的方法去掉空格和空行 重新启动tomcat