You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Sridhar Laxmipuram Srinivasan <sr...@yahoo-inc.com> on 2010/08/26 13:16:11 UTC

Multiple profile execution in maven

Hi,
I have 2 profiles which are deactivated by default but at run time I need to execute both of them, I have tried with -P<x>,<y> but of no use it always executes the latter, Could you kindly provide me a solution to this. I am using maven 2.2.1 version

thnkx
sridharl


Re: Multiple profile execution in maven

Posted by ni...@hsbcib.com.
You can use a comma separated list -Px,y





Stephen Connolly <st...@gmail.com> 
Aug 26 2010 13:43

Mail Size: 6227

Please respond to
"Maven Users List" <us...@maven.apache.org>


To
Maven Users List <us...@maven.apache.org>
cc

Subject
Re: Multiple profile execution in maven

  Entity
   HSBC Bank plc - HBEU



I think you use multiple -P's to activate them

-Px -Py

but that could all just be my imagination ;-)

On 26 August 2010 12:33, Anders Hammar <an...@hammar.net> wrote:

> It should work. However, I'm not sure if I have ever enabled more than 
one
> profile from command line.
> Just for the heck of it, could you try adding a space between -P and the
> profiles list ("-P x,y")?
>
> /Anders
>
> On Thu, Aug 26, 2010 at 13:16, Sridhar Laxmipuram Srinivasan <
> sridharl@yahoo-inc.com> wrote:
>
> > Hi,
> > I have 2 profiles which are deactivated by default but at run time I 
need
> > to execute both of them, I have tried with -P<x>,<y> but of no use it
> always
> > executes the latter, Could you kindly provide me a solution to this. I 
am
> > using maven 2.2.1 version
> >
> > thnkx
> > sridharl
> >
> >
>



************************************************************
HSBC Bank plc
Registered Office: 8 Canada Square, London E14 5HQ
Registered in England - Number 14259
Authorised and regulated by the Financial Services Authority
************************************************************


-----------------------------------------
SAVE PAPER - THINK BEFORE YOU PRINT!

This transmission has been issued by a member of the HSBC Group
"HSBC" for the information of the addressee only and should not be
reproduced and/or distributed to any other person. Each page
attached hereto must be read in conjunction with any disclaimer
which forms part of it. Unless otherwise stated, this transmission
is neither an offer nor the solicitation of an offer to sell or
purchase any investment. Its contents are based on information
obtained from sources believed to be reliable but HSBC makes no
representation and accepts no responsibility or liability as to its
completeness or accuracy.

Re: RE: Multiple profile execution in maven

Posted by Wendy Smoak <ws...@gmail.com>.
On Fri, Aug 27, 2010 at 4:33 PM, Sridhar Laxmipuram Srinivasan
<sr...@yahoo-inc.com> wrote:

> Multiple profile execution is the actual requirement for me,

Unlikely.  What are you actually trying to *do* with the multiple profiles?

-- 
Wendy

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


RE: RE: Multiple profile execution in maven

Posted by Sridhar Laxmipuram Srinivasan <sr...@yahoo-inc.com>.
Benson,Wayne! Thnkx a ton for your input, you know what it just worked for me...
The below did the trick...
1st profile:
-------------
 <executions>
  <execution>
   <id>test 1</id>
    <goals>
      <goal>test</goal>
    </goals>
</execution>
</executions>


2nd profile:
------------
<executions>
  <execution>
   <id>test 2</id>
    <goals>
      <goal>test</goal>
    </goals>
</execution>
</executions>

Thnkx to wendy,anders and to all of you who spent your valuable time on answering my idiotic question.....

There are 10 people working in my team including me, To the question when I asked to my team, I got replies that multiple profile execution is not possible.... But now I can proudly demo them and justify multiple profile execution indeed works well...

This forum just rocks....

Many thnkx...

Thnkx
sridharl
          

-----Original Message-----
From: Wayne Fay [mailto:waynefay@gmail.com] 
Sent: Saturday, August 28, 2010 2:32 AM
To: Maven Users List
Subject: Re: RE: Multiple profile execution in maven

As Benson already said... you will need to use distinct execution ids
when you have multiple declarations of plugins in multiple profiles.

Go here:
http://maven.apache.org/guides/mini/guide-configuring-plugins.html

Then scroll down to Configuring Build Plugins and Using the
<executions/> Tag. You will need to read and really understand that
section to make this work as you expect.

Wayne

On Fri, Aug 27, 2010 at 3:33 PM, Sridhar Laxmipuram Srinivasan
<sr...@yahoo-inc.com> wrote:
> Multiple profile execution is the actual requirement for me, since maven supports this I am trying to debug why the heck it is not working, I have a workaround which I am using that is put individual profile execution in a shell script and execute them and I works fine, but I want to utilize maven utility to the fullest, may be the word experimenting mislead you, I have configured surefire report directory to be unique, so there is no chance one overwriting the other, if you look at my pom you will know, directories are *Comments1* and *Comments*
>
> Thnkx
> sridharl
>
> -----Original Message-----
> From: Benson Margulies [mailto:bimargulies@gmail.com]
> Sent: Saturday, August 28, 2010 1:41 AM
> To: Maven Users List
> Subject: Re: RE: Multiple profile execution in maven
>
> I think that what the OP needs to know is that, to get multiple
> executions from multiple profiles, each one has to have a distinctive
> execution ID, not the default.
>

---------------------------------------------------------------------
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: RE: Multiple profile execution in maven

Posted by Wayne Fay <wa...@gmail.com>.
As Benson already said... you will need to use distinct execution ids
when you have multiple declarations of plugins in multiple profiles.

Go here:
http://maven.apache.org/guides/mini/guide-configuring-plugins.html

Then scroll down to Configuring Build Plugins and Using the
<executions/> Tag. You will need to read and really understand that
section to make this work as you expect.

Wayne

On Fri, Aug 27, 2010 at 3:33 PM, Sridhar Laxmipuram Srinivasan
<sr...@yahoo-inc.com> wrote:
> Multiple profile execution is the actual requirement for me, since maven supports this I am trying to debug why the heck it is not working, I have a workaround which I am using that is put individual profile execution in a shell script and execute them and I works fine, but I want to utilize maven utility to the fullest, may be the word experimenting mislead you, I have configured surefire report directory to be unique, so there is no chance one overwriting the other, if you look at my pom you will know, directories are *Comments1* and *Comments*
>
> Thnkx
> sridharl
>
> -----Original Message-----
> From: Benson Margulies [mailto:bimargulies@gmail.com]
> Sent: Saturday, August 28, 2010 1:41 AM
> To: Maven Users List
> Subject: Re: RE: Multiple profile execution in maven
>
> I think that what the OP needs to know is that, to get multiple
> executions from multiple profiles, each one has to have a distinctive
> execution ID, not the default.
>

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


RE: RE: Multiple profile execution in maven

Posted by Sridhar Laxmipuram Srinivasan <sr...@yahoo-inc.com>.
Multiple profile execution is the actual requirement for me, since maven supports this I am trying to debug why the heck it is not working, I have a workaround which I am using that is put individual profile execution in a shell script and execute them and I works fine, but I want to utilize maven utility to the fullest, may be the word experimenting mislead you, I have configured surefire report directory to be unique, so there is no chance one overwriting the other, if you look at my pom you will know, directories are *Comments1* and *Comments*

Thnkx
sridharl

-----Original Message-----
From: Benson Margulies [mailto:bimargulies@gmail.com] 
Sent: Saturday, August 28, 2010 1:41 AM
To: Maven Users List
Subject: Re: RE: Multiple profile execution in maven

I think that what the OP needs to know is that, to get multiple
executions from multiple profiles, each one has to have a distinctive
execution ID, not the default.

On Fri, Aug 27, 2010 at 4:03 PM, Wayne Fay <wa...@gmail.com> wrote:
>> if you look at both of the profiles except for id and surefire report directory
>> everything else are same, is there mandatory requirement for maven to uniquely
>> identify a profile or else it will silently ignore the profile?, my setting.xml does
>
> The surefire plugin does not accept multiple values for the report
> directory. Thus, one profile is writing over the other when it comes
> to that param value.
>
> This makes perfect sense. This is like trying to use 2 profiles for
> the compiler plugin -- one that sets source to 1.5, another that sets
> it to 1.6 -- clearly one has to overwrite the other.
>
> What are you really trying to do here? Or is this just
> "experimentation" and time wasting?
>
> Wayne
>
> ---------------------------------------------------------------------
> 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


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


