Ok, thanks. After I posted that query I found something in the
unofficial faq that alluded to that being the normal behavior.
Tim O'Brien wrote:
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]
--
Rusty Wright <mailto:[email protected]>
UC Berkeley, IS&T Web Applications
510-643-9097 office
925-212-3774 cell
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]