It sounds like you are mostly stuck on the config files issue so I'll focus on 
that.  Ron already answered this, but I had this typed and didn't send it for 
some reason.  I'm basically repeating what he's already said.

I would organize the config files into a separate top-level project, then have 
these other projects depend on it.  The output of this project will be your 
config files as a jar, but I would suggest not worrying about that in the 
config file build.  The m2 repo needs to have a single artifact per build, and 
it does not make sense to have one build per config file, if you see what I 
mean.

So what you would do here is use the assembly plugin to extract the config 
files you need from the config file artifact jar for each specific product 
scenario.  If there are separate POMs for each product scenario, you could copy 
the plugin to each module with a separate <configuration> element for the file 
selection used by that specific product.  

Or you could put the assembly plugin in a parent build one time, but have it 
rely on <properties> elements in the child build.  In this manner, product 
scenarios share a common POM with the single assembly plugin, but each child 
POM has the specific config files listed.

There's probably other ways to accomplish this, but that's the path I would go 
if I were doing it.

Brian

On Mar 26, 2011, at 12:15 PM, Adam Retter wrote:

> Hi there,
> 
> I am trying to migrate a complex Ant setup to Maven and need some help
> about how we can share our config files.
> 
> I have a series of Maven project modules that make up the Jar files
> for my project. I also need to produce several end product scenarios -
> 
> 1) A WAR file for users to deploy in Tomcat etc.
> 2) A IzPack installer distribution (I have seen the IzPack plugin).
> 3) Several Zip file distributions, various combinations of the output
> of my maven modules.
> 
> I understand that I can create a Maven module to produce each of
> these, and that is indeed my intention.
> 
> However, I have some common config files etc that I need to
> incorporate into each of these final product scenarios.
> So my question is, where can I keep these config files???
> 
> I would like to have one atomic version of them, that can be reused by
> each scenario, some sort of dependency. To complicate things -
> 1) These config files typically are generated from template XML files
> using XSLT, with some parameters injected into the XSLT depending on
> the scenario.
> 2) These config files need to be easily modified by our end-users, who
> use our product scenarios, so packaging them into Jar files is a not a
> good idea.
> 
> Thanks Adam.
> 
> 
> 
> -- 
> Adam Retter
> 
> skype: adam.retter
> tweet: adamretter
> http://www.adamretter.org.uk
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to