I'd like to set the filename of the jar artifact that I build with Intellij, but as I change it, it doesn't change in the output file.
Asked
Active
Viewed 9,262 times
10
-
Not enough information. Make screenshot. – Meo Feb 24 '14 at 12:50
-
Might be a stupid suggestion, but did you press *Apply*? – Dropout Feb 24 '14 at 13:48
-
Yes I did, it keeps to generete the file with the old name – turinho Feb 24 '14 at 13:50
-
I'm seeing the exact same thing. No matter what I do, it stays IntelliJ.jar (the name of my module/project) – Flyview May 15 '14 at 18:12
2 Answers
15
Using 2017.2.5 I am able to change the artifact name using the following steps:
- File > Project Structure.
- Under Project Settings > Artifacts.
- Add a new or modify existing artifact.
- Under Output Layout you can actually rename your JAR file to whatever you want, be sure to hit on enter to have the IDE eat up the change.
Screenshot:

Rejinderi
- 11,694
- 2
- 31
- 40
-
1The key piece of information for me was to press Enter. On the Mac, pressing Return isn't enough. Press the real Enter key (on the keypad) or Fn-Return on a keyboard without a separate Enter key. – Barry Brown May 15 '19 at 22:30
4
Here is a workaround to change the filename of the JAR artifact...
- From the Project pane, rename the module to what you'd like the JAR file to be named. The filename of the JAR is is captured from the name of the module at the time you create the artifact config.
- Go into
Build Artifacts->Edit..
and delete the old artifact that is making the wrong JAR file name. - Add a new JAR Artifact. This new artifact will use whatever the name of the module is.
- You can now go back and change the module name back.
Ugly, but works.
Note that you will likely hit this bug next, so make sure you do not use the default main/java
path to the manifest. Instead manually change it to main/resources
- and then go vote to have both these bugs fixed!

bigjosh
- 1,273
- 13
- 19