Re: RE: Multiple profile execution in maven

Posted by Benson Margulies <bi...@gmail.com>.
I think that what the OP needs to know is that, to get multiple
executions from multiple profiles, each one has to have a distinctive
execution ID, not the default.

On Fri, Aug 27, 2010 at 4:03 PM, Wayne Fay <wa...@gmail.com> wrote:
>> if you look at both of the profiles except for id and surefire report directory
>> everything else are same, is there mandatory requirement for maven to uniquely
>> identify a profile or else it will silently ignore the profile?, my setting.xml does
>
> The surefire plugin does not accept multiple values for the report
> directory. Thus, one profile is writing over the other when it comes
> to that param value.
>
> This makes perfect sense. This is like trying to use 2 profiles for
> the compiler plugin -- one that sets source to 1.5, another that sets
> it to 1.6 -- clearly one has to overwrite the other.
>
> What are you really trying to do here? Or is this just
> "experimentation" and time wasting?
>
> Wayne
>
> ---------------------------------------------------------------------
> 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: RE: Multiple profile execution in maven

Posted by Wayne Fay <wa...@gmail.com>.
> if you look at both of the profiles except for id and surefire report directory
> everything else are same, is there mandatory requirement for maven to uniquely
> identify a profile or else it will silently ignore the profile?, my setting.xml does

The surefire plugin does not accept multiple values for the report
directory. Thus, one profile is writing over the other when it comes
to that param value.

This makes perfect sense. This is like trying to use 2 profiles for
the compiler plugin -- one that sets source to 1.5, another that sets
it to 1.6 -- clearly one has to overwrite the other.

What are you really trying to do here? Or is this just
"experimentation" and time wasting?

Wayne

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


RE: RE: Multiple profile execution in maven

Posted by Sridhar Laxmipuram Srinivasan <sr...@yahoo-inc.com>.
Anders! You are right I am just experimenting with 2 dummy profiles, if you look at both of the profiles except for id and surefire report directory everything else are same, is there mandatory requirement for maven to uniquely identify a profile or else it will silently ignore the profile?, my setting.xml does not have any profile information, it just has few mirror settings. I know I am doing something wrong because it is working for others...
Till now trying in vain, behavior is same

Thnkx
sridharl

-----Original Message-----
From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On Behalf Of Anders Hammar
Sent: Friday, August 27, 2010 7:22 PM
To: Maven Users List
Subject: Re: RE: Multiple profile execution in maven

Both profiles har active according att help:active-profiles. The problem is
elsewhere. Most likely inte the expected outcome.

/Anders (mobile)

Den 2010 8 27 15:27 skrev "Gorham-Engard, Frank" <
Frank_Gorham-Engard@cable.comcast.com>:
> I have read that any activation of any profile on the command line will
disable all profiles that are active by default. Is that still the way Maven
works?
>
> If it is, perhaps, the first profile 'x' in -Px,y was active by default so
the command line setting was ignored and then the second profile 'y' was
activated, disabling the first profile.
>
> What do you guys think? Could that be it? Perhaps if the order were
reversed it would work as desired.
>
> <!-- Frank Gorham-Engard →
> "Be kinder than necessary.
>   Everyone is fighting some kind of battle."
>
>
> -----Original Message-----
> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
Behalf Of Anders Hammar
> Sent: Thursday, August 26, 2010 9:10 AM
> To: Maven Users List
> Subject: Re: Multiple profile execution in maven
>
> I checked the docs at maven.apache.org and they say comma list. But as
> always, there might be bugs...:-)
>
> /Anders
>
> On Thu, Aug 26, 2010 at 14:42, Stephen Connolly <
> stephen.alan.connolly@gmail.com> wrote:
>
>> I think you use multiple -P's to activate them
>>
>> -Px -Py
>>
>> but that could all just be my imagination ;-)
>>
>> On 26 August 2010 12:33, Anders Hammar <an...@hammar.net> wrote:
>>
>> > It should work. However, I'm not sure if I have ever enabled more than
>> one
>> > profile from command line.
>> > Just for the heck of it, could you try adding a space between -P and
the
>> > profiles list ("-P x,y")?
>> >
>> > /Anders
>> >
>> > On Thu, Aug 26, 2010 at 13:16, Sridhar Laxmipuram Srinivasan <
>> > sridharl@yahoo-inc.com> wrote:
>> >
>> > > Hi,
>> > > I have 2 profiles which are deactivated by default but at run time I
>> need
>> > > to execute both of them, I have tried with -P<x>,<y> but of no use it
>> > always
>> > > executes the latter, Could you kindly provide me a solution to this.
I
>> am
>> > > using maven 2.2.1 version
>> > >
>> > > thnkx
>> > > sridharl
>> > >
>> > >
>> >
>>

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


Re: RE: Multiple profile execution in maven

Posted by Anders Hammar <an...@hammar.net>.
Both profiles har active according att help:active-profiles. The problem is
elsewhere. Most likely inte the expected outcome.

/Anders (mobile)

Den 2010 8 27 15:27 skrev "Gorham-Engard, Frank" <
Frank_Gorham-Engard@cable.comcast.com>:
> I have read that any activation of any profile on the command line will
disable all profiles that are active by default. Is that still the way Maven
works?
>
> If it is, perhaps, the first profile 'x' in -Px,y was active by default so
the command line setting was ignored and then the second profile 'y' was
activated, disabling the first profile.
>
> What do you guys think? Could that be it? Perhaps if the order were
reversed it would work as desired.
>
> <!-- Frank Gorham-Engard →
> "Be kinder than necessary.
>   Everyone is fighting some kind of battle."
>
>
> -----Original Message-----
> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
Behalf Of Anders Hammar
> Sent: Thursday, August 26, 2010 9:10 AM
> To: Maven Users List
> Subject: Re: Multiple profile execution in maven
>
> I checked the docs at maven.apache.org and they say comma list. But as
> always, there might be bugs...:-)
>
> /Anders
>
> On Thu, Aug 26, 2010 at 14:42, Stephen Connolly <
> stephen.alan.connolly@gmail.com> wrote:
>
>> I think you use multiple -P's to activate them
>>
>> -Px -Py
>>
>> but that could all just be my imagination ;-)
>>
>> On 26 August 2010 12:33, Anders Hammar <an...@hammar.net> wrote:
>>
>> > It should work. However, I'm not sure if I have ever enabled more than
>> one
>> > profile from command line.
>> > Just for the heck of it, could you try adding a space between -P and
the
>> > profiles list ("-P x,y")?
>> >
>> > /Anders
>> >
>> > On Thu, Aug 26, 2010 at 13:16, Sridhar Laxmipuram Srinivasan <
>> > sridharl@yahoo-inc.com> wrote:
>> >
>> > > Hi,
>> > > I have 2 profiles which are deactivated by default but at run time I
>> need
>> > > to execute both of them, I have tried with -P<x>,<y> but of no use it
>> > always
>> > > executes the latter, Could you kindly provide me a solution to this.
I
>> am
>> > > using maven 2.2.1 version
>> > >
>> > > thnkx
>> > > sridharl
>> > >
>> > >
>> >
>>

RE: Multiple profile execution in maven

Posted by "Gorham-Engard, Frank" <Fr...@cable.comcast.com>.
I have read that any activation of any profile on the command line will disable all profiles that are active by default. Is that still the way Maven works?

If it is, perhaps, the first profile 'x' in -Px,y was active by default so the command line setting was ignored and then the second profile 'y' was activated, disabling the first profile.

What do you guys think? Could that be it? Perhaps if the order were reversed it would work as desired.

<!-- Frank Gorham-Engard →
"Be kinder than necessary. 
  Everyone is fighting some kind of battle."


-----Original Message-----
From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On Behalf Of Anders Hammar
Sent: Thursday, August 26, 2010 9:10 AM
To: Maven Users List
Subject: Re: Multiple profile execution in maven

I checked the docs at maven.apache.org and they say comma list. But as
always, there might be bugs...:-)

/Anders

On Thu, Aug 26, 2010 at 14:42, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:

