Activating profiles declared in parent pom

2010-06-24 Thread Dunstan, Tom (SACE Board)
Hi all We're trying to set up a set of maven projects which can be used with both spring 2.5.x and spring 3.0.x. Mostly our applications are currently using 2.5.6 atm, but we'd like to gradually move them over to 3.0.x as time goes on. Rather than have our libraries and apps hard-code the

Re: Activating profiles declared in parent pom

2010-06-24 Thread Jörg Schaible
Dunstan, Tom (SACE Board) wrote: Hi all We're trying to set up a set of maven projects which can be used with both spring 2.5.x and spring 3.0.x. Mostly our applications are currently using 2.5.6 atm, but we'd like to gradually move them over to 3.0.x as time goes on. Rather than have

RE: Activating profiles declared in parent pom

2010-06-24 Thread Dunstan, Tom (SACE Board)
Profiles.xml is deprecated and IIRC not supported in M3. D'oh. If there were a way to do it inside the pom that would definitely be better (it really isn't an external setting) but I don't see any way to do that... Any suggestions gratefully accepted! Active the profile directly in the

Re: Activating profiles declared in parent pom

2010-06-24 Thread Anders Hammar
This type of solution is very bad! Please remember that the poms serve as metadata for other Maven projects and any alteration of dependencies depending on environment will break that. You're going about this the wrong way, IMO. Your Maven projects should declare its dependencies with GAVs. So if

Re: Activating profiles declared in parent pom

2010-06-24 Thread Stephen Connolly
This is a really bad plan. Your dependencies should not depend on what profile is active. IMHO it was a mistake to allow specification of dependencies from profiles. The best solution is to have either: 1. A project for spring 3 and a project for spring 2.5 that defines the

RE: Activating profiles declared in parent pom

2010-06-24 Thread Dunstan, Tom (SACE Board)
You're going about this the wrong way, IMO. Your Maven projects should declare its dependencies with GAVs. So if you have a project (e.g. projectA) using Spring 2.5, that should be declared in that Maven project. However, if you have some other project (projectB) depending on projectA, it

RE: Activating profiles declared in parent pom

2010-06-24 Thread Dunstan, Tom (SACE Board)
The best solution is to have either: 1. A project for spring 3 and a project for spring 2.5 that defines the dependencyManagement for each of the spring versions and then use dependency scope import to pull in the spring 3 or the spring 2.5 dependency version info (assumes that the

Re: Activating profiles declared in parent pom

2010-06-24 Thread Anders Hammar
The import solution that Stephen suggests is the way to go. Kind of a pre-mixin support... I use that a lot for defining different sets of depMgmt. Very useful when you work with app servers of different versions to make it possible to work and test against the exact same version of dependencies

RE: Activating profiles declared in parent pom

2010-06-24 Thread Jörg Schaible
Dunstan, Tom (SACE Board) wrote: Profiles.xml is deprecated and IIRC not supported in M3. D'oh. If there were a way to do it inside the pom that would definitely be better (it really isn't an external setting) but I don't see any way to do that... Any suggestions gratefully accepted!

RE: Activating profiles declared in parent pom

2010-06-24 Thread Martin Gainty
. From: t...@saceboard.sa.gov.au To: users@maven.apache.org Date: Thu, 24 Jun 2010 17:56:16 +0930 Subject: RE: Activating profiles declared in parent pom The best solution is to have either: 1. A project for spring 3 and a project for spring 2.5 that defines

Re: Activating profiles declared in parent pom

2010-06-24 Thread Ron Wheeler
On 24/06/2010 4:39 AM, Anders Hammar wrote: The import solution that Stephen suggests is the way to go. Kind of a pre-mixin support... I use that a lot for defining different sets of depMgmt. Very useful when you work with app servers of different versions to make it possible to work and test

RE: Activating profiles declared in parent pom

2010-06-24 Thread Dunstan, Tom (SACE Board)
...@gmail.com] On Behalf Of Anders Hammar Sent: Thursday, 24 June 2010 6:09 PM To: Maven Users List Subject: Re: Activating profiles declared in parent pom The import solution that Stephen suggests is the way to go. Kind of a pre-mixin support... I use that a lot for defining different sets