No, he does not! Using profiles to create different result based on
environment is an anti-pattern. In Maven specifically, but also in general
for builds.
Your CM is right. Your artifact (war or what ever) should be environment
generic. Keep the configs outside.

This has been the discussion several times before, so you should find lots
of info in the archive. You shouldn't need to go back more than a few
months.
Search for keywords like "properties jndi config environment" etc.

/Anders

2011/2/28 Ondřej Světlík <ond...@svetlik.info>

> Dne 28.2.2011 14:56, Greg Akins napsal(a):
>
>  I would like some advice for structuring "config" files in a Maven
>> Project.  Could someone give me some suggestions, or pointers to more
>> information?
>>
>> The project needs different config files for each environment (dev,
>> qa, stage, production1, production2).  Right now, in another Mavenized
>> project, I use profiles to create war files for each environment.  So
>> the Configuration Manager needs to run 5 builds to get 5 war files and
>> move them all to the correct environment.
>>
>> Our Configuration Manager would like the build process to result in a
>> single War, and one "config" file for each environment.  Currently,
>> for another project, we create a single War, in an ant build, and then
>> tar the config files with absolute pathnames so it can just be
>> untarred on each server and the config files will end up on the class
>> path.
>>
>> I realize that using automated deploys, or changing some other aspect
>> of the build process might be ideal.  But it might also be difficult
>> for me to inject too much change to the process at this point.
>>
>>
> You want to use profiles:
>
> http://maven.apache.org/guides/introduction/introduction-to-profiles.html
>
> Regards,
>
> Ondrej
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

Reply via email to