> I think you use multiple -P's to activate them
>
> -Px -Py
>
> but that could all just be my imagination ;-)
>
> On 26 August 2010 12:33, Anders Hammar <an...@hammar.net> wrote:
>
> > It should work. However, I'm not sure if I have ever enabled more than
> one
> > profile from command line.
> > Just for the heck of it, could you try adding a space between -P and the
> > profiles list ("-P x,y")?
> >
> > /Anders
> >
> > On Thu, Aug 26, 2010 at 13:16, Sridhar Laxmipuram Srinivasan <
> > sridharl@yahoo-inc.com> wrote:
> >
> > > Hi,
> > > I have 2 profiles which are deactivated by default but at run time I
> need
> > > to execute both of them, I have tried with -P<x>,<y> but of no use it
> > always
> > > executes the latter, Could you kindly provide me a solution to this. I
> am
> > > using maven 2.2.1 version
> > >
> > > thnkx
> > > sridharl
> > >
> > >
> >
>

Re: Multiple profile execution in maven

Posted by Eric Rotick <pc...@gmail.com>.
Have you got any profiles confiured in your settings.xml which we won't have
used simply by using your pom?

On Fri, Aug 27, 2010 at 12:35 PM, Sridhar Laxmipuram Srinivasan <
sridharl@yahoo-inc.com> wrote:

> Yes now the fun part :)
> When I do mvn help:active-profiles -P CommentsBAT,BAT it shows me both are
> active but when I execute it does not execute both, I am completely blank
> here....
>
> [INFO] [help:active-profiles {execution: default-cli}]
> [INFO]
> Active Profiles for Project
> 'com.yahoo.qa.yWsNG.UGCCloud.UGCComments.tests:UGCComments-app:jar:1.0-SNAPSHOT':
>
> The following profiles are active:
>
>  - BAT (source: pom)
>  - CommentsBAT (source: pom)
>
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 1 second
> [INFO] Finished at: Fri Aug 27 11:34:02 GMT 2010
> [INFO] Final Memory: 7M/38M
> [INFO]
> ------------------------------------------------------------------------
>
>
> I do not know what wrong I am doing here
>
>
> Thnkx
> sridharl
>
> -----Original Message-----
> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
> Behalf Of Anders Hammar
> Sent: Friday, August 27, 2010 5:00 PM
> To: Maven Users List
> Subject: Re: Multiple profile execution in maven
>
> It works for me with Maven 2.2.1.
> Try this:
>
> mvn help:active-profiles -P CommentsBAT,BAT
>
> /Anders
>
> On Fri, Aug 27, 2010 at 13:10, Sridhar Laxmipuram Srinivasan <
> sridharl@yahoo-inc.com> wrote:
>
> > I am trying to execute like below:
> >
> > mvn -PCommentsBAT,BAT
> >
> > The above execute CommentsBAT but not BAT
> >
> >
> > My pom is like below:-
> > <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance"
> >  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> > http://maven.apache.org/maven-v4_0_0.xsd">
> >  <modelVersion>4.0.0</modelVersion>
> >  <groupId>com.yahoo.qa.yWsNG.UGCCloud.UGCComments.tests</groupId>
> >  <artifactId>UGCComments-app</artifactId>
> >  <packaging>jar</packaging>
> >  <version>1.0-SNAPSHOT</version>
> >  <name>UGCComments</name>
> >  <url>http://maven.apache.org</url>
> >  <dependencies>
> >    <dependency>
> >                        <groupId>org.testng</groupId>
> >                        <artifactId>testng</artifactId>
> >                        <version>1.0</version>
> >                </dependency>
> > </dependencies
> > <profiles>
> >         <profile>
> >      <id>BAT</id>
> >      <properties>
> >        <comments_artifact></comments_artifact>
> >        </properties>
> >        <activation>
> >      <activeByDefault>false</activeByDefault>
> >      </activation>
> >        <dependencies>
> >       <dependency>
> >      <groupId>Jsonparser</groupId>
> >      <artifactId>Jsonparser</artifactId>
> >      <version>0.1</version>
> >      </dependency>
> >      </dependencies>
> >          <build>
> >     <plugins>
> >      <plugin>
> >         <artifactId>maven-compiler-plugin</artifactId>
> >        <configuration>
> >          <source>1.6</source>
> >          <target>1.6</target>
> >        </configuration>
> >      </plugin>
> >            <plugin>
> >        <groupId>org.apache.maven.plugins</groupId>
> >        <artifactId>maven-surefire-plugin</artifactId>
> >        <version>2.5</version>
> >        <configuration>
> >          <skipTests>false</skipTests>
> >        <argLine>-Xmx512m</argLine>
> >               <suiteXmlFiles>
> >
> > <suiteXmlFile>src/test/resources/CommentsWS.xml</suiteXmlFile>
> >                   <!--
> > <suiteXmlFile>src/test/resources/testng_selng.xml</suiteXmlFile>-->
> >                </suiteXmlFiles>
> >
> >
> <reportsDirectory>${project.build.directory}/Comments1/reports/surefire</reportsDirectory>
> >          <properties>
> >          <properties>
> >
> > <maven.test.failure.ignore>true</maven.test.failure.ignore>
> >         </properties>
> >          <property>
> >                <name>listener</name>
> >
> >
>  <value>com.yahoo.test.SelNG.framework.util.MethodSorter,org.uncommons.reportng.HTMLReporter,org.uncommons.reportng.JUnitXMLReporter,
> > com.yahoo.qa.yWsNG.framework.util.report.YWsNGReporter,
> > com.yahoo.test.SelNG.framework.util.TMReporter</value>
> >                        </property>
> >                  </properties>
> >                  <systemProperties>
> >             <property>
> >            <name>apiHost1</name>
> >             <value>${maven.test.apiHost.value}</value>
> >            </property>
> >               <property>
> >                 <name>apiPort1</name>
> >                  <value>${maven.test.apiPort.value}</value>
> >               </property>
> >            </systemProperties>
> >           </configuration>
> >      </plugin>
> >      </plugins>
> >     <testResources>
> >      <testResource>
> >      <directory>src/test/resources</directory>
> >    </testResource>
> >  </testResources>
> >         </build>
> >         </profile>
> > <profile>
> >      <id>CommentsBAT</id>
> >      <properties>
> >        <comments_artifact></comments_artifact>
> >        </properties>
> >        <activation>
> >      <activeByDefault>false</activeByDefault>
> >      </activation>
> >        <dependencies>
> >       <dependency>
> >      <groupId>Jsonparser</groupId>
> >      <artifactId>Jsonparser</artifactId>
> >      <version>0.1</version>
> >      </dependency>
> >      </dependencies>
> >          <build>
> >     <plugins>
> >      <plugin>
> >         <artifactId>maven-compiler-plugin</artifactId>
> >        <configuration>
> >          <source>1.6</source>
> >          <target>1.6</target>
> >        </configuration>
> >      </plugin>
> >            <plugin>
> >        <groupId>org.apache.maven.plugins</groupId>
> >        <artifactId>maven-surefire-plugin</artifactId>
> >        <version>2.5</version>
> >        <configuration>
> >          <skipTests>false</skipTests>
> >        <argLine>-Xmx512m</argLine>
> >               <suiteXmlFiles>
> >
> > <suiteXmlFile>src/test/resources/CommentsWS.xml</suiteXmlFile>
> >                   <!--
> > <suiteXmlFile>src/test/resources/testng_selng.xml</suiteXmlFile>-->
> >                </suiteXmlFiles>
> >
> >
> <reportsDirectory>${project.build.directory}/Comments/reports/surefire</reportsDirectory>
> >          <properties>
> >          <properties>
> >
> > <maven.test.failure.ignore>true</maven.test.failure.ignore>
> >         </properties>
> >          <property>
> >                <name>listener</name>
> >
> >
>  <value>com.yahoo.test.SelNG.framework.util.MethodSorter,org.uncommons.reportng.HTMLReporter,org.uncommons.reportng.JUnitXMLReporter,
> > com.yahoo.qa.yWsNG.framework.util.report.YWsNGReporter,
> > com.yahoo.test.SelNG.framework.util.TMReporter</value>
> >                        </property>
> >                  </properties>
> >                  <systemProperties>
> >             <property>
> >            <name>apiHost1</name>
> >             <value>${maven.test.apiHost.value}</value>
> >            </property>
> >               <property>
> >                 <name>apiPort1</name>
> >                  <value>${maven.test.apiPort.value}</value>
> >               </property>
> >            </systemProperties>
> >           </configuration>
> >      </plugin>
> >      </plugins>
> >     <testResources>
> >      <testResource>
> >      <directory>src/test/resources</directory>
> >    </testResource>
> >  </testResources>
> >         </build>
> >         </profile>
> > </profiles>
> > </project>
> >
> >
> >
> >
> > I am trying to run like below:-
> >
> > -----Original Message-----
> > From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
> > Behalf Of Anders Hammar
> > Sent: Friday, August 27, 2010 2:44 PM
> > To: Maven Users List
> > Subject: Re: Multiple profile execution in maven
> >
> > Why not the other way around? You clean your pom and send it, and maybe
> > someone can find time to try it out. A complete test project that doesn't
> > work for you, is even better (and thus more likely for someone to try).
> >
> > /Anders
> >
> > On Fri, Aug 27, 2010 at 10:54, Sridhar Laxmipuram Srinivasan <
> > sridharl@yahoo-inc.com> wrote:
> >
> > > Oh is it, If possible can you please share you pom, after removing any
> > > secured/confidential information if any. I need this urgently as I am
> > stuck
> > > on this and wasted lot of time debugging the issue
> > >
> > > Thnkx
> > > sridharl
> > >
> > > -----Original Message-----
> > > From: Jesse Farinacci [mailto:jieryn@gmail.com]
> > > Sent: Friday, August 27, 2010 9:15 AM
> > > To: Maven Users List
> > > Subject: Re: Multiple profile execution in maven
> > >
> > > Greetings,
> > >
> > > On Thu, Aug 26, 2010 at 11:29 PM, Sridhar Laxmipuram Srinivasan
> > > <sr...@yahoo-inc.com> wrote:
> > > > I have tried everything ie with multiple -Ps, comma separated list
> but
> > in
> > > vain :), I think it is a bug, if anybody has any workaround please let
> me
> > > know
> > > >
> > >
> > > $ echo "This worked for me just 2 minutes ago!"
> > > $ mvn -P mysql,deployment package jetty:run-war
> > >
> > > -Jesse
> > >
> > > --
> > > There are 10 types of people in this world, those
> > > that can read binary and those that can not.
> > >
> > > ---------------------------------------------------------------------
> > > 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
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > 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: Multiple profile execution in maven

