IntelliJ Artifact has invalid extension

☆樱花仙子☆ 提交于 2019-12-22 01:41:12

问题


I have strange a problem with deploying an artifact on jboss. After generating the default spring-mvc project in IntelliJ, I tried to run it, but IntelliJ showed in "Run/Debug Configuration" a message that my "Artifact XYZ:war exploded has invalid extension".

I found advice on stackoverflow "change extension" but I have correct .war extension.

What is wrong?


回答1:


Simply add .war to your output directory name.

Unfortunately changing the pom.xml with Maven will probably result into a modification of the output directory, and you will have to do it again.




回答2:


There is a bug report that's over two years old. Still hasn't been resolved. Here is another bug report, also two years old, that's marked as a duplicate.




回答3:


  1. Open module settings (F4 on your project)
  2. Go to artifacts
  3. make sure that Output directory points to folder with suffix ".war"

    XXsomewar_exploded.war

If not, just delete all artifacts with red minus sign, and click then plus sign and select war exploaded. Then also select Build on make checkbox

Go also to your project on disk, and check folder out, if it containes exploaded war folder and if stuff is inside.




回答4:


This is the bug in IntelliJ. It does not support upper case on Artifact.




回答5:


I replaced the artifact to be deployed from exploded to war in server configuration and it worked fine for me



来源:https://stackoverflow.com/questions/16678910/intellij-artifact-has-invalid-extension

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!