Auto-bundling other modules' dependent Jars?

IntelliJ 8's behavior regarding the bundling of libraries into war files seems to have changed compared to version 7:

Module A depends on Module B. Module A has a web facet which builds a war file.
If I add Module B as a dependency of Module A, I would expect that Module B's library dependencies should get automatically bundled into the war's WEB-INF/lib directory. However this is not happening. I have tried the export option (marking the dependency to be exported from Module B) but this makes no difference.

I recall (was I dreaming?) that IntelliJ 7.x did this for me. Without it, I have to redefine all of the dependencies for Modules that are getting included in my war output.

Is this a bug?

0
2 comments

Hello.

By default libraries of modules other than current are not packed (in IDEA 7 too). You need to go into web facet settings, and add the library in the special "Modules and Libraries to Package" editor.

Alexander.

0
Avatar
Permanently deleted user

Hi Alexander,

I just tested this on IDEA 7.0.5 (build 7971) running on Mac OS X. Here are the steps I took:

  1. Began with existing Module A, which has a web facet
  2. Created Module B - a regular Java module with no facets
  3. Created library "Test Library", added it as a dependency for Module B
  4. Visited Module A's dependencies tab (not its web facet), added Module B as a dependency
  5. Visited Module A's web facet, viewed its "Modules and Libraries to package". Saw that "Test Library" had been automatically added with packaging method "Copy files to" and destination "WEB-INF/lib"
  6. Created another library "Test Library 2", and added it as a dependency for Module B
  7. Visited Module A's web facet, viewed its "Modules and Libraries to package". Saw that "Test Library 2" had been automatically added with packaging method "Do not package"


I cannot find any project or IDE configuration settings that suggest that this was not the default behavior for IDEA 7. If there is such a setting - I would be really glad to know where to find it in IDEA 8.

Having just set up a large web project in IDEA 8.0, with many modules and libraries, I feel that this is a significant regression in usability - so I created IDEA-21589.

Any further advice would be very much appreciated,

Thanks,

Chris.

0

Please sign in to leave a comment.