Posted by Anders Hammar <an...@hammar.net>.
What are you trying to do? The two profiles looks the same to me (there
might be some minor difference that I didn't spot). I'm quite sure you're
trying to do something the wrong way.

/Anders

On Fri, Aug 27, 2010 at 13:35, Sridhar Laxmipuram Srinivasan <
sridharl@yahoo-inc.com> wrote:

> Yes now the fun part :)
> When I do mvn help:active-profiles -P CommentsBAT,BAT it shows me both are
> active but when I execute it does not execute both, I am completely blank
> here....
>
> [INFO] [help:active-profiles {execution: default-cli}]
> [INFO]
> Active Profiles for Project
> 'com.yahoo.qa.yWsNG.UGCCloud.UGCComments.tests:UGCComments-app:jar:1.0-SNAPSHOT':
>
> The following profiles are active:
>
>  - BAT (source: pom)
>  - CommentsBAT (source: pom)
>
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 1 second
> [INFO] Finished at: Fri Aug 27 11:34:02 GMT 2010
> [INFO] Final Memory: 7M/38M
> [INFO]
> ------------------------------------------------------------------------
>
>
> I do not know what wrong I am doing here
>
>
> Thnkx
> sridharl
>
> -----Original Message-----
> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
> Behalf Of Anders Hammar
> Sent: Friday, August 27, 2010 5:00 PM
> To: Maven Users List
> Subject: Re: Multiple profile execution in maven
>
> It works for me with Maven 2.2.1.
> Try this:
>
> mvn help:active-profiles -P CommentsBAT,BAT
>
> /Anders
>
> On Fri, Aug 27, 2010 at 13:10, Sridhar Laxmipuram Srinivasan <
> sridharl@yahoo-inc.com> wrote:
>
> > I am trying to execute like below:
> >
> > mvn -PCommentsBAT,BAT
> >
> > The above execute CommentsBAT but not BAT
> >
> >
> > My pom is like below:-
> > <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance"
> >  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> > http://maven.apache.org/maven-v4_0_0.xsd">
> >  <modelVersion>4.0.0</modelVersion>
> >  <groupId>com.yahoo.qa.yWsNG.UGCCloud.UGCComments.tests</groupId>
> >  <artifactId>UGCComments-app</artifactId>
> >  <packaging>jar</packaging>
> >  <version>1.0-SNAPSHOT</version>
> >  <name>UGCComments</name>
> >  <url>http://maven.apache.org</url>
> >  <dependencies>
> >    <dependency>
> >                        <groupId>org.testng</groupId>
> >                        <artifactId>testng</artifactId>
> >                        <version>1.0</version>
> >                </dependency>
> > </dependencies
> > <profiles>
> >         <profile>
> >      <id>BAT</id>
> >      <properties>
> >        <comments_artifact></comments_artifact>
> >        </properties>
> >        <activation>
> >      <activeByDefault>false</activeByDefault>
> >      </activation>
> >        <dependencies>
> >       <dependency>
> >      <groupId>Jsonparser</groupId>
> >      <artifactId>Jsonparser</artifactId>
> >      <version>0.1</version>
> >      </dependency>
> >      </dependencies>
> >          <build>
> >     <plugins>
> >      <plugin>
> >         <artifactId>maven-compiler-plugin</artifactId>
> >        <configuration>
> >          <source>1.6</source>
> >          <target>1.6</target>
> >        </configuration>
> >      </plugin>
> >            <plugin>
> >        <groupId>org.apache.maven.plugins</groupId>
> >        <artifactId>maven-surefire-plugin</artifactId>
> >        <version>2.5</version>
> >        <configuration>
> >          <skipTests>false</skipTests>
> >        <argLine>-Xmx512m</argLine>
> >               <suiteXmlFiles>
> >
> > <suiteXmlFile>src/test/resources/CommentsWS.xml</suiteXmlFile>
> >                   <!--
> > <suiteXmlFile>src/test/resources/testng_selng.xml</suiteXmlFile>-->
> >                </suiteXmlFiles>
> >
> >
> <reportsDirectory>${project.build.directory}/Comments1/reports/surefire</reportsDirectory>
> >          <properties>
> >          <properties>
> >
> > <maven.test.failure.ignore>true</maven.test.failure.ignore>
> >         </properties>
> >          <property>
> >                <name>listener</name>
> >
> >
>  <value>com.yahoo.test.SelNG.framework.util.MethodSorter,org.uncommons.reportng.HTMLReporter,org.uncommons.reportng.JUnitXMLReporter,
> > com.yahoo.qa.yWsNG.framework.util.report.YWsNGReporter,
> > com.yahoo.test.SelNG.framework.util.TMReporter</value>
> >                        </property>
> >                  </properties>
> >                  <systemProperties>
> >             <property>
> >            <name>apiHost1</name>
> >             <value>${maven.test.apiHost.value}</value>
> >            </property>
> >               <property>
> >                 <name>apiPort1</name>
> >                  <value>${maven.test.apiPort.value}</value>
> >               </property>
> >            </systemProperties>
> >           </configuration>
> >      </plugin>
> >      </plugins>
> >     <testResources>
> >      <testResource>
> >      <directory>src/test/resources</directory>
> >    </testResource>
> >  </testResources>
> >         </build>
> >         </profile>
> > <profile>
> >      <id>CommentsBAT</id>
> >      <properties>
> >        <comments_artifact></comments_artifact>
> >        </properties>
> >        <activation>
> >      <activeByDefault>false</activeByDefault>
> >      </activation>
> >        <dependencies>
> >       <dependency>
> >      <groupId>Jsonparser</groupId>
> >      <artifactId>Jsonparser</artifactId>
> >      <version>0.1</version>
> >      </dependency>
> >      </dependencies>
> >          <build>
> >     <plugins>
> >      <plugin>
> >         <artifactId>maven-compiler-plugin</artifactId>
> >        <configuration>
> >          <source>1.6</source>
> >          <target>1.6</target>
> >        </configuration>
> >      </plugin>
> >            <plugin>
> >        <groupId>org.apache.maven.plugins</groupId>
> >        <artifactId>maven-surefire-plugin</artifactId>
> >        <version>2.5</version>
> >        <configuration>
> >          <skipTests>false</skipTests>
> >        <argLine>-Xmx512m</argLine>
> >               <suiteXmlFiles>
> >
> > <suiteXmlFile>src/test/resources/CommentsWS.xml</suiteXmlFile>
> >                   <!--
> > <suiteXmlFile>src/test/resources/testng_selng.xml</suiteXmlFile>-->
> >                </suiteXmlFiles>
> >
> >
> <reportsDirectory>${project.build.directory}/Comments/reports/surefire</reportsDirectory>
> >          <properties>
> >          <properties>
> >
> > <maven.test.failure.ignore>true</maven.test.failure.ignore>
> >         </properties>
> >          <property>
> >                <name>listener</name>
> >
> >
>  <value>com.yahoo.test.SelNG.framework.util.MethodSorter,org.uncommons.reportng.HTMLReporter,org.uncommons.reportng.JUnitXMLReporter,
> > com.yahoo.qa.yWsNG.framework.util.report.YWsNGReporter,
> > com.yahoo.test.SelNG.framework.util.TMReporter</value>
> >                        </property>
> >                  </properties>
> >                  <systemProperties>
> >             <property>
> >            <name>apiHost1</name>
> >             <value>${maven.test.apiHost.value}</value>
> >            </property>
> >               <property>
> >                 <name>apiPort1</name>
> >                  <value>${maven.test.apiPort.value}</value>
> >               </property>
> >            </systemProperties>
> >           </configuration>
> >      </plugin>
> >      </plugins>
> >     <testResources>
> >      <testResource>
> >      <directory>src/test/resources</directory>
> >    </testResource>
> >  </testResources>
> >         </build>
> >         </profile>
> > </profiles>
> > </project>
> >
> >
> >
> >
> > I am trying to run like below:-
> >
> > -----Original Message-----
> > From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
> > Behalf Of Anders Hammar
> > Sent: Friday, August 27, 2010 2:44 PM
> > To: Maven Users List
> > Subject: Re: Multiple profile execution in maven
> >
> > Why not the other way around? You clean your pom and send it, and maybe
> > someone can find time to try it out. A complete test project that doesn't
> > work for you, is even better (and thus more likely for someone to try).
> >
> > /Anders
> >
> > On Fri, Aug 27, 2010 at 10:54, Sridhar Laxmipuram Srinivasan <
> > sridharl@yahoo-inc.com> wrote:
> >
> > > Oh is it, If possible can you please share you pom, after removing any
> > > secured/confidential information if any. I need this urgently as I am
> > stuck
> > > on this and wasted lot of time debugging the issue
> > >
> > > Thnkx
> > > sridharl
> > >
> > > -----Original Message-----
> > > From: Jesse Farinacci [mailto:jieryn@gmail.com]
> > > Sent: Friday, August 27, 2010 9:15 AM
> > > To: Maven Users List
> > > Subject: Re: Multiple profile execution in maven
> > >
> > > Greetings,
> > >
> > > On Thu, Aug 26, 2010 at 11:29 PM, Sridhar Laxmipuram Srinivasan
> > > <sr...@yahoo-inc.com> wrote:
> > > > I have tried everything ie with multiple -Ps, comma separated list
> but
> > in
> > > vain :), I think it is a bug, if anybody has any workaround please let
> me
> > > know
> > > >
> > >
> > > $ echo "This worked for me just 2 minutes ago!"
> > > $ mvn -P mysql,deployment package jetty:run-war
> > >
> > > -Jesse
> > >
> > > --
> > > There are 10 types of people in this world, those
> > > that can read binary and those that can not.
> > >
> > > ---------------------------------------------------------------------
> > > 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
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > 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: Multiple profile execution in maven

