Hi,

this could be done using profiles and resource filtering (google for resource filtering, in the maven book there's some info about that as well)... or

If it really needs to be two artifacts another way would be to have three modules, one doing the work, and two "cache-access" and "no-cache-access" depending on the worker, containing only the config... not very beautiful as well.

but :-):

I think you should rethink the approach with two artifacts.. one artifact with a property file could do the trick ? or configuration in the database ?

hth,
tom

Andy Law schrieb:
All,

Can someone first of all either confirm that I am on the right track or tell
me that I am an idiot and point me in the right direction.

If I *am* on the right track, can someone give me a shove towards the right
configuration.

I have a module that is part of a larger project. It is required by two
other modules, but each requires a subtly different configuration. I would
like to minimise (eliminate) any code duplication and have each dependency
get built automagically. At present my developers are working around it by
manually toggling the configuration file and the artifact name but I know
there has to be a better way to do it.

Basically, we have a load of data access code that hits a datasource. I need
to build two versions of this artifact, one which is configured to cache the
hits from the datasource and the other which is to hit the datasource each
time. This is configured in a file embedded within the jar by the build.

I figure that I should be able to make one module with all the code and the
default (cache) setup in it. I think that I can then configure the no-cache
module to depend on the cache version and then use the assembly plugin to
unpack the jar into the build directory then have the no-cache configuration
file stomp on the cache version and have the jar be all packaged back up
again.

Am I right in my line of thinking?

Thanks in advance for any help.


Later,

Andy Law


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to