How to disable copying of web resources from module dependencies

Hi!

I have a project with two web modules. One module requires class files of the other module and therefore has this module added as module dependency. Both modules are configured as exploded web directories that point to the local svn checkout, hence 'synchronize exploded directory' is disabled. The output directory is configured to point to WEB-INF/classes of the exploded directory structure.

However, if I define the packaging method of the module added as dependency as 'include module in build' under Web Module Settings, IDEA will not only copy the class files to my module's output directory but also all web resources. When changing the packaging method to 'do not package' IDEA will copy neither resources nor class files.

Is there a possibility to let IDEA only copy the class files and ignore other web resources.

Thx for any suggestions!

werner

2 comments
Comment actions Permalink

Hello Werner,

You should extract java classes used by both modules to a separate Java module.
The you should add the created Java module as a dependency to both Web modules.

Hi!

I have a project with two web modules. One module requires class files
of the other module and therefore has this module added as module
dependency. Both modules are configured as exploded web directories
that point to the local svn checkout, hence 'synchronize exploded
directory' is disabled. The output directory is configured to point to
WEB-INF/classes of the exploded directory structure.

However, if I define the packaging method of the module added as
dependency as 'include module in build' under Web Module Settings,
IDEA will not only copy the class files to my module's output
directory but also all web resources. When changing the packaging
method to 'do not package' IDEA will copy neither resources nor class
files.

Is there a possibility to let IDEA only copy the class files and
ignore other web resources.

Thx for any suggestions!

werner



0
Comment actions Permalink

Hello Nikolay,

thx for your reply. Your suggestion should probably work, but - to be honest - I would rather like to not restructure my project setup in such a way for several reasons (mostly because it complicates setup of the main project and this would affect all team members and require updates to the documentation etc.)

Does anyone know another solution to this problem?

werner

0

Please sign in to leave a comment.