user902691
user902691

Reputation: 1159

IntelliJ Artifact has invalid extension

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?

Upvotes: 20

Views: 16213

Answers (5)

nps
nps

Reputation: 384

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

Upvotes: 2

Mitja Gustin
Mitja Gustin

Reputation: 1781

  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.

Upvotes: 1

Nicolas Zozol
Nicolas Zozol

Reputation: 7038

Simply add .war to your output directory name. Add .war extension at the right place

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.

Upvotes: 28

Patrick Garner
Patrick Garner

Reputation: 3321

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.

Upvotes: 4

oortcloud_domicile
oortcloud_domicile

Reputation: 850

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

Upvotes: 0

Related Questions