You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by EJ Ciramella <ej...@upromise.com> on 2007/06/02 01:30:48 UTC

Maven not respecting order of profiles passed in on the command line

Hey m2 mailing list - I'm having some issues with getting profiles
activated that I'd like.
 
I'm using version 2.0.5 (and tested with 2.0.6 with the same results)
and when I do something like:
 
mvn help:active-profiles -Ppersonal,StackDefaults,ca-lime,root
 
I see this:
 
<snip>
    Active Profiles for Project 'lty:app:pom:52.0-SNAPSHOT': 
 
    The following profiles are active:
 
     - personal (source: profiles.xml)
     - ca-lime (source: profiles.xml)
     - StackDefaults (source: profiles.xml)
     - root (source: settings.xml)
</snip>
 
 - personal (source: profiles.xml)
 - StackDefaults (source: profiles.xml)
 - ca-lime (source: profiles.xml)
 - root (source: settings.xml)
 
I can see this is/was a bug:
 
http://jira.codehaus.org/browse/MNG-2309
 
But I'm still seeing this in both 2.0.5 and 2.0.6.
 
HELP!!!

RE: Maven not respecting order of profiles passed in on the command line

Posted by EJ Ciramella <ej...@upromise.com>.
 
>>>> Maven has one artifact per pom.

So do we.  We just have an option to package JUST the items called out
as "resources" (and modified during process-resources).  If a property
is put on the command line, a different assembly is run.

>>>> When you release your artifact it should be reproducible.

It is.

>>> But having to select a bunch of profiles makes it un-reproducible.

