You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wendy Smoak <ws...@gmail.com> on 2006/04/09 03:54:21 UTC

[m2] Parent poms and relativePath

Can someone explain exactly how <parent>/<relativePath> works?

I thought that Maven would use relativePath first, before looking in
the local repository, but that's not what happens.

With this structure:
   struts/current/pom/  <-- struts-parent
   struts/current/action   <-- struts-action-parent

An attempt to build from struts-action-parent will fail unless
struts-parent is installed in the local repo, even though the
struts-action-parent pom has
<relativePath>../pom/pom.xml</relativePath>.

Thanks,
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] Parent poms and relativePath

Posted by Wendy Smoak <ws...@gmail.com>.
On 4/8/06, Brett Porter <br...@gmail.com> wrote:
> Do the versions match? The order is
> 1) running in the reactor
> 2) relativePath (default ../pom.xml)
> 3) local repository
> 4) remote repository
>
> However, the ids and version all must match.

Yes, the versions match:
   http://svn.apache.org/repos/asf/struts/pom/pom.xml
   http://svn.apache.org/repos/asf/struts/action/trunk/pom.xml

(And the relative path is correct if you check out 'current' which
places 'action' and 'pom' at the same level.)

I think dan may have it with MNG-740.  This is 2.0.4-SNAPSHOT, and it
does not follow the relative path.

$ rm -rf $M2_REPO/org/apache/struts

~/svn/struts/current/action
$ mvn install

[INFO] Scanning for projects...
[INFO] snapshot org.apache.struts:struts-parent:1-SNAPSHOT: checking for updates
 from apache-snapshot
Downloading: http://cvs.apache.org/maven-snapshot-repository/org/apache/struts/s
truts-parent/1-SNAPSHOT/struts-parent-1-SNAPSHOT.pom
[WARNING] Unable to get resource from repository apache-snapshot (http://cvs.apa
che.org/maven-snapshot-repository)
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

GroupId: org.apache.struts
ArtifactId: struts-parent
Version: 1-SNAPSHOT

Reason: Unable to download the artifact from any repository

  org.apache.struts:struts-parent:pom:1-SNAPSHOT

Good to know I'm not imagining it. :)  I'll go deploy it to
maven-snapshot-repository so it will work without installing locally.

Thanks,
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] Parent poms and relativePath

Posted by Brett Porter <br...@gmail.com>.
Do the versions match? The order is
1) running in the reactor
2) relativePath (default ../pom.xml)
3) local repository
4) remote repository

However, the ids and version all must match.

- Brett

On 4/9/06, Wendy Smoak <ws...@gmail.com> wrote:
> Can someone explain exactly how <parent>/<relativePath> works?
>
> I thought that Maven would use relativePath first, before looking in
> the local repository, but that's not what happens.
>
> With this structure:
>    struts/current/pom/  <-- struts-parent
>    struts/current/action   <-- struts-action-parent
>
> An attempt to build from struts-action-parent will fail unless
> struts-parent is installed in the local repo, even though the
> struts-action-parent pom has
> <relativePath>../pom/pom.xml</relativePath>.
>
> Thanks,
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] Parent poms and relativePath

Posted by dan tran <da...@gmail.com>.
http://jira.codehaus.org/browse/MNG-740 related?

On 4/8/06, Wayne Fay <wa...@gmail.com> wrote:
>
> Hmmm maybe not, I think I'm thinking about another pom
> path/interpolation issue, can probably ignore this comment...
>
> Wayne
>
> On 4/8/06, Wayne Fay <wa...@gmail.com> wrote:
> > Give this a try with 2.0.2 and the 2.0.4 RC... I believe this was a
> > regression bug in 2.0.3. ;-)
> >
> > Wayne
> >
> > On 4/8/06, Wendy Smoak <ws...@gmail.com> wrote:
> > > Can someone explain exactly how <parent>/<relativePath> works?
> > >
> > > I thought that Maven would use relativePath first, before looking in
> > > the local repository, but that's not what happens.
> > >
> > > With this structure:
> > >   struts/current/pom/  <-- struts-parent
> > >   struts/current/action   <-- struts-action-parent
> > >
> > > An attempt to build from struts-action-parent will fail unless
> > > struts-parent is installed in the local repo, even though the
> > > struts-action-parent pom has
> > > <relativePath>../pom/pom.xml</relativePath>.
> > >
> > > Thanks,
> > > Wendy
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
>

Re: [m2] Parent poms and relativePath

Posted by Wayne Fay <wa...@gmail.com>.
Hmmm maybe not, I think I'm thinking about another pom
path/interpolation issue, can probably ignore this comment...

Wayne

On 4/8/06, Wayne Fay <wa...@gmail.com> wrote:
> Give this a try with 2.0.2 and the 2.0.4 RC... I believe this was a
> regression bug in 2.0.3. ;-)
>
> Wayne
>
> On 4/8/06, Wendy Smoak <ws...@gmail.com> wrote:
> > Can someone explain exactly how <parent>/<relativePath> works?
> >
> > I thought that Maven would use relativePath first, before looking in
> > the local repository, but that's not what happens.
> >
> > With this structure:
> >   struts/current/pom/  <-- struts-parent
> >   struts/current/action   <-- struts-action-parent
> >
> > An attempt to build from struts-action-parent will fail unless
> > struts-parent is installed in the local repo, even though the
> > struts-action-parent pom has
> > <relativePath>../pom/pom.xml</relativePath>.
> >
> > Thanks,
> > Wendy
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

Re: [m2] Parent poms and relativePath

Posted by Wayne Fay <wa...@gmail.com>.
Give this a try with 2.0.2 and the 2.0.4 RC... I believe this was a
regression bug in 2.0.3. ;-)

Wayne

On 4/8/06, Wendy Smoak <ws...@gmail.com> wrote:
> Can someone explain exactly how <parent>/<relativePath> works?
>
> I thought that Maven would use relativePath first, before looking in
> the local repository, but that's not what happens.
>
> With this structure:
>   struts/current/pom/  <-- struts-parent
>   struts/current/action   <-- struts-action-parent
>
> An attempt to build from struts-action-parent will fail unless
> struts-parent is installed in the local repo, even though the
> struts-action-parent pom has
> <relativePath>../pom/pom.xml</relativePath>.
>
> Thanks,
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>