Amir Abiri
Amir Abiri

Reputation: 9427

IntelliJ: Automatic artifact discovery for an executable jar

Currently with IntelliJ I don't use the maven command line at all for development - IntelliJ detects war artifacts in the project and automatically produces artifact configurations in Project Structure -> Artifacts which I can then include in "build on make" or in a run configuration.

However for an executable jar that does not seem to happen. Is that simply an oversight by IntelliJ, or am I doing something wrong? In other words, is there a way to tell intelliJ to perform this automatic discovery and creation of artifact configurations for jar modules as well?

Here is an image to illustrate what I'm referring to:

IntelliJ project artifacts window

Upvotes: 0

Views: 399

Answers (2)

kan
kan

Reputation: 28981

There is no standard way to describe an executable jar in a pom file (moreover, you could make an executable .war, extension doesn't make difference). Because such jar just usual jar archive with a main-class manifest entry. So, IDEA cannot deduct it from pom.xml.

Moreover, it doesn't make sense, because war is necessary for web-server deployment. In IDEA you could run any class in any source which has the public static void main method.

Upvotes: 0

CrazyCoder
CrazyCoder

Reputation: 402235

It's not supported yet, submit a feature request with the sample pom.xml to IntelliJ IDEA YouTrack project.

Upvotes: 1

Related Questions