On 2/14/06, Mike Lantink <[EMAIL PROTECTED]> wrote: > I am trying to find a way to specify the version of the master POM that will > be used in sub project <parent> references in only one location such as a > property in the master POM. This does not seem to resolve out....Is there > another way rather than hardcoding a version in all the sub project parent > references ?
I tried to achieve the same thing, and posted a question here on it, but didn't generate any answers: http://www.nabble.com/Property-variable-not-interpolated-in-%3Cparent%3E-element-when-POM-is-installed-t1105519.html#a2888441 I think this would be very useful thing to have, particularly when you have a large multiproject build. I was actually able to get it work with a property defined in the root POM, when the parent POM and the POM that was the start of my multiproject build was one and the same. However, when my JARs/POMs were installed in the repo (local or remote), the variable in the <parent> was not expanded (becomes a problem when transitive dependencies are calculated for the end-user project where this JAR is a dependency). This is true of other variables in the POM, but for the <parent> declaration it becomes a "chicken and egg" issue: you can't get the property value denoting the POM version without getting the POM itself. But, I'd think you should be able to specify a "-Dxxx=yyyy" value for the property on the command line, or settings.xml, but it didn't seem to work. I wish an exception was made for the <parent> declaration in the installed POM, so that a variable declaration in the <version> tag was actually in interpolated/expanded form when it was installed in the repo. BTW, I was able to use properties to refer to dependencies, and that in itself will cut down a lot on the tedium when we go from SNAPSHOT-to-release-to-SNAPSHOT. If you care to look at it, the root POM and a sample child POM are: http://cvs.apache.org/viewcvs.cgi/*checkout*/excalibur/trunk/pom.xml?rev=377265 http://cvs.apache.org/viewcvs.cgi/*checkout*/excalibur/trunk/framework/impl/pom.xml?rev=377209 Shash --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]