Intellij: Build | Build Artifacts deactivated

33,304

Solution 1

It's likely that you haven't configured that you want to build a .JAR/Artifact.

If you go to to your Project Settings by doing:

Ctrl+Shift+Alt+S

and click on the Artifacts tab on the side.

Then click the Green + at the top, you'll be able to configure your project to build an artifact.

Then Build > Build Artifacts... should not be greyed out and your should be able to build your JAR.

Solution 2

In my case i solved this problem with;

Open pom.xml,

Right Click > Run Maven -> Reimport

After this, i was be able to Build Artifacts.

Share:
33,304
SunflowerToadTheOrbiter
Author by

SunflowerToadTheOrbiter

EXPERTOISE

Updated on July 09, 2022

Comments

  • SunflowerToadTheOrbiter
    SunflowerToadTheOrbiter almost 2 years

    I want to create a .jar File using IntelliJ 2016.1

    When I want to create a .jar file the Build Artifacts is deactivated.

    Is there somthing i must change in my settings or is there somthing missing on my computer? Please help :)

    I dont need help on how to create a JAR file.

  • mblakesley
    mblakesley about 4 years
    This isn't directed at you, but why doesn't Intellij set this automatically? Why do I keep having to add this same setting for each Java project I'm working on? Seems odd for an otherwise helpful IDE.
  • Harmelodic
    Harmelodic about 4 years
    Different projects require different configuration. You wouldn't configure a Spring Boot app using Gradle, in the same way as a Camel project using Maven.
  • Aerox
    Aerox over 3 years
    @mblakesley Agree with you. I have never clicked on "Add" in ProjectSettings any time to build an Artifact since everytime was build automatically and refreshed itself by IntellJ in every change of my POM version. Now is disappeared, and I have to do it manually. Don't understand why...
  • Aerox
    Aerox over 3 years
    @mblakesley Not able to edit my comment, but now I found the answer (at least in my case). Just "Reimport All Maven Projects" and they will come back again.