On Tue, Jul 14, 2009 at 6:56 PM, Rusty Wright<[email protected]> wrote: > My pom starts with > > <parent> > <artifactId>waitlist-parent</artifactId> > <groupId>edu.berkeley.ist.waitlist</groupId> > <version>1.1</version> > <relativePath>../../waitlist-parent/pom.xml</relativePath> > </parent> > > When I run maven and the <version> inside the <parent> tags doesn't match > what's in the parent's pom, it uses the pom from the repository (assuming > there's one there with that version). Is this expected and something that > needs to be documented?
Yes this is the expected behavior. This is documented in the API for Maven Model here http://tr.im/snbj from the Javadoc for getRelativePath(): "Get the relative path of the parent pom.xml file within the check out. The default value is ../pom.xml. Maven looks for the parent pom first in the reactor of currently building projects, then in this location on the filesystem, then the local repository, and lastly in the remote repo. relativePath allows you to select a different location, for example when your structure is flat, or deeper without an intermediate parent pom. However, the group ID, artifact ID and version are still required, and must match the file in the location given or it will revert to the repository for the POM. This feature is only for enhancing the development in a local checkout of that project." > > --------------------------------------------------------------------- > 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]
