IsaacLevon
IsaacLevon

Reputation: 2580

Building maven project with IntelliJ doesn't create JAR

When running the following command in the terminal, I can see in the target directory the JAR file, whereas when building with IntelliJ I only see the compiled classes.

Why?

enter image description here

Upvotes: 2

Views: 448

Answers (2)

Andrey
Andrey

Reputation: 16411

To get the jar built by IDE you need to configure the jar Artifact to build:

enter image description here

Upvotes: 4

Chao Luo
Chao Luo

Reputation: 2696

If you want to build your project and execute run actions through Maven, you need to delegate all those actions to Maven with the Delegate IDE build/run actions to maven option located in the Maven settings.

Build a project with Maven # Click icons general settings svg in the Maven tool window. Alternatively, from the main menu select File | Settings/Preferences | Build, Execution, Deployment |Build Tools | Maven.

Click Maven and from the list, select Runner.

On the Runner page, select Delegate IDE build/run actions to maven.

more detail see here

Upvotes: 1

Related Questions