> -----Original Message----- > From: Brett Porter [mailto:[EMAIL PROTECTED] > Sent: dimanche 17 avril 2005 15:28 > To: dev@maven.apache.org > Subject: Re: [M2] filter definition > > > >I agree that putting <filtering> in the POM is a good first approach but > >that it won't handle the need for different environments. > > > >This is something that I've been wanted to include in maven for a very > long > >time: the ability to say "build me this project for this environment". > > > > > > > > > As I said, I'm stil not convinced this is a good way to go. > - unless you have a clear way to identify, it's hard to tell what env it > belongs to > - its rarely a good idea to rebuild for a move through the final testing > phases as you want to change as little as possible > > I'm more in favour of us lending a hand with configuration management > that is external to the artifacts, and using the filtering to populate > some variables from a central location, and ease development.
The way I've been doing it so far is by having: project1 |_ src/resources |_ env1 |_ [files or env1] |_ envN |_ [files or envN] |_ shared |_ [files shared by all envs] |_ [...] And then having the logic to choose the resource files based on a env.name=env1|envN property. See http://www.pivolis.com/pdf/Enterprise_Builds_V1.0.pdf, pages 9 to 11. However, I have always thought this selection of resource files based on a deployment environment is something that the build system should help with (which was not really the case with m1 where you had to implement it in an ad-hoc fashion). Hence my question for m2: is m2 going to help in this domain? [snip] > I don't think we want to put anything in settings.xml that is shared - > what is in there are passwords and passhphrases and paths. The common > things - repository url, etc are in pom.xml. > > What are you thinking is going into settings.xml that is shared? I'm probably wrong then... :-) -Vincent --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]