问题
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:
- Open module settings (F4 on your project)
- Go to artifacts
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