Posted by Sridhar Laxmipuram Srinivasan <sr...@yahoo-inc.com>.
Yes now the fun part :)
When I do mvn help:active-profiles -P CommentsBAT,BAT it shows me both are active but when I execute it does not execute both, I am completely blank here....

[INFO] [help:active-profiles {execution: default-cli}]
[INFO] 
Active Profiles for Project 'com.yahoo.qa.yWsNG.UGCCloud.UGCComments.tests:UGCComments-app:jar:1.0-SNAPSHOT': 

The following profiles are active:

 - BAT (source: pom)
 - CommentsBAT (source: pom)


[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Fri Aug 27 11:34:02 GMT 2010
[INFO] Final Memory: 7M/38M
[INFO] ------------------------------------------------------------------------


I do not know what wrong I am doing here


Thnkx
sridharl

-----Original Message-----
From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On Behalf Of Anders Hammar
Sent: Friday, August 27, 2010 5:00 PM
To: Maven Users List
Subject: Re: Multiple profile execution in maven

It works for me with Maven 2.2.1.
Try this:

mvn help:active-profiles -P CommentsBAT,BAT

/Anders

On Fri, Aug 27, 2010 at 13:10, Sridhar Laxmipuram Srinivasan <
sridharl@yahoo-inc.com> wrote:

> I am trying to execute like below:
>
> mvn -PCommentsBAT,BAT
>
> The above execute CommentsBAT but not BAT
>
>
> My pom is like below:-
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
>  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
>  <modelVersion>4.0.0</modelVersion>
>  <groupId>com.yahoo.qa.yWsNG.UGCCloud.UGCComments.tests</groupId>
>  <artifactId>UGCComments-app</artifactId>
>  <packaging>jar</packaging>
>  <version>1.0-SNAPSHOT</version>
>  <name>UGCComments</name>
>  <url>http://maven.apache.org</url>
>  <dependencies>
>    <dependency>
>                        <groupId>org.testng</groupId>
>                        <artifactId>testng</artifactId>
>                        <version>1.0</version>
>                </dependency>
> </dependencies
> <profiles>
>         <profile>
>      <id>BAT</id>
>      <properties>
>        <comments_artifact></comments_artifact>
>        </properties>
>        <activation>
>      <activeByDefault>false</activeByDefault>
>      </activation>
>        <dependencies>
>       <dependency>
>      <groupId>Jsonparser</groupId>
>      <artifactId>Jsonparser</artifactId>
>      <version>0.1</version>
>      </dependency>
>      </dependencies>
>          <build>
>     <plugins>
>      <plugin>
>         <artifactId>maven-compiler-plugin</artifactId>
>        <configuration>
>          <source>1.6</source>
>          <target>1.6</target>
>        </configuration>
>      </plugin>
>            <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-surefire-plugin</artifactId>
>        <version>2.5</version>
>        <configuration>
>          <skipTests>false</skipTests>
>        <argLine>-Xmx512m</argLine>
>               <suiteXmlFiles>
>
> <suiteXmlFile>src/test/resources/CommentsWS.xml</suiteXmlFile>
>                   <!--
> <suiteXmlFile>src/test/resources/testng_selng.xml</suiteXmlFile>-->
>                </suiteXmlFiles>
>
> <reportsDirectory>${project.build.directory}/Comments1/reports/surefire</reportsDirectory>
>          <properties>
>          <properties>
>
> <maven.test.failure.ignore>true</maven.test.failure.ignore>
>         </properties>
>          <property>
>                <name>listener</name>
>
>  <value>com.yahoo.test.SelNG.framework.util.MethodSorter,org.uncommons.reportng.HTMLReporter,org.uncommons.reportng.JUnitXMLReporter,
> com.yahoo.qa.yWsNG.framework.util.report.YWsNGReporter,
> com.yahoo.test.SelNG.framework.util.TMReporter</value>
>                        </property>
>                  </properties>
>                  <systemProperties>
>             <property>
>            <name>apiHost1</name>
>             <value>${maven.test.apiHost.value}</value>
>            </property>
>               <property>
>                 <name>apiPort1</name>
>                  <value>${maven.test.apiPort.value}</value>
>               </property>
>            </systemProperties>
>           </configuration>
>      </plugin>
>      </plugins>
>     <testResources>
>      <testResource>
>      <directory>src/test/resources</directory>
>    </testResource>
>  </testResources>
>         </build>
>         </profile>
> <profile>
>      <id>CommentsBAT</id>
>      <properties>
>        <comments_artifact></comments_artifact>
>        </properties>
>        <activation>
>      <activeByDefault>false</activeByDefault>
>      </activation>
>        <dependencies>
>       <dependency>
>      <groupId>Jsonparser</groupId>
>      <artifactId>Jsonparser</artifactId>
>      <version>0.1</version>
>      </dependency>
>      </dependencies>
>          <build>
>     <plugins>
>      <plugin>
>         <artifactId>maven-compiler-plugin</artifactId>
>        <configuration>
>          <source>1.6</source>
>          <target>1.6</target>
>        </configuration>
>      </plugin>
>            <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-surefire-plugin</artifactId>
>        <version>2.5</version>
>        <configuration>
>          <skipTests>false</skipTests>
>        <argLine>-Xmx512m</argLine>
>               <suiteXmlFiles>
>
> <suiteXmlFile>src/test/resources/CommentsWS.xml</suiteXmlFile>
>                   <!--
> <suiteXmlFile>src/test/resources/testng_selng.xml</suiteXmlFile>-->
>                </suiteXmlFiles>
>
> <reportsDirectory>${project.build.directory}/Comments/reports/surefire</reportsDirectory>
>          <properties>
>          <properties>
>
> <maven.test.failure.ignore>true</maven.test.failure.ignore>
>         </properties>
>          <property>
>                <name>listener</name>
>
>  <value>com.yahoo.test.SelNG.framework.util.MethodSorter,org.uncommons.reportng.HTMLReporter,org.uncommons.reportng.JUnitXMLReporter,
> com.yahoo.qa.yWsNG.framework.util.report.YWsNGReporter,
> com.yahoo.test.SelNG.framework.util.TMReporter</value>
>                        </property>
>                  </properties>
>                  <systemProperties>
>             <property>
>            <name>apiHost1</name>
>             <value>${maven.test.apiHost.value}</value>
>            </property>
>               <property>
>                 <name>apiPort1</name>
>                  <value>${maven.test.apiPort.value}</value>
>               </property>
>            </systemProperties>
>           </configuration>
>      </plugin>
>      </plugins>
>     <testResources>
>      <testResource>
>      <directory>src/test/resources</directory>
>    </testResource>
>  </testResources>
>         </build>
>         </profile>
> </profiles>
> </project>
>
>
>
>
> I am trying to run like below:-
>
> -----Original Message-----
> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
> Behalf Of Anders Hammar
> Sent: Friday, August 27, 2010 2:44 PM
> To: Maven Users List
> Subject: Re: Multiple profile execution in maven
>
> Why not the other way around? You clean your pom and send it, and maybe
> someone can find time to try it out. A complete test project that doesn't
> work for you, is even better (and thus more likely for someone to try).
>
> /Anders
>
> On Fri, Aug 27, 2010 at 10:54, Sridhar Laxmipuram Srinivasan <
> sridharl@yahoo-inc.com> wrote:
>
> > Oh is it, If possible can you please share you pom, after removing any
> > secured/confidential information if any. I need this urgently as I am
> stuck
> > on this and wasted lot of time debugging the issue
> >
> > Thnkx
> > sridharl
> >
> > -----Original Message-----
> > From: Jesse Farinacci [mailto:jieryn@gmail.com]
> > Sent: Friday, August 27, 2010 9:15 AM
> > To: Maven Users List
> > Subject: Re: Multiple profile execution in maven
> >
> > Greetings,
> >
> > On Thu, Aug 26, 2010 at 11:29 PM, Sridhar Laxmipuram Srinivasan
> > <sr...@yahoo-inc.com> wrote:
> > > I have tried everything ie with multiple -Ps, comma separated list but
> in
> > vain :), I think it is a bug, if anybody has any workaround please let me
> > know
> > >
> >
> > $ echo "This worked for me just 2 minutes ago!"
> > $ mvn -P mysql,deployment package jetty:run-war
> >
> > -Jesse
> >
> > --
> > There are 10 types of people in this world, those
> > that can read binary and those that can not.
> >
> > ---------------------------------------------------------------------
> > 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
> >
> >
>
> ---------------------------------------------------------------------
> 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: Multiple profile execution in maven

