Using properties inside the groupId:artifactId:version of a pom or a parent declaration will cause lots of problems. This is part of the identity of that artifact and it's not able to be validated. If it works at all it is probably by accident as I'm fairly sure this is not supported.
-----Original Message----- From: Salvador Diaz [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 15, 2008 4:01 AM To: Maven Users List Subject: Re: POM variables not expanded in resulting poms I noticed the very same thing and I also thought it was a bug because the eclipse plugin is unable to use such poms (with unexpanded variables) for artifact resolution. Running "mvn eclipse:eclipse" on a project inheriting one of those artifacts gives the following error: [WARNING] POM for 'myproject:com.mycompany.core:pom:0.21.0SNAPSHOT:compile' is invalid. It will be ignored for artifact resolution. Reason: Failed to validate POM for project ${myproject.groupId}:com.mycompany.core at Artifact [myproject:com.mycompany.core:pom:0.21.0SNAPSHOT:compile] Once this happens, one of the main advantages of maven is lost: transitive dependencies. Is it a bug or an expected behavior ? Is there something I'm missing here? Normally that variable should be resolved as it is defined in one of the profiles defined in my settings.xml which is always activated. Brian E. Fox wrote: > The properties are not expanded when sent to the repository because if > they were then it would break inheritance when projects used that pom > from the repo. There would no longer be any properties for people to > inherit and override. > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: Monday, April 14, 2008 3:17 PM > To: users@maven.apache.org > Subject: POM variables not expanded in resulting poms > > I am trying to set the version of my projects using a property defined > on the maven command line. Please see below for examples. > > > > The resulting .pom installed in the repository still contains the > reference to my variable 'productVersion'. > > > > Should not the variable reference be expanded to its value? > > > > Many thanks > > Alessandro > > > > > > > > [ sample command line option ] > > > > mvn -DproductVersion=TEST install > > > > [ sample pom ] > > > > <project xmlns=http://maven.apache.org/POM/4.0.0 > > > > ... > > > > <artifactId>com.sungard.common.utils</artifactId> > > <packaging>jar</packaging> > > <version>${productVersion}</version> > > <name>SunGard Common Utils</name> > > > > ... > > > > [ resulting pom installed in the repository as > com.sungard.common.utils-TEST.pom ] > > > > > > <project xmlns=http://maven.apache.org/POM/4.0.0 > > > > ... > > > > <artifactId>com.sungard.common.utils</artifactId> > > <packaging>jar</packaging> > > <version>${productVersion}</version> <------------------- NOT > EXPANDED !!!! > > <name>SunGard Common Utils</name> > > > > ... > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > 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]