Maven, web & ear
I am using maven2 for managing my builds and having a little bit of problem with the new import feature.
I have an ear, ejb and a war with a parent pom.xml. All of the dependencies are defined in the parent pom. When using the intellij maven import features all the war jar dependencies end up as copying to WEB-INF/lib, instead of linking to the jars in the ear. Is there a way that I can make it link to the EAR jars by default.
Additionally I would like to be able to select more than one jar in "Modules and LIbraries to Package" section and be able to change how they are deployed. Right now you can only change one at a time so if you have lots of dependencies it becomes troublesome to change them all.
Please sign in to leave a comment.
Would you please provide simple maven project with such configuration? (jars that are linked to ear)
Now you can not add jar dependency to ear module. This is due to idea model restriction.
That will be fixed in next version and jee-facets configuration UI will be reworked to make it more convenient.
Attached is a small demo. It doesn't really do anything, but you can load it into intellij in order to see the problems. In demo-web/pom.xml is I added these lines.
org.apache.maven.plugins maven-war-plugin 2.0.1 WEB-INF/lib/*.jar true ]]>
The warSourceExcludes tell maven not to put of any of the dependent jars into WEB-INF/lib. The addClasspath tag adds all the dependent jars to the manifest classpath. I think intellij should look for the addClasspath tag with the maven-war-plugin and then decided how dependent jars and modules should be treated in intellij. Whether to add the manifest classpath, or add to WEB-INF/lib
Attachment(s):
demo.zip
Ok, I've understood the problem.
Please, create jira issue for that.
When you say next version, do you mean 7.0.X (a bug fix/improvement release) or 8.X.X (the next major build)? Either one, do you have an E.T.A?
Thanks.
The issue with 'addClasspach' will be fixed in one of following bugfix updates.
You can track the progress watching IDEADEV-22889 jira-issue.
As about web module configuration UI - it will be reworked in next major IDEA version.