Posted by Anders Hammar <an...@hammar.net>.
It works for me with Maven 2.2.1.
Try this:

mvn help:active-profiles -P CommentsBAT,BAT

/Anders

On Fri, Aug 27, 2010 at 13:10, Sridhar Laxmipuram Srinivasan <
sridharl@yahoo-inc.com> wrote:

> I am trying to execute like below:
>
> mvn -PCommentsBAT,BAT
>
> The above execute CommentsBAT but not BAT
>
>
> My pom is like below:-
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
>  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
>  <modelVersion>4.0.0</modelVersion>
>  <groupId>com.yahoo.qa.yWsNG.UGCCloud.UGCComments.tests</groupId>
>  <artifactId>UGCComments-app</artifactId>
>  <packaging>jar</packaging>
>  <version>1.0-SNAPSHOT</version>
>  <name>UGCComments</name>
>  <url>http://maven.apache.org</url>
>  <dependencies>
>    <dependency>
>                        <groupId>org.testng</groupId>
>                        <artifactId>testng</artifactId>
>                        <version>1.0</version>
>                </dependency>
> </dependencies
> <profiles>
>         <profile>
>      <id>BAT</id>
>      <properties>
>        <comments_artifact></comments_artifact>
>        </properties>
>        <activation>
>      <activeByDefault>false</activeByDefault>
>      </activation>
>        <dependencies>
>       <dependency>
>      <groupId>Jsonparser</groupId>
>      <artifactId>Jsonparser</artifactId>
>      <version>0.1</version>
>      </dependency>
>      </dependencies>
>          <build>
>     <plugins>
>      <plugin>
>         <artifactId>maven-compiler-plugin</artifactId>
>        <configuration>
>          <source>1.6</source>
>          <target>1.6</target>
>        </configuration>
>      </plugin>
>            <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-surefire-plugin</artifactId>
>        <version>2.5</version>
>        <configuration>
>          <skipTests>false</skipTests>
>        <argLine>-Xmx512m</argLine>
>               <suiteXmlFiles>
>
> <suiteXmlFile>src/test/resources/CommentsWS.xml</suiteXmlFile>
>                   <!--
> <suiteXmlFile>src/test/resources/testng_selng.xml</suiteXmlFile>-->
>                </suiteXmlFiles>
>
> <reportsDirectory>${project.build.directory}/Comments1/reports/surefire</reportsDirectory>
>          <properties>
>          <properties>
>
> <maven.test.failure.ignore>true</maven.test.failure.ignore>
>         </properties>
>          <property>
>                <name>listener</name>
>
>  <value>com.yahoo.test.SelNG.framework.util.MethodSorter,org.uncommons.reportng.HTMLReporter,org.uncommons.reportng.JUnitXMLReporter,
> com.yahoo.qa.yWsNG.framework.util.report.YWsNGReporter,
> com.yahoo.test.SelNG.framework.util.TMReporter</value>
>                        </property>
>                  </properties>
>                  <systemProperties>
>             <property>
>            <name>apiHost1</name>
>             <value>${maven.test.apiHost.value}</value>
>            </property>
>               <property>
>                 <name>apiPort1</name>
>                  <value>${maven.test.apiPort.value}</value>
>               </property>
>            </systemProperties>
>           </configuration>
>      </plugin>
>      </plugins>
>     <testResources>
>      <testResource>
>      <directory>src/test/resources</directory>
>    </testResource>
>  </testResources>
>         </build>
>         </profile>
> <profile>
>      <id>CommentsBAT</id>
>      <properties>
>        <comments_artifact></comments_artifact>
>        </properties>
>        <activation>
>      <activeByDefault>false</activeByDefault>
>      </activation>
>        <dependencies>
>       <dependency>
>      <groupId>Jsonparser</groupId>
>      <artifactId>Jsonparser</artifactId>
>      <version>0.1</version>
>      </dependency>
>      </dependencies>
>          <build>
>     <plugins>
>      <plugin>
>         <artifactId>maven-compiler-plugin</artifactId>
>        <configuration>
>          <source>1.6</source>
>          <target>1.6</target>
>        </configuration>
>      </plugin>
>            <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-surefire-plugin</artifactId>
>        <version>2.5</version>
>        <configuration>
>          <skipTests>false</skipTests>
>        <argLine>-Xmx512m</argLine>
>               <suiteXmlFiles>
>
> <suiteXmlFile>src/test/resources/CommentsWS.xml</suiteXmlFile>
>                   <!--
> <suiteXmlFile>src/test/resources/testng_selng.xml</suiteXmlFile>-->
>                </suiteXmlFiles>
>
> <reportsDirectory>${project.build.directory}/Comments/reports/surefire</reportsDirectory>
>          <properties>
>          <properties>
>
> <maven.test.failure.ignore>true</maven.test.failure.ignore>
>         </properties>
>          <property>
>                <name>listener</name>
>
>  <value>com.yahoo.test.SelNG.framework.util.MethodSorter,org.uncommons.reportng.HTMLReporter,org.uncommons.reportng.JUnitXMLReporter,
> com.yahoo.qa.yWsNG.framework.util.report.YWsNGReporter,
> com.yahoo.test.SelNG.framework.util.TMReporter</value>
>                        </property>
>                  </properties>
>                  <systemProperties>
>             <property>
>            <name>apiHost1</name>
>             <value>${maven.test.apiHost.value}</value>
>            </property>
>               <property>
>                 <name>apiPort1</name>
>                  <value>${maven.test.apiPort.value}</value>
>               </property>
>            </systemProperties>
>           </configuration>
>      </plugin>
>      </plugins>
>     <testResources>
>      <testResource>
>      <directory>src/test/resources</directory>
>    </testResource>
>  </testResources>
>         </build>
>         </profile>
> </profiles>
> </project>
>
>
>
>
> I am trying to run like below:-
>
> -----Original Message-----
> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
> Behalf Of Anders Hammar
> Sent: Friday, August 27, 2010 2:44 PM
> To: Maven Users List
> Subject: Re: Multiple profile execution in maven
>
> Why not the other way around? You clean your pom and send it, and maybe
> someone can find time to try it out. A complete test project that doesn't
> work for you, is even better (and thus more likely for someone to try).
>
> /Anders
>
> On Fri, Aug 27, 2010 at 10:54, Sridhar Laxmipuram Srinivasan <
> sridharl@yahoo-inc.com> wrote:
>
> > Oh is it, If possible can you please share you pom, after removing any
> > secured/confidential information if any. I need this urgently as I am
> stuck
> > on this and wasted lot of time debugging the issue
> >
> > Thnkx
> > sridharl
> >
> > -----Original Message-----
> > From: Jesse Farinacci [mailto:jieryn@gmail.com]
> > Sent: Friday, August 27, 2010 9:15 AM
> > To: Maven Users List
> > Subject: Re: Multiple profile execution in maven
> >
> > Greetings,
> >
> > On Thu, Aug 26, 2010 at 11:29 PM, Sridhar Laxmipuram Srinivasan
> > <sr...@yahoo-inc.com> wrote:
> > > I have tried everything ie with multiple -Ps, comma separated list but
> in
> > vain :), I think it is a bug, if anybody has any workaround please let me
> > know
> > >
> >
> > $ echo "This worked for me just 2 minutes ago!"
> > $ mvn -P mysql,deployment package jetty:run-war
> >
> > -Jesse
> >
> > --
> > There are 10 types of people in this world, those
> > that can read binary and those that can not.
> >
> > ---------------------------------------------------------------------
> > 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
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: Multiple profile execution in maven

