On Tue, Feb 3, 2009 at 1:28 PM, Wayne Fay <[email protected]> wrote:

> In that case, I would probably use profiles (which were designed for
> this purpose exactly) and structure the project as follows:
> no dev1, dev2 directories
> common has all files including config in the proper directory
> (src/main/resources)
> create "dev1" and "dev2" profiles with various values that are
> filtered into the config files during the build, also the profiles
> would set classifiers "dev1" and "dev2" or whatnot
>
> Then you would issue "mvn install -Pdev1" and it would build the code
> with the dev1 values substituted into the config files, and "mvn
> install -Pdev2" would do the same for dev2 values.
>

If you're not expecting to distribute and test both versions, I'd probably
go this way; if you're expecting to treat both as a final artifact, then I'd
probably go for sub-modules.  I'm not sure what the config differences are
intended for, so it's hard to speculate.
-- 
Geoffrey Wiseman
http://www.geoffreywiseman.ca/

Reply via email to