Re: Multi-module passing properties to children
Wayne, your answer sounds like it might solve my problem, but I am a new user and am not sure of the syntax to implement your suggestion. I am creating a buildnumber with a time stamp in the parent pom using the buildnumber plugin. I want to pass the resultant property, ${buildNumber}, to all the children to include in their manifests. I have tried several things, but have found no way to reference this property in the children poms. I have been through hundreds of postings and googled other items and this question seems to come up a lot, but no one ever responds or their response is too criptic for a novice to implement. Your help would be appreciated. Thanks Wayne Wayne Fay wrote: > > Put the shared properties in profiles in the parent pom, include the > children as in the parent pom, and use the parent tag in > the children to share properties with all your poms. > > Or is there a specific reason this is not sufficient? > > Wayne > > On 5/2/07, Jared Blitzstein <[EMAIL PROTECTED]> wrote: >> I have 5 projects that I want to build as a suite. I created a multi- >> module to do this and it's fine out of the box for just calling the >> sub projects. But I need to be able to set variables in the multi- >> module to pass in like the version, profile, and some other basic >> things. But I also need to make sure each of these projects can live >> on their own. I've read http://www.sonatype.com/book/pom- >> relationships.html as well as the getting-started on mavens website >> but they don't speak to what I'm trying to do. Can anyone point me in >> the right direction? >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Multi-module-passing-properties-to-children-tp10294239s177p16321438.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multi-module passing properties to children
If you include a -tag for your parent-POM, your project automatically inherits its version (unless you set it manually). In case you need to reference it in other places as well, try using ${parent.version} On Thursday 03 May 2007 01:04, Jared Blitzstein wrote: > Does using the parent tag require the project to be in a repository? > I planned on having this "suitepom" accessible via CVS but not > something that is going to be installed in our company repo. I may be > way off base though. > > Also, how would you pass something through like a version? The > version tag is required in the child pom so you can't leave it out, > and if I do ${version} it doesn't pick that up from the definition in > the master pom, it just uses "${version}" literally. > -- Roland Asmann CFC Informationssysteme Entwicklungsgesellschaft m.b.H Bäckerstrasse 1/2/7 A-1010 Wien FN 266155f, Handelsgericht Wien Tel.: +43/1/513 88 77 - 27 Fax.: +43/1/513 88 62 Email: [EMAIL PROTECTED] Web: www.cfc.at - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multi-module passing properties to children
Hi, The master pom in this case need not be installed in the repository. You can use the relativePath element under the parent tag to point to your master pom. Something like as follows: ... .. ../(CORRECT_RELATIVE_PATH_TO_WHERE_YOUR_MASTER_POM_EXISTS< /relativePath> This does not require that your parent pom be installed in the repository. -Original Message- From: Jared Blitzstein [mailto:[EMAIL PROTECTED] Sent: Thursday, May 03, 2007 4:34 AM To: Maven Users List Subject: Re: Multi-module passing properties to children Does using the parent tag require the project to be in a repository? I planned on having this "suitepom" accessible via CVS but not something that is going to be installed in our company repo. I may be way off base though. Also, how would you pass something through like a version? The version tag is required in the child pom so you can't leave it out, and if I do ${version} it doesn't pick that up from the definition in the master pom, it just uses "${version}" literally. On May 2, 2007, at 5:17 PM, Wayne Fay wrote: > Put the shared properties in profiles in the parent pom, include the > children as in the parent pom, and use the parent tag in > the children to share properties with all your poms. > > Or is there a specific reason this is not sufficient? > > Wayne > > On 5/2/07, Jared Blitzstein <[EMAIL PROTECTED]> wrote: >> I have 5 projects that I want to build as a suite. I created a >> multi- >> module to do this and it's fine out of the box for just calling the >> sub projects. But I need to be able to set variables in the multi- >> module to pass in like the version, profile, and some other basic >> things. But I also need to make sure each of these projects can live >> on their own. I've read http://www.sonatype.com/book/pom- >> relationships.html as well as the getting-started on mavens website >> but they don't speak to what I'm trying to do. Can anyone point me in >> the right direction? >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multi-module passing properties to children
Does using the parent tag require the project to be in a repository? I planned on having this "suitepom" accessible via CVS but not something that is going to be installed in our company repo. I may be way off base though. Also, how would you pass something through like a version? The version tag is required in the child pom so you can't leave it out, and if I do ${version} it doesn't pick that up from the definition in the master pom, it just uses "${version}" literally. On May 2, 2007, at 5:17 PM, Wayne Fay wrote: Put the shared properties in profiles in the parent pom, include the children as in the parent pom, and use the parent tag in the children to share properties with all your poms. Or is there a specific reason this is not sufficient? Wayne On 5/2/07, Jared Blitzstein <[EMAIL PROTECTED]> wrote: I have 5 projects that I want to build as a suite. I created a multi- module to do this and it's fine out of the box for just calling the sub projects. But I need to be able to set variables in the multi- module to pass in like the version, profile, and some other basic things. But I also need to make sure each of these projects can live on their own. I've read http://www.sonatype.com/book/pom- relationships.html as well as the getting-started on mavens website but they don't speak to what I'm trying to do. Can anyone point me in the right direction? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multi-module passing properties to children
Put the shared properties in profiles in the parent pom, include the children as in the parent pom, and use the parent tag in the children to share properties with all your poms. Or is there a specific reason this is not sufficient? Wayne On 5/2/07, Jared Blitzstein <[EMAIL PROTECTED]> wrote: I have 5 projects that I want to build as a suite. I created a multi- module to do this and it's fine out of the box for just calling the sub projects. But I need to be able to set variables in the multi- module to pass in like the version, profile, and some other basic things. But I also need to make sure each of these projects can live on their own. I've read http://www.sonatype.com/book/pom- relationships.html as well as the getting-started on mavens website but they don't speak to what I'm trying to do. Can anyone point me in the right direction? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multi-module passing properties to children
I have 5 projects that I want to build as a suite. I created a multi- module to do this and it's fine out of the box for just calling the sub projects. But I need to be able to set variables in the multi- module to pass in like the version, profile, and some other basic things. But I also need to make sure each of these projects can live on their own. I've read http://www.sonatype.com/book/pom- relationships.html as well as the getting-started on mavens website but they don't speak to what I'm trying to do. Can anyone point me in the right direction? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]