Posted by Sridhar Laxmipuram Srinivasan <sr...@yahoo-inc.com>.
I am trying to execute like below:

mvn -PCommentsBAT,BAT

The above execute CommentsBAT but not BAT


My pom is like below:-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.yahoo.qa.yWsNG.UGCCloud.UGCComments.tests</groupId>
  <artifactId>UGCComments-app</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>UGCComments</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
			<groupId>org.testng</groupId>
			<artifactId>testng</artifactId>
			<version>1.0</version>			
		</dependency>
</dependencies
<profiles>
	 <profile>
      <id>BAT</id>
      <properties>
        <comments_artifact></comments_artifact>
        </properties>
        <activation>
      <activeByDefault>false</activeByDefault>
      </activation>
        <dependencies>
       <dependency>
      <groupId>Jsonparser</groupId>
      <artifactId>Jsonparser</artifactId>
      <version>0.1</version>
      </dependency>
      </dependencies>
          <build>  
     <plugins>
      <plugin>
         <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>
            <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.5</version>	
        <configuration>
          <skipTests>false</skipTests>
        <argLine>-Xmx512m</argLine>
               <suiteXmlFiles>
                   <suiteXmlFile>src/test/resources/CommentsWS.xml</suiteXmlFile>
                   <!-- <suiteXmlFile>src/test/resources/testng_selng.xml</suiteXmlFile>-->
                </suiteXmlFiles>
             <reportsDirectory>${project.build.directory}/Comments1/reports/surefire</reportsDirectory>
          <properties>
          <properties>
	             <maven.test.failure.ignore>true</maven.test.failure.ignore>
         </properties>
          <property>
          	<name>listener</name>
          	<value>com.yahoo.test.SelNG.framework.util.MethodSorter,org.uncommons.reportng.HTMLReporter,org.uncommons.reportng.JUnitXMLReporter, com.yahoo.qa.yWsNG.framework.util.report.YWsNGReporter, com.yahoo.test.SelNG.framework.util.TMReporter</value>
			</property>
 		  </properties> 
 		  <systemProperties>
             <property>
            <name>apiHost1</name>
             <value>${maven.test.apiHost.value}</value>
            </property>
               <property>
                 <name>apiPort1</name>
                  <value>${maven.test.apiPort.value}</value>
               </property>
            </systemProperties>
           </configuration>
      </plugin>
      </plugins>
     <testResources>
      <testResource>
      <directory>src/test/resources</directory>
    </testResource>
  </testResources>
	 </build>
	 </profile>
<profile>
      <id>CommentsBAT</id>
      <properties>
        <comments_artifact></comments_artifact>
        </properties>
        <activation>
      <activeByDefault>false</activeByDefault>
      </activation>
        <dependencies>
       <dependency>
      <groupId>Jsonparser</groupId>
      <artifactId>Jsonparser</artifactId>
      <version>0.1</version>
      </dependency>
      </dependencies>
          <build>  
     <plugins>
      <plugin>
         <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>
            <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.5</version>	
        <configuration>
          <skipTests>false</skipTests>
        <argLine>-Xmx512m</argLine>
               <suiteXmlFiles>
                   <suiteXmlFile>src/test/resources/CommentsWS.xml</suiteXmlFile>
                   <!-- <suiteXmlFile>src/test/resources/testng_selng.xml</suiteXmlFile>-->
                </suiteXmlFiles>
             <reportsDirectory>${project.build.directory}/Comments/reports/surefire</reportsDirectory>
          <properties>
          <properties>
	             <maven.test.failure.ignore>true</maven.test.failure.ignore>
         </properties>
          <property>
          	<name>listener</name>
          	<value>com.yahoo.test.SelNG.framework.util.MethodSorter,org.uncommons.reportng.HTMLReporter,org.uncommons.reportng.JUnitXMLReporter, com.yahoo.qa.yWsNG.framework.util.report.YWsNGReporter, com.yahoo.test.SelNG.framework.util.TMReporter</value>
			</property>
 		  </properties> 
 		  <systemProperties>
             <property>
            <name>apiHost1</name>
             <value>${maven.test.apiHost.value}</value>
            </property>
               <property>
                 <name>apiPort1</name>
                  <value>${maven.test.apiPort.value}</value>
               </property>
            </systemProperties>
           </configuration>
      </plugin>
      </plugins>
     <testResources>
      <testResource>
      <directory>src/test/resources</directory>
    </testResource>
  </testResources>
	 </build>
	 </profile>
</profiles>	
</project>




I am trying to run like below:-

-----Original Message-----
From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On Behalf Of Anders Hammar
Sent: Friday, August 27, 2010 2:44 PM
To: Maven Users List
Subject: Re: Multiple profile execution in maven

Why not the other way around? You clean your pom and send it, and maybe
someone can find time to try it out. A complete test project that doesn't
work for you, is even better (and thus more likely for someone to try).

/Anders

On Fri, Aug 27, 2010 at 10:54, Sridhar Laxmipuram Srinivasan <
sridharl@yahoo-inc.com> wrote:

