Please read my answer here: http://stackoverflow.com/questions/14725197/reading-properties-file-from-pom-file-in-maven/14727072#14727072
I think you are trying to do something that does not work On Thursday, 15 January 2015, Bernd <[email protected]> wrote: > In order to help you we need the full chain, in pom3 you do not show the > parent. In pom2 the current version must be defined, otherwise it cannot > get to the parent. > > Did you check you actually get the pom versions you expect (just watch the > downloads or look at help:effective-pom) > > Grettings > Bernd > Am 15.01.2015 08:04 schrieb "yeelong" <[email protected] <javascript:;> > >: > > > Hi All, > > > > Could you please help to advise the following? > > > > I have the following in my parent POM 1: > > > > <profiles> > > <profile> > > <id>development</id> > > <activation> > > <activeByDefault>true</activeByDefault> > > </activation> > > <repositories> > > <repository> > > <id>some-snapshots</id> > > <name>Some snapshots</name> > > <url>http://someip:someport/content/repositories/snapshots/</url> > > </repository> > > </repositories> > > </profile> > > <properties> > > > > <currentVersion>version_A</currentVersion> > > </properties> > > </profiles> > > > > > > I have the following in my children POM 2: > > > > <parent> > > <groupId>parent_group_id</groupId> > > <artifactId>parent_artifact_id</artifactId> > > <version>${currentVersion}</version> > > </parent> > > > > > > I have the following in my children POM 3: > > > > > > <dependency> > > <groupId>pom2_group_id</groupId> > > <artifactId>pom2_artifact_id</artifactId> > > <version>pom2_version</version> > > </dependency> > > > > > > POM1 and POM2 is both working fine and the ${currentVersion} is > > recognized. But in POM 3, it complains that ${currentVersion} can not be > > resolved. > > > > Thanks and Regards, > > > > Yee Long > > > > > > > > -- > > View this message in context: > > > http://maven.40175.n5.nabble.com/Enquiry-about-POM-parent-tag-version-tp5823587.html > > Sent from the Maven - Users mailing list archive at Nabble.com. > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > <javascript:;> > > For additional commands, e-mail: [email protected] > <javascript:;> > > > > > -- Sent from my phone
