more reorg

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@295085 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2005-10-05 19:04:41 +00:00
parent f2d55452c5
commit b9e1d44ad0
14 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,60 @@
it's possible to do it with m2 beta-1 and profiles.
you declare profile in your pom like this :
<profiles>
<profile>
<id>env-test</id>
<activation>
<property>
<name>env</name>
<value>test</value>
</property>
</activation>
<properties>
<appProperties>test.properties</appProperties>
</properties>
</profile>
<profile>
<id>env-production</id>
<activation>
<property>
<name>env</name>
<value>production</value>
</property>
</activation>
<properties>
<appProperties>app.properties</appProperties>
</properties>
</profile>
</profiles>
and you can run m2 with one of profiles like :
m2 -P env-production clean:clean install ==> we use the profile id
or
m2 -Denv=test clean:clean install ==> we use the property env define in
<activation>
Emmanuel
martin.kuhn@merkur.at wrote:
> Hi,
>
> I'm a maven newbie and I try out maven 2.0 alpha 3.
>
> My questions:
>
> I have a project to build / deploy for three different enviroments (test,
> integration, production).
>
> The difference beetween the bundles is only a properties file (there are
> three different files: config-test.properties,
> config-integration.properties ...).
> In the build process I want to copy the right config file to a file with a
> common name (config.properties -> the app should work with this config
> file)
>
> Is there a solution to handle this with maven 2 or do I have to write a
> plugin?
>
>