> Oh is it, If possible can you please share you pom, after removing any
> secured/confidential information if any. I need this urgently as I am stuck
> on this and wasted lot of time debugging the issue
>
> Thnkx
> sridharl
>
> -----Original Message-----
> From: Jesse Farinacci [mailto:jieryn@gmail.com]
> Sent: Friday, August 27, 2010 9:15 AM
> To: Maven Users List
> Subject: Re: Multiple profile execution in maven
>
> Greetings,
>
> On Thu, Aug 26, 2010 at 11:29 PM, Sridhar Laxmipuram Srinivasan
> <sr...@yahoo-inc.com> wrote:
> > I have tried everything ie with multiple -Ps, comma separated list but in
> vain :), I think it is a bug, if anybody has any workaround please let me
> know
> >
>
> $ echo "This worked for me just 2 minutes ago!"
> $ mvn -P mysql,deployment package jetty:run-war
>
> -Jesse
>
> --
> There are 10 types of people in this world, those
> that can read binary and those that can not.
>
> ---------------------------------------------------------------------
> 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
>
>

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


Re: Multiple profile execution in maven

Posted by Anders Hammar <an...@hammar.net>.
Why not the other way around? You clean your pom and send it, and maybe
someone can find time to try it out. A complete test project that doesn't
work for you, is even better (and thus more likely for someone to try).

/Anders

On Fri, Aug 27, 2010 at 10:54, Sridhar Laxmipuram Srinivasan <
sridharl@yahoo-inc.com> wrote:

> Oh is it, If possible can you please share you pom, after removing any
> secured/confidential information if any. I need this urgently as I am stuck
> on this and wasted lot of time debugging the issue
>
> Thnkx
> sridharl
>
> -----Original Message-----
> From: Jesse Farinacci [mailto:jieryn@gmail.com]
> Sent: Friday, August 27, 2010 9:15 AM
> To: Maven Users List
> Subject: Re: Multiple profile execution in maven
>
> Greetings,
>
> On Thu, Aug 26, 2010 at 11:29 PM, Sridhar Laxmipuram Srinivasan
> <sr...@yahoo-inc.com> wrote:
> > I have tried everything ie with multiple -Ps, comma separated list but in
> vain :), I think it is a bug, if anybody has any workaround please let me
> know
> >
>
> $ echo "This worked for me just 2 minutes ago!"
> $ mvn -P mysql,deployment package jetty:run-war
>
> -Jesse
>
> --
> There are 10 types of people in this world, those
> that can read binary and those that can not.
>
> ---------------------------------------------------------------------
> 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: Multiple profile execution in maven

Posted by Sridhar Laxmipuram Srinivasan <sr...@yahoo-inc.com>.
Oh is it, If possible can you please share you pom, after removing any secured/confidential information if any. I need this urgently as I am stuck on this and wasted lot of time debugging the issue

Thnkx
sridharl

-----Original Message-----
From: Jesse Farinacci [mailto:jieryn@gmail.com] 
Sent: Friday, August 27, 2010 9:15 AM
To: Maven Users List
Subject: Re: Multiple profile execution in maven

Greetings,

On Thu, Aug 26, 2010 at 11:29 PM, Sridhar Laxmipuram Srinivasan
<sr...@yahoo-inc.com> wrote:
> I have tried everything ie with multiple -Ps, comma separated list but in vain :), I think it is a bug, if anybody has any workaround please let me know
>

$ echo "This worked for me just 2 minutes ago!"
$ mvn -P mysql,deployment package jetty:run-war

-Jesse

-- 
There are 10 types of people in this world, those
that can read binary and those that can not.

---------------------------------------------------------------------
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: Multiple profile execution in maven

Posted by Jesse Farinacci <ji...@gmail.com>.
Greetings,

On Thu, Aug 26, 2010 at 11:29 PM, Sridhar Laxmipuram Srinivasan
<sr...@yahoo-inc.com> wrote:
> I have tried everything ie with multiple -Ps, comma separated list but in vain :), I think it is a bug, if anybody has any workaround please let me know
>

$ echo "This worked for me just 2 minutes ago!"
$ mvn -P mysql,deployment package jetty:run-war

-Jesse

-- 
There are 10 types of people in this world, those
that can read binary and those that can not.

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


RE: Multiple profile execution in maven

Posted by Sridhar Laxmipuram Srinivasan <sr...@yahoo-inc.com>.
I have tried everything ie with multiple -Ps, comma separated list but in vain :), I think it is a bug, if anybody has any workaround please let me know

Thnkx
sridharl

-----Original Message-----
From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On Behalf Of Anders Hammar
Sent: Thursday, August 26, 2010 6:40 PM
To: Maven Users List
Subject: Re: Multiple profile execution in maven

I checked the docs at maven.apache.org and they say comma list. But as
always, there might be bugs...:-)

/Anders

On Thu, Aug 26, 2010 at 14:42, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:

> I think you use multiple -P's to activate them
>
> -Px -Py
>
> but that could all just be my imagination ;-)
>
> On 26 August 2010 12:33, Anders Hammar <an...@hammar.net> wrote:
>
> > It should work. However, I'm not sure if I have ever enabled more than
> one
> > profile from command line.
> > Just for the heck of it, could you try adding a space between -P and the
> > profiles list ("-P x,y")?
> >
> > /Anders
> >
> > On Thu, Aug 26, 2010 at 13:16, Sridhar Laxmipuram Srinivasan <
> > sridharl@yahoo-inc.com> wrote:
> >
> > > Hi,
> > > I have 2 profiles which are deactivated by default but at run time I
> need
> > > to execute both of them, I have tried with -P<x>,<y> but of no use it
> > always
> > > executes the latter, Could you kindly provide me a solution to this. I
> am
> > > using maven 2.2.1 version
> > >
> > > thnkx
> > > sridharl
> > >
> > >
> >
>

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


Re: Multiple profile execution in maven

Posted by Anders Hammar <an...@hammar.net>.
I checked the docs at maven.apache.org and they say comma list. But as
always, there might be bugs...:-)

/Anders

On Thu, Aug 26, 2010 at 14:42, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:

> I think you use multiple -P's to activate them
>
> -Px -Py
>
> but that could all just be my imagination ;-)
>
> On 26 August 2010 12:33, Anders Hammar <an...@hammar.net> wrote:
>
> > It should work. However, I'm not sure if I have ever enabled more than
> one
> > profile from command line.
> > Just for the heck of it, could you try adding a space between -P and the
> > profiles list ("-P x,y")?
> >
> > /Anders
> >
> > On Thu, Aug 26, 2010 at 13:16, Sridhar Laxmipuram Srinivasan <
> > sridharl@yahoo-inc.com> wrote:
> >
> > > Hi,
> > > I have 2 profiles which are deactivated by default but at run time I
> need
> > > to execute both of them, I have tried with -P<x>,<y> but of no use it
> > always
> > > executes the latter, Could you kindly provide me a solution to this. I
> am
> > > using maven 2.2.1 version
> > >
> > > thnkx
> > > sridharl
> > >
> > >
> >
>

Re: Multiple profile execution in maven

Posted by Stephen Connolly <st...@gmail.com>.
I think you use multiple -P's to activate them

-Px -Py

but that could all just be my imagination ;-)

On 26 August 2010 12:33, Anders Hammar <an...@hammar.net> wrote:

> It should work. However, I'm not sure if I have ever enabled more than one
> profile from command line.
> Just for the heck of it, could you try adding a space between -P and the
> profiles list ("-P x,y")?
>
> /Anders
>
> On Thu, Aug 26, 2010 at 13:16, Sridhar Laxmipuram Srinivasan <
> sridharl@yahoo-inc.com> wrote:
>
> > Hi,
> > I have 2 profiles which are deactivated by default but at run time I need
> > to execute both of them, I have tried with -P<x>,<y> but of no use it
> always
> > executes the latter, Could you kindly provide me a solution to this. I am
> > using maven 2.2.1 version
> >
> > thnkx
> > sridharl
> >
> >
>

Re: Multiple profile execution in maven

Posted by Anders Hammar <an...@hammar.net>.
It should work. However, I'm not sure if I have ever enabled more than one
profile from command line.
Just for the heck of it, could you try adding a space between -P and the
profiles list ("-P x,y")?

/Anders

On Thu, Aug 26, 2010 at 13:16, Sridhar Laxmipuram Srinivasan <
sridharl@yahoo-inc.com> wrote:

> Hi,
> I have 2 profiles which are deactivated by default but at run time I need
> to execute both of them, I have tried with -P<x>,<y> but of no use it always
> executes the latter, Could you kindly provide me a solution to this. I am
> using maven 2.2.1 version
>
> thnkx
> sridharl
>
>