properties - Maven: property substitution not done for /project/version tag of pom? - Stack Overflow
Property substitution is not allowed in /project/parent/(groupId|artifactId|version)
or in /project/(groupId|artifactId|version)
by design in Maven 2.x.
So the rules are:
- hard code the version in the top
project/version
element. - hard code the version in the
project/parent/version
element of children. - children inherit the version unless they want to override it
- there is thus not need for a
${myversion}
property
- there is thus not need for a
- use
${project.groupId}
and${project.version}
for inter module dependencies.
You'll find an infinite number of threads on this topic on the maven user list (see for example Pom Parent Version Properties) and I'll just say that any attempt to workaround the above rules is wrong and doesn't work.
Version less parent
will be allowed in Maven 3.1.
Read full article from properties - Maven: property substitution not done for /project/version tag of pom? - Stack Overflow
No comments:
Post a Comment