What I've surmised from the various sources of maven thinking, is that 1) The <parent> element should identify the parent using explicit (no properties) values 2) The child project can then "inherit" from the parent the <groupId> 3) The child project should also define its version explicitly
The release plugin expects this and has code to adjust these values inside the pom, as the release happens. They go from x.y.z-SNAPSHOT to x.y.z (without the snapshot), to x.y.(z+1)-SNAPSHOT for the next release snapshot (the last one is changeable, to correspond to your release numbering - see the documentation for the release plugin). The point of all that is that the tooling tries to take care of mass-updating these "fixed" version numbers. This might reduce the motivation of using substitutable property names (that is, if the motivation was to have one spot to update, and have that update "propagated" to the other poms). -Marshall Schor On 5/3/2010 12:37 PM, Frank Maritato wrote: > Hi, > > I have a multi module project and in my top level pom I am using a > property to define the version number like this: > > <version>${myproject.version}</version> > > <properties> > <myproject.version>0.1</myproject.version> > </properties> > > All my submodules inherit from this pom and all define <version> the > same way. Within the context of this project it all works and > everything is cool. The problem I have is when I try to import one of > these libraries into another project I get an error that it can't > resolve the parent of my dependency because it isn't resolving that > property value. > When I look in my .m2/repository directory at the pom for that project > it still has the unresolved ${myproject.version} string in there. I > have tried defining that property in the other project that is > importing that dependency but it still doesn't work. > > Is this not the way we should define our project? Should we just use > explicit version numbers in our pom's? > > -- > Frank Maritato > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org