You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Kees de Kooter <kd...@gmail.com> on 2006/07/14 11:37:22 UTC

Re: overwrite when changing profile

On 2/22/06, Wouter de Vaal <wo...@gmail.com> wrote:
> Hi,
>
> In my project I have created several profiles for different environments like
>                 <profile>
>                         <id>env-local</id>
>                         <activation>
>                                 <property>
>                                         <name>env</name>
>                                         <value>local</value>
>                                 </property>
>                         </activation>
>                         <build>
>                                 <resources>
>                                         <resource>
>                                                 <directory>
>                                                         src/main/profiles/local/resources
>                                                 </directory>
>                                         </resource>
>                                 </resources>
>                         </build>
>                 </profile>
>
> so the src/main/profiles/local/resources contain specific file for the
> correct environments.
> This works ok when I call clean and package the correct profile files
> are selected. However when the target dir is already filled with these
> files it won't override the profile files when I run mvn package.
>
> Is there a way to let mvn override these files, but not having to
> clean the whole target dir?
>

Did you find a solution yet Wouter? If not I will submit a jira issue.
I am having the exact same problem.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: overwrite when changing profile

Posted by Kees de Kooter <kd...@gmail.com>.
Jira issu submitted:  MRESOURCES-24 (please vote!!)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: overwrite when changing profile

Posted by Kees de Kooter <kd...@gmail.com>.
On 7/15/06, Kees de Kooter <kd...@gmail.com> wrote:
> On 7/14/06, David Beckedorff <db...@cellexchange.com> wrote:
> > This doesn't appear to scale if you have both dev, test, prod environments
> > and multiple app server environments e.g. jboss, tomcat, oc4j, weblogic.
> >
> > I'd like to be able to do:   mvn -Pdev,tomcat   or mvn -Pdev,oc4j without
> > having to set up m * n resource folders.
> >
> > ___________________________
> >
>
> True, not too happy with it myself. But for my current project with 4
> profiles it is still manageable.
>
> Guess I am going to post a Jira issue for this.
>

Unfortunately this is not working for war files. Off to Jira!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: overwrite when changing profile

Posted by Kees de Kooter <kd...@gmail.com>.
On 7/14/06, David Beckedorff <db...@cellexchange.com> wrote:
> This doesn't appear to scale if you have both dev, test, prod environments
> and multiple app server environments e.g. jboss, tomcat, oc4j, weblogic.
>
> I'd like to be able to do:   mvn -Pdev,tomcat   or mvn -Pdev,oc4j without
> having to set up m * n resource folders.
>
> ___________________________
>

True, not too happy with it myself. But for my current project with 4
profiles it is still manageable.

Guess I am going to post a Jira issue for this.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: overwrite when changing profile

Posted by David Beckedorff <db...@cellexchange.com>.
This doesn't appear to scale if you have both dev, test, prod environments
and multiple app server environments e.g. jboss, tomcat, oc4j, weblogic.

I'd like to be able to do:   mvn -Pdev,tomcat   or mvn -Pdev,oc4j without
having to set up m * n resource folders.

___________________________

 

David Beckedorff

Senior Developer

CellExchange, Inc.

dbeckedorff@cellexchange.com

Office: (617)528-2196

Cell:   (781)820-0567

 


-----Original Message-----
From: Kees de Kooter [mailto:kdekooter@gmail.com] 
Sent: Friday, July 14, 2006 6:06 AM
To: Maven Users List
Subject: Re: overwrite when changing profile

Anyway, this is my workaround:

  <build>
    <outputDirectory>target/${profile.name}</outputDirectory>

Every profile is built in its own directory.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: overwrite when changing profile

Posted by Kees de Kooter <kd...@gmail.com>.
Anyway, this is my workaround:

  <build>
    <outputDirectory>target/${profile.name}</outputDirectory>

Every profile is built in its own directory.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org