Why?  All these profiles are in profiles.xml (which is labeled and
included with the codeline we're working on).

>>> If selecting different profiles produces a different build, 

It doesn't, it just changes the configuration package.  The core build
is generated once (because it's 220 mb) and the configuration is
generated as many times as we need.

>>>> then each of these different builds should be stored in a
repository somewhere, otherwise it is not reproducable.

We're using cruise control - every built zip file is stored on our main
CC server (we're running in distributed mode and have 4 build servers at
this point - more to come later).

>>>> If you bundle this all together then yes this chews up disk space.

Correct, there's no way I'm generating the full sized bundles for EVERY
type of server we have for every active branch we have - see my previous
emails.  That's just plain unreasonable to even suggest this as a
possible solution (I know you're not, but others have).  

>>>> Why can't you have the base build (huge) plus the variations
(small)
>>>> and then a process outside maven which merges the variations into
the
>>>> base during the deployment steps?

Currently, we do.  Our deploy script which are ANT based (phew!) take
the main zip and extract the config zip over it.  That's not the
problem.  The problem is with a KNOWN issue in maven where the Jira
ticked - http://jira.codehaus.org/browse/MNG-2309 .  Accoding to that,
2.0.5 and 2.0.6 are NOT effected by this bug (but they are) and the
target release is 2.1.  Is is possible to get this version to test?

I get the feeling that MOST are using maven to build very simple things,
like say, maybe - cruise control - that can be built with m2.  Other
stand alone jars like jaxp or xalan for example would make sense to me.
But massive app server type deploys just seem out of the grip of maven.
Where everything we're doing is custom, m2 looks less and less like the
correct solution (because everything is SUPER custom).  Working with m2
has been slow and painful and often fruit less as we spend hours (or
days in some cases) working with a horribly documented* plugin (say the
sar file plugin stuff) just to find out it's bugged and that its not
being actively developed anymore and we need to find a totally custom
soultion (typically shelling out to ant).

* Most of the links on the various pages of the maven home page don't
work for me.  Go here
http://maven.apache.org/guides/getting-started/index.html  click any of
those links like the "How do I deploy my site?" one....



---------------------------------------------------------------------
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: Maven not respecting order of profiles passed in on the command line

Posted by Barrie Treloar <ba...@gmail.com>.
You probably want to read
http://www.nabble.com/What-is-the-Best-practice-for-generating-variations-of-an-artifacts--tf3414040s177.html

I'm still confused over your build environment.

Maven has one artifact per pom.
When you release your artifact it should be reproducible.
But having to select a bunch of profiles makes it un-reproducible.

If selecting different profiles produces a different build, then each
of these different builds should be stored in a repository somewhere,
otherwise it is not reproducable.

If you bundle this all together then yes this chews up disk space.

Why can't you have the base build (huge) plus the variations (small)
and then a process outside maven which merges the variations into the
base during the deployment steps?

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


Re: Maven not respecting order of profiles passed in on the command line

Posted by Jason van Zyl <ja...@maven.org>.
On 5 Jun 07, at 7:19 PM 5 Jun 07, EJ Ciramella wrote:

> Did ya miss the part about the 220 mb artifacts?  :-P
>
> This is a MASSIVE product.  Nothing I can zip up and send anywhere
> (plus, most likely, I'd be instantly fired).
>

Yes, well that's always the hard part. Making a project  
representative of the problem that we can use. Without a project we  
can't really do anything except grope around in the dark making  
projects ourselves hoping we're accurately recreating the problem  
which really isn't a productive use of our time. We need something to  
work with, the more you can provide the better.

> -----Original Message-----
> From: Jason van Zyl [mailto:jason@maven.org]
> Sent: Tuesday, June 05, 2007 7:01 PM
> To: Maven Users List
> Subject: Re: Maven not respecting order of profiles passed in on the
> command line
>
>
> On 5 Jun 07, at 6:07 PM 5 Jun 07, EJ Ciramella wrote:
>
>> Project, you want the pom.xml or the profiles.xml or both?
>>
>
> A fully intact project that I can run directly. Basically so I can
> unzip, run, and look for the problem you describe.
>
>> -----Original Message-----
>> From: Jason van Zyl [mailto:jason@maven.org]
>> Sent: Tuesday, June 05, 2007 5:19 PM
>> To: Maven Users List
>> Subject: Re: Maven not respecting order of profiles passed in on the
>> command line
>>
>>
>> On 5 Jun 07, at 2:36 PM 5 Jun 07, EJ Ciramella wrote:
>>
>>>
>>> How about mvn fixing this buggy profile override code?  I can see
>>> it's
>>> targeted for 2.1 (now)...
>>>
>>
>> Provide a sample project and attach it to JIRA and your chances are
>> much higher.
>>
>>> -------------------------------------------------------------------- 
>>> -
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>> Thanks,
>>
>> Jason
>>
>> ----------------------------------------------------------
>> Jason van Zyl
>> Founder and PMC Chair, Apache Maven
>> jason at sonatype dot com
>> ----------------------------------------------------------
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder and PMC Chair, Apache Maven
> jason at sonatype dot com
> ----------------------------------------------------------
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder and PMC Chair, Apache Maven
jason at sonatype dot com
----------------------------------------------------------




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


RE: Maven not respecting order of profiles passed in on the command line

Posted by EJ Ciramella <ej...@upromise.com>.
Take ANY working project you ALREADY have and try using
help:active-profiles with a list specified.  You can change the order
and it doesn't matter.  Maven just does what it likes.

 

-----Original Message-----
From: Jason van Zyl [mailto:jason@maven.org] 
Sent: Tuesday, June 05, 2007 7:46 PM
To: Maven Users List
Subject: Re: Maven not respecting order of profiles passed in on the
command line


On 5 Jun 07, at 7:35 PM 5 Jun 07, EJ Ciramella wrote:

> You don't need a project btw - you just need maybe 5 profiles.  Try to
> activate three of them.  Then change the order of the profiles.
>

Right, that's what you have to give us. I'm not making them to  
reproduce the problem. Or if you ask us to it will either get closed  
as incomplete or go to the back of the line. Take 5 minutes and give  
us some POMs and profiles and you'll save us a lot of time and we'll  
be working with something that represents what your problem actually is.

> -----Original Message-----
> From: EJ Ciramella [mailto:ejciramella@upromise.com]
> Sent: Tuesday, June 05, 2007 7:19 PM
> To: Maven Users List
> Subject: RE: Maven not respecting order of profiles passed in on the
> command line
>
> Did ya miss the part about the 220 mb artifacts?  :-P
>
> This is a MASSIVE product.  Nothing I can zip up and send anywhere
> (plus, most likely, I'd be instantly fired).
>
> -----Original Message-----
> From: Jason van Zyl [mailto:jason@maven.org]
> Sent: Tuesday, June 05, 2007 7:01 PM
> To: Maven Users List
> Subject: Re: Maven not respecting order of profiles passed in on the
> command line
>
>
> On 5 Jun 07, at 6:07 PM 5 Jun 07, EJ Ciramella wrote:
>
>> Project, you want the pom.xml or the profiles.xml or both?
>>
>
> A fully intact project that I can run directly. Basically so I can
> unzip, run, and look for the problem you describe.
>
>> -----Original Message-----
>> From: Jason van Zyl [mailto:jason@maven.org]
>> Sent: Tuesday, June 05, 2007 5:19 PM
>> To: Maven Users List
>> Subject: Re: Maven not respecting order of profiles passed in on the
>> command line
>>
>>
>> On 5 Jun 07, at 2:36 PM 5 Jun 07, EJ Ciramella wrote:
>>
>>>
>>> How about mvn fixing this buggy profile override code?  I can see
>>> it's
>>> targeted for 2.1 (now)...
>>>
>>
>> Provide a sample project and attach it to JIRA and your chances are
>> much higher.
>>
>>> --------------------------------------------------------------------

>>> -
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>> Thanks,
>>
>> Jason
>>
>> ----------------------------------------------------------
>> Jason van Zyl
>> Founder and PMC Chair, Apache Maven
>> jason at sonatype dot com
>> ----------------------------------------------------------
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder and PMC Chair, Apache Maven
> jason at sonatype dot com
> ----------------------------------------------------------
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder and PMC Chair, Apache Maven
jason at sonatype dot com
----------------------------------------------------------




---------------------------------------------------------------------
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: Maven not respecting order of profiles passed in on the command line

Posted by Jason van Zyl <ja...@maven.org>.
On 5 Jun 07, at 7:35 PM 5 Jun 07, EJ Ciramella wrote:

> You don't need a project btw - you just need maybe 5 profiles.  Try to
> activate three of them.  Then change the order of the profiles.
>

Right, that's what you have to give us. I'm not making them to  
reproduce the problem. Or if you ask us to it will either get closed  
as incomplete or go to the back of the line. Take 5 minutes and give  
us some POMs and profiles and you'll save us a lot of time and we'll  
be working with something that represents what your problem actually is.

> -----Original Message-----
> From: EJ Ciramella [mailto:ejciramella@upromise.com]
> Sent: Tuesday, June 05, 2007 7:19 PM
> To: Maven Users List
> Subject: RE: Maven not respecting order of profiles passed in on the
> command line
>
> Did ya miss the part about the 220 mb artifacts?  :-P
>
> This is a MASSIVE product.  Nothing I can zip up and send anywhere
> (plus, most likely, I'd be instantly fired).
>
> -----Original Message-----
> From: Jason van Zyl [mailto:jason@maven.org]
> Sent: Tuesday, June 05, 2007 7:01 PM
> To: Maven Users List
> Subject: Re: Maven not respecting order of profiles passed in on the
> command line
>
>
> On 5 Jun 07, at 6:07 PM 5 Jun 07, EJ Ciramella wrote:
>
>> Project, you want the pom.xml or the profiles.xml or both?
>>
>
> A fully intact project that I can run directly. Basically so I can
> unzip, run, and look for the problem you describe.
>
>> -----Original Message-----
>> From: Jason van Zyl [mailto:jason@maven.org]
>> Sent: Tuesday, June 05, 2007 5:19 PM
>> To: Maven Users List
>> Subject: Re: Maven not respecting order of profiles passed in on the
>> command line
>>
>>
>> On 5 Jun 07, at 2:36 PM 5 Jun 07, EJ Ciramella wrote:
>>
>>>
>>> How about mvn fixing this buggy profile override code?  I can see
>>> it's
>>> targeted for 2.1 (now)...
>>>
>>
>> Provide a sample project and attach it to JIRA and your chances are
>> much higher.
>>
>>> -------------------------------------------------------------------- 
>>> -
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>> Thanks,
>>
>> Jason
>>
>> ----------------------------------------------------------
>> Jason van Zyl
>> Founder and PMC Chair, Apache Maven
>> jason at sonatype dot com
>> ----------------------------------------------------------
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder and PMC Chair, Apache Maven
> jason at sonatype dot com
> ----------------------------------------------------------
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder and PMC Chair, Apache Maven
jason at sonatype dot com
----------------------------------------------------------




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


RE: Maven not respecting order of profiles passed in on the command line

Posted by EJ Ciramella <ej...@upromise.com>.
You don't need a project btw - you just need maybe 5 profiles.  Try to
activate three of them.  Then change the order of the profiles. 

-----Original Message-----
From: EJ Ciramella [mailto:ejciramella@upromise.com] 
Sent: Tuesday, June 05, 2007 7:19 PM
To: Maven Users List
Subject: RE: Maven not respecting order of profiles passed in on the
command line

Did ya miss the part about the 220 mb artifacts?  :-P

This is a MASSIVE product.  Nothing I can zip up and send anywhere
(plus, most likely, I'd be instantly fired). 

-----Original Message-----
From: Jason van Zyl [mailto:jason@maven.org] 
Sent: Tuesday, June 05, 2007 7:01 PM
To: Maven Users List
Subject: Re: Maven not respecting order of profiles passed in on the
command line


On 5 Jun 07, at 6:07 PM 5 Jun 07, EJ Ciramella wrote:

> Project, you want the pom.xml or the profiles.xml or both?
>

A fully intact project that I can run directly. Basically so I can  
unzip, run, and look for the problem you describe.

> -----Original Message-----
> From: Jason van Zyl [mailto:jason@maven.org]
> Sent: Tuesday, June 05, 2007 5:19 PM
> To: Maven Users List
> Subject: Re: Maven not respecting order of profiles passed in on the
> command line
>
>
> On 5 Jun 07, at 2:36 PM 5 Jun 07, EJ Ciramella wrote:
>
>>
>> How about mvn fixing this buggy profile override code?  I can see  
>> it's
>> targeted for 2.1 (now)...
>>
>
> Provide a sample project and attach it to JIRA and your chances are
> much higher.
>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder and PMC Chair, Apache Maven
> jason at sonatype dot com
> ----------------------------------------------------------
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder and PMC Chair, Apache Maven
jason at sonatype dot com
----------------------------------------------------------




---------------------------------------------------------------------
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: Maven not respecting order of profiles passed in on the command line

Posted by EJ Ciramella <ej...@upromise.com>.
Did ya miss the part about the 220 mb artifacts?  :-P

This is a MASSIVE product.  Nothing I can zip up and send anywhere
(plus, most likely, I'd be instantly fired). 

-----Original Message-----
From: Jason van Zyl [mailto:jason@maven.org] 
Sent: Tuesday, June 05, 2007 7:01 PM
To: Maven Users List
Subject: Re: Maven not respecting order of profiles passed in on the
command line


On 5 Jun 07, at 6:07 PM 5 Jun 07, EJ Ciramella wrote:

> Project, you want the pom.xml or the profiles.xml or both?
>

A fully intact project that I can run directly. Basically so I can  
unzip, run, and look for the problem you describe.

> -----Original Message-----
> From: Jason van Zyl [mailto:jason@maven.org]
> Sent: Tuesday, June 05, 2007 5:19 PM
> To: Maven Users List
> Subject: Re: Maven not respecting order of profiles passed in on the
> command line
>
>
> On 5 Jun 07, at 2:36 PM 5 Jun 07, EJ Ciramella wrote:
>
>>
>> How about mvn fixing this buggy profile override code?  I can see  
>> it's
>> targeted for 2.1 (now)...
>>
>
> Provide a sample project and attach it to JIRA and your chances are
> much higher.
>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder and PMC Chair, Apache Maven
> jason at sonatype dot com
> ----------------------------------------------------------
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder and PMC Chair, Apache Maven
jason at sonatype dot com
----------------------------------------------------------




---------------------------------------------------------------------
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: Maven not respecting order of profiles passed in on the command line

Posted by Jason van Zyl <ja...@maven.org>.
On 5 Jun 07, at 6:07 PM 5 Jun 07, EJ Ciramella wrote:

> Project, you want the pom.xml or the profiles.xml or both?
>

A fully intact project that I can run directly. Basically so I can  
unzip, run, and look for the problem you describe.

> -----Original Message-----
> From: Jason van Zyl [mailto:jason@maven.org]
> Sent: Tuesday, June 05, 2007 5:19 PM
> To: Maven Users List
> Subject: Re: Maven not respecting order of profiles passed in on the
> command line
>
>
> On 5 Jun 07, at 2:36 PM 5 Jun 07, EJ Ciramella wrote:
>
>>
>> How about mvn fixing this buggy profile override code?  I can see  
>> it's
>> targeted for 2.1 (now)...
>>
>
> Provide a sample project and attach it to JIRA and your chances are
> much higher.
>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder and PMC Chair, Apache Maven
> jason at sonatype dot com
> ----------------------------------------------------------
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder and PMC Chair, Apache Maven
jason at sonatype dot com
----------------------------------------------------------




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


RE: Maven not respecting order of profiles passed in on the command line

Posted by EJ Ciramella <ej...@upromise.com>.
Project, you want the pom.xml or the profiles.xml or both? 

-----Original Message-----
From: Jason van Zyl [mailto:jason@maven.org] 
Sent: Tuesday, June 05, 2007 5:19 PM
To: Maven Users List
Subject: Re: Maven not respecting order of profiles passed in on the
command line


On 5 Jun 07, at 2:36 PM 5 Jun 07, EJ Ciramella wrote:

>
> How about mvn fixing this buggy profile override code?  I can see it's
> targeted for 2.1 (now)...
>

Provide a sample project and attach it to JIRA and your chances are  
much higher.

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

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder and PMC Chair, Apache Maven
jason at sonatype dot com
----------------------------------------------------------




---------------------------------------------------------------------
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: Maven not respecting order of profiles passed in on the command line

Posted by Jason van Zyl <ja...@maven.org>.
On 5 Jun 07, at 2:36 PM 5 Jun 07, EJ Ciramella wrote:

>
> How about mvn fixing this buggy profile override code?  I can see it's
> targeted for 2.1 (now)...
>

Provide a sample project and attach it to JIRA and your chances are  
much higher.

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

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder and PMC Chair, Apache Maven
jason at sonatype dot com
----------------------------------------------------------




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


RE: Maven not respecting order of profiles passed in on the command line

Posted by EJ Ciramella <ej...@upromise.com>.
>>> Basically a profile should only be used to either
>>> a) externalise OS dependent settings, e.g. location of eclipse
installation.
>>>     In general for all most all maven plugins you never need to do
this

Why else would you use a profile?

So we have three per environment we activate:

1 - base (has all the generic stuff used across all environments
2 - StackDefaults (this is all the default stuff per
qa/staging/production environments - everything that's different between
these and a developer's machine)
3 - color (all of our stacks are color coded - things like db strings go
in here)

So when we build, we activate via -Pbase,StackDefaults,<color>

Depending on what the "color" profile is, via help:active-profiles, we
can see sometimes <color> comes before StackDefaults - which basically
nullifies itsself.


>>> You are using -Ppersonal,StackDefaults,ca-lime,root which just feels
wrong.

Why?  How else do you say, "take everything from this semi-generic
profile, PLUS what is defined as a stack default AND override all that
with this VERY specific stuff in this ca-lime profile (just ignore
"root" for the time being as it needs to specify the directory the build
is happening in)

>>> Why are you having to select these values?

Because for our stack defaults, we have a large set of c-name settings.
Instead of having each color profile that had 9134806709328476 entries,
we plopped them all in StackDefaults.  This way when it comes time to
add on a new stack, people don't look at it and say, "ZOMG - LOOK AT ALL
THOSE ENTRIES!!!  I'll never figure this out".  Then get releng
involved.  Then get dev involved.  Then get ops involved.  The way it
works now is you add a color profile and talk to the dbas for what the
password should be for that env.  

>>> Why are they not the defined defaults?  

We have two degrees of defined defaults.  This is where I think we break
from the mvn norm.  We have a VERY complex environemtal set up in
staging and production.  We have 4 web servers, 5 jboss app servers, 2
atg util servers, the list goes on and on - in total 25 with MANY
various purposes.  Where when we try to stick to convention over
configuration, it forced us down this path.

  

>>> There was a discussion a while ago about multiple build for
different
>>> configurations, e.g. Tomcat/War, JBoss/Ear, etc.  I can't recall the
>>> result of the discussion.
>>> But if you always want to build each of these configurations then
you
>>> may want to consider creating a module per configuration that has
all
>>> the correct settings defined for that build.

Heh - what we're doing is building a "main" bin type distirubtable that
is mis-configured (because we're only activating the personal profile
with next to no other profile).  That alone is about 220 mb.  If we had
to generate that for each stack, that'd be 15 of those puppies.  Plus,
we still have to build up the atg ca app, util app, email server - the
list goes on.  Add to this that we currently have 7 active branches.
You start to see how big a disk that would require.  This is why we
build ONE main binary then a configuration for each environment.  The
config files are tiny, maybe 10 kb.  


I think your suggestions are valid, but only for a very plain-jane build
env and environment (which ours is not).

How about mvn fixing this buggy profile override code?  I can see it's
targeted for 2.1 (now)...

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


Re: Maven not respecting order of profiles passed in on the command line

Posted by Barrie Treloar <ba...@gmail.com>.
On 6/4/07, EJ Ciramella <ej...@upromise.com> wrote:
> Please enlighten me - how do you avoid using profiles entirely?

You will need to describe your use case.

Basically a profile should only be used to either
a) externalise OS dependent settings, e.g. location of eclipse installation.
    In general for all most all maven plugins you never need to do this
b) to turn on additional plugins that you dont want include in the
default build, e.g. an integration test suite run.

You are using -Ppersonal,StackDefaults,ca-lime,root which just feels wrong.
Why are you having to select these values?
Why are they not the defined defaults?

There was a discussion a while ago about multiple build for different
configurations, e.g. Tomcat/War, JBoss/Ear, etc.  I can't recall the
result of the discussion.
But if you always want to build each of these configurations then you
may want to consider creating a module per configuration that has all
the correct settings defined for that build.

e.g.
Root
 + configurationA (contains A's specific configurationd details)
 + configurationB (contains B's specific configurationd details)
 + module1
 + ...
where all configurations depend upon independent artifacts.

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


RE: Maven not respecting order of profiles passed in on the command line

Posted by EJ Ciramella <ej...@upromise.com>.
Please enlighten me - how do you avoid using profiles entirely? 

-----Original Message-----
From: Barrie Treloar [mailto:baerrach@gmail.com] 
Sent: Saturday, June 02, 2007 8:29 PM
To: Maven Users List
Subject: Re: Maven not respecting order of profiles passed in on the
command line

On 6/3/07, Wendy Smoak <ws...@gmail.com> wrote:
> On 6/2/07, EJ Ciramella <ej...@upromise.com> wrote:
>
> > I hate to bump my original email - but can someone from the dev side
> > please let me know what to expect here?
> >
> > We're 100% wedged at this point.
>
> The issue you linked to [1] is marked fixed for 2.1-alpha-1, which has
> not yet been released.
>
> The dev list is a better place to ask about whether it will be fixed
> in 2.0 (I assume not, or else the issue would have been left open,)
> and about the status of Maven 2.1 development.
>
> [1] http://jira.codehaus.org/browse/MNG-2309

Why are you relying on profile order anyway?

You should be able to avoid using profiles.

---------------------------------------------------------------------
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: Maven not respecting order of profiles passed in on the command line

Posted by Barrie Treloar <ba...@gmail.com>.
On 6/3/07, Wendy Smoak <ws...@gmail.com> wrote:
> On 6/2/07, EJ Ciramella <ej...@upromise.com> wrote:
>
> > I hate to bump my original email - but can someone from the dev side
> > please let me know what to expect here?
> >
> > We're 100% wedged at this point.
>
> The issue you linked to [1] is marked fixed for 2.1-alpha-1, which has
> not yet been released.
>
> The dev list is a better place to ask about whether it will be fixed
> in 2.0 (I assume not, or else the issue would have been left open,)
> and about the status of Maven 2.1 development.
>
> [1] http://jira.codehaus.org/browse/MNG-2309

Why are you relying on profile order anyway?

You should be able to avoid using profiles.

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


RE: Maven not respecting order of profiles passed in on the command line

Posted by EJ Ciramella <ej...@upromise.com>.
The bug says this also:

Affects versions:  2.0, 2.0.1, 2.0.3, 2.0.2, 2.0.4 

2.0.5/6 are both absent from that list.

At the bottom of the page, I also see this:

Fixed in trunk revision 408021.

Merged in 2.0.x branch in revision 408023.

So I'm not sure where/how this is really fixed.

-----Original Message-----
From: Wendy Smoak [mailto:wsmoak@gmail.com] 
Sent: Saturday, June 02, 2007 1:40 PM
To: Maven Users List
Subject: Re: Maven not respecting order of profiles passed in on the
command line

On 6/2/07, EJ Ciramella <ej...@upromise.com> wrote:

> I hate to bump my original email - but can someone from the dev side
> please let me know what to expect here?
>
> We're 100% wedged at this point.

The issue you linked to [1] is marked fixed for 2.1-alpha-1, which has
not yet been released.

The dev list is a better place to ask about whether it will be fixed
in 2.0 (I assume not, or else the issue would have been left open,)
and about the status of Maven 2.1 development.

[1] http://jira.codehaus.org/browse/MNG-2309

-- 
Wendy

---------------------------------------------------------------------
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: Maven not respecting order of profiles passed in on the command line

Posted by Wendy Smoak <ws...@gmail.com>.
On 6/2/07, EJ Ciramella <ej...@upromise.com> wrote:

> I hate to bump my original email - but can someone from the dev side
> please let me know what to expect here?
>
> We're 100% wedged at this point.

The issue you linked to [1] is marked fixed for 2.1-alpha-1, which has
not yet been released.

The dev list is a better place to ask about whether it will be fixed
in 2.0 (I assume not, or else the issue would have been left open,)
and about the status of Maven 2.1 development.

[1] http://jira.codehaus.org/browse/MNG-2309

-- 
Wendy

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


RE: Maven not respecting order of profiles passed in on the command line

Posted by EJ Ciramella <ej...@upromise.com>.
I hate to bump my original email - but can someone from the dev side
please let me know what to expect here?

We're 100% wedged at this point. 

-----Original Message-----
From: EJ Ciramella [mailto:ejciramella@upromise.com] 
Sent: Friday, June 01, 2007 7:31 PM
To: Maven Users List
Subject: Maven not respecting order of profiles passed in on the command
line

Hey m2 mailing list - I'm having some issues with getting profiles
activated that I'd like.
 
I'm using version 2.0.5 (and tested with 2.0.6 with the same results)
and when I do something like:
 
mvn help:active-profiles -Ppersonal,StackDefaults,ca-lime,root
 
I see this:
 
<snip>
    Active Profiles for Project 'lty:app:pom:52.0-SNAPSHOT': 
 
    The following profiles are active:
 
     - personal (source: profiles.xml)
     - ca-lime (source: profiles.xml)
     - StackDefaults (source: profiles.xml)
     - root (source: settings.xml)
</snip>
 
 - personal (source: profiles.xml)
 - StackDefaults (source: profiles.xml)
 - ca-lime (source: profiles.xml)
 - root (source: settings.xml)
 
I can see this is/was a bug:
 
http://jira.codehaus.org/browse/MNG-2309
 
But I'm still seeing this in both 2.0.5 and 2.0.6.
 
HELP!!!

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