Jar artifacts not being imported from Maven projects.

Apologies for the repost. I initially posted this in the Open API forum by mistake.

I've noticed that when I import a Maven war based project:

That IJ generates a corresponding artifact of War type in the project structure. However when I change the project to generate a jar artifact, no corresponding jar type artifact is generated on import.

Is this working as intended?  Is there a way to get IJ to include build system generated jar artifacts into the project structure?


Comment actions Permalink

Thanks for the pointer!  However this seems like a slightly different issue. The user wants the war artifact to still be detected when creating it as a profile but not using it as the default packaging type.

My issue is that when using <packaging>jar</packaging> no jar artifact is configured in the project structure on Maven import. It only seems to work for wars.

Comment actions Permalink

Is this working as intended?

Yes, it seems there were not found any useful usecases to have it automatically generated for all maven projects.

Could you tell why do you want to have it for all maven jar modules? What is your usecase for that?
Note, you can create the JAR artifact manually, and it's rather simple, see details at https://www.jetbrains.com/idea/help/configuring-artifacts.html

The worth of auto-generated war/ear artifacts is the ability to keep it in sync with maven confgiuration, e.g. syncing dependency changes packed into the artifact.


Comment actions Permalink

Hi Vlad,

The scenario I was looking to support was adding a plugin feature to automatically deploy a user's Java artifacts (jar and war) to a cloud provider.  

Since jars with embedded servers have become a popular format for Java webapps I was hoping that IJ would add the jars to the list of project artifacts for Maven and Gradle projects that generated them.


Please sign in to leave a comment.