You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Christoph <ch...@fjh.com> on 2006/09/08 14:58:42 UTC

[m2] How to exclude config files from JAR?

Hi all,

seems we have a kind of deadlock...

Our project is a mulit-module project consisting of modules A and B (and
others), where B depends on A. 

Additionally, A provides some base classes for the other modules. So we
create and deploy a A-tests.jar and define a dependency in B on this with
scope of test. This all is working fine.

The pain starts now because each module is using a separate configuration
file, basically defining which Spring configuration to use, which has the
same name in all modules. This is needed for tests only, so we put it under
src/test/resources/conf. But when deploying module A it is included in
A-tests.jar, and module B is now using the version from A-tests.jar instead
its own which is lying in module B's src/test/resources/conf -- and the
tests fail  :o(

I understand there is no way to put the project's resources folder BEFORE
the dependencies into Maven's classpath. So basically, we need to exclude
this single file from JAR creation. But I did not find any exclude property
to use for this. Is there any other way to handle this situation? Are there
other any ways?

I suppose our requirements are not so unusual, you could consider it being
the same as using different log4j.properties per module, which hence should
not be included in the JARs.

Thanks a lot,
Christoph.
-- 
View this message in context: http://www.nabble.com/-m2--How-to-exclude-config-files-from-JAR--tf2238912.html#a6208404
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org