You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jeff Jensen <je...@upstairstechnology.com> on 2005/11/06 05:59:58 UTC

[m2] 's

Hi,

In <parent>, how does one use <relativePath>?  I can only get POM
inheritance to work if I have done a "mvn install" on the parent project.
Then the component projects find it in the local private repo.

I'm sure I just don't understand something yet.  If there is docs on it,
please give me an RTFM link!  TIA


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


Re: [m2] 's

Posted by Brett Porter <br...@gmail.com>.
The version is required too. Automatic versioning of the parent was
deferred until 2.1.

- Brett

On 11/9/05, fabrice.belingard@mpsa.com <fa...@mpsa.com> wrote:
>
>
>
>
> I understand that artifactId and groupId are still required. But when I try
> using <relativePath> (and therefore removes the version element), Maven
> tells me that the version element of parent element is missing... Is it the
> default behaviour or I'm missing something?
>
> Best Regards / Cordialement,
> Fabrice BELLINGARD
> DINQ/DSIN/INSI/EATE/IDVS/AIDV
> (+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com
>
>
>
>              Brett Porter
>              <brett.porter@gm
>              ail.com>                                                 Pour
>                                        Maven Users List
>              07/11/2005 03:36          <us...@maven.apache.org>
>                                                                         cc
>
>                  Veuillez                                            Objet
>                 répondre à             Re: [m2] <parent>'s <relativePath>
>              Maven Users List
>              <users@maven.apa
>                  che.org>
>
>
>
>
>
>
>
> The docs on <relativePath> are lacking, and it really makes it quite
> deceptive. It is not <extend> from m1.
>
> What it does is modifies the behaviour of dan's first point.
> Basically, we have a concept of a universal source directory (more
> generally, a workspace) that is partially implemented - it means that
> even without the reactor or the local repository, Maven is able to
> find the source code for a particular dependency/parent reference so
> that you can more easily develop new versions.
>
> The default location for the parent is ../pom.xml, relativePath allows
> you to select a different location, for example when you structure is
> flat, or deeper without an intermediate parent pom.
>
> However, the group and artifact ID is still required as when the
> parent is coming from the repository, it must look for the parent in
> the repository, and so on. This feature is only for enhancing the
> development in a local checkout of that project.
>
> Hope that helps....
>
> On 11/7/05, Jeff Jensen <je...@upstairstechnology.com> wrote:
> > Brett,
> >
> > Based on your comment of MNG-624 on 11/6/05 7:56 pm, I'm either not using
> > <relativePath> correctly, or can't/not supposed to at all.
> >
> > So is there a way to do what I tried below, or must the parent POM be in
> the
> > repo?  Does MNG-740 have any merit?
> >
> > Are there doc/clarification notes on <relativePath> and I just missed it?
> >
> >
> > -----Original Message-----
> > From: Jeff Jensen [mailto:jeffjensen@upstairstechnology.com]
> > Sent: Sunday, November 06, 2005 8:08 AM
> > To: 'Maven Users List'
> > Subject: RE: [m2] <parent>'s <relativePath>
> >
> > Thanks Dan,
> >
> > My problem seems similar/same as your MNG-740.  I too have the parent pom
> > not in a dir directly above the other components, but in a dir at the
> same
> > level as the other components.
> >
> > In MNG-740, "A" doesn't build for me without the listed step 1: install
> root
> > POM.  The <relativePath> setting seems to have no effect.  I do not
> receive
> > an error message that the parent was not found either.
> >
> > I'll add my use case to the comments.  Thanks again Dan.
> >
> >
> > -----Original Message-----
> > From: dan tran [mailto:dantran@gmail.com]
> > Sent: Saturday, November 05, 2005 11:52 PM
> > To: Maven Users List
> > Subject: Re: [m2] <parent>'s <relativePath>
> >
> > Normally, maven looks for parent pom with this order
> >   immeditate parent directory
> >  local repo
> >  remote repo
> >  So the parent pom.xml in parent dir, must have the groupID and artifacID
> > found in child pom  But there is a bug that may be your problem too
> > http://jira.codehaus.org/browse/MNG-740
> >  -D
> >
> >
> >  On 11/5/05, Jeff Jensen <je...@upstairstechnology.com> wrote:
> > >
> > > Hi,
> > >
> > > In <parent>, how does one use <relativePath>? I can only get POM
> > > inheritance to work if I have done a "mvn install" on the parent
> project.
> > > Then the component projects find it in the local private repo.
> > >
> > > I'm sure I just don't understand something yet. If there is docs on
> > > it, please give me an RTFM link! TIA
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>
>
>
> ---------------------------------------------------------------------
> 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] 's

Posted by Jeff Jensen <je...@upstairstechnology.com>.
Yes, thank you.  So if I understand correctly now, MNG-740 is a valid
bug(?), and specifying relative path of "../../x/y/pom.xml" should work(?)
(of course, group and artifact ids and version are specified too).

This is what I have configured, and MNG-740 describes the config and
failure.  Thanks again for your help.


-----Original Message-----
From: Brett Porter [mailto:brett.porter@gmail.com] 
Sent: Sunday, November 06, 2005 8:37 PM
To: Maven Users List
Subject: Re: [m2] <parent>'s <relativePath>

The docs on <relativePath> are lacking, and it really makes it quite
deceptive. It is not <extend> from m1.

What it does is modifies the behaviour of dan's first point.
Basically, we have a concept of a universal source directory (more
generally, a workspace) that is partially implemented - it means that even
without the reactor or the local repository, Maven is able to find the
source code for a particular dependency/parent reference so that you can
more easily develop new versions.

The default location for the parent is ../pom.xml, relativePath allows you
to select a different location, for example when you structure is flat, or
deeper without an intermediate parent pom.

However, the group and artifact ID is still required as when the parent is
coming from the repository, it must look for the parent in the repository,
and so on. This feature is only for enhancing the development in a local
checkout of that project.

Hope that helps....

On 11/7/05, Jeff Jensen <je...@upstairstechnology.com> wrote:
> Brett,
>
> Based on your comment of MNG-624 on 11/6/05 7:56 pm, I'm either not 
> using <relativePath> correctly, or can't/not supposed to at all.
>
> So is there a way to do what I tried below, or must the parent POM be 
> in the repo?  Does MNG-740 have any merit?
>
> Are there doc/clarification notes on <relativePath> and I just missed it?
>
>
> -----Original Message-----
> From: Jeff Jensen [mailto:jeffjensen@upstairstechnology.com]
> Sent: Sunday, November 06, 2005 8:08 AM
> To: 'Maven Users List'
> Subject: RE: [m2] <parent>'s <relativePath>
>
> Thanks Dan,
>
> My problem seems similar/same as your MNG-740.  I too have the parent 
> pom not in a dir directly above the other components, but in a dir at 
> the same level as the other components.
>
> In MNG-740, "A" doesn't build for me without the listed step 1: 
> install root POM.  The <relativePath> setting seems to have no effect.  
> I do not receive an error message that the parent was not found either.
>
> I'll add my use case to the comments.  Thanks again Dan.
>
>
> -----Original Message-----
> From: dan tran [mailto:dantran@gmail.com]
> Sent: Saturday, November 05, 2005 11:52 PM
> To: Maven Users List
> Subject: Re: [m2] <parent>'s <relativePath>
>
> Normally, maven looks for parent pom with this order
>   immeditate parent directory
>  local repo
>  remote repo
>  So the parent pom.xml in parent dir, must have the groupID and 
> artifacID found in child pom  But there is a bug that may be your 
> problem too http://jira.codehaus.org/browse/MNG-740
>  -D
>
>
>  On 11/5/05, Jeff Jensen <je...@upstairstechnology.com> wrote:
> >
> > Hi,
> >
> > In <parent>, how does one use <relativePath>? I can only get POM 
> > inheritance to work if I have done a "mvn install" on the parent
project.
> > Then the component projects find it in the local private repo.
> >
> > I'm sure I just don't understand something yet. If there is docs on 
> > it, please give me an RTFM link! TIA
>
>
> ---------------------------------------------------------------------
> 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


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


Re: [m2] 's

Posted by fa...@mpsa.com.



I understand that artifactId and groupId are still required. But when I try
using <relativePath> (and therefore removes the version element), Maven
tells me that the version element of parent element is missing... Is it the
default behaviour or I'm missing something?

Best Regards / Cordialement,
Fabrice BELLINGARD
DINQ/DSIN/INSI/EATE/IDVS/AIDV
(+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com


                                                                           
             Brett Porter                                                  
             <brett.porter@gm                                              
             ail.com>                                                 Pour 
                                       Maven Users List                    
             07/11/2005 03:36          <us...@maven.apache.org>            
                                                                        cc 
                                                                           
                 Veuillez                                            Objet 
                répondre à             Re: [m2] <parent>'s <relativePath>  
             Maven Users List                                              
             <users@maven.apa                                              
                 che.org>                                                  
                                                                           
                                                                           
                                                                           




The docs on <relativePath> are lacking, and it really makes it quite
deceptive. It is not <extend> from m1.

What it does is modifies the behaviour of dan's first point.
Basically, we have a concept of a universal source directory (more
generally, a workspace) that is partially implemented - it means that
even without the reactor or the local repository, Maven is able to
find the source code for a particular dependency/parent reference so
that you can more easily develop new versions.

The default location for the parent is ../pom.xml, relativePath allows
you to select a different location, for example when you structure is
flat, or deeper without an intermediate parent pom.

However, the group and artifact ID is still required as when the
parent is coming from the repository, it must look for the parent in
the repository, and so on. This feature is only for enhancing the
development in a local checkout of that project.

Hope that helps....

On 11/7/05, Jeff Jensen <je...@upstairstechnology.com> wrote:
> Brett,
>
> Based on your comment of MNG-624 on 11/6/05 7:56 pm, I'm either not using
> <relativePath> correctly, or can't/not supposed to at all.
>
> So is there a way to do what I tried below, or must the parent POM be in
the
> repo?  Does MNG-740 have any merit?
>
> Are there doc/clarification notes on <relativePath> and I just missed it?
>
>
> -----Original Message-----
> From: Jeff Jensen [mailto:jeffjensen@upstairstechnology.com]
> Sent: Sunday, November 06, 2005 8:08 AM
> To: 'Maven Users List'
> Subject: RE: [m2] <parent>'s <relativePath>
>
> Thanks Dan,
>
> My problem seems similar/same as your MNG-740.  I too have the parent pom
> not in a dir directly above the other components, but in a dir at the
same
> level as the other components.
>
> In MNG-740, "A" doesn't build for me without the listed step 1: install
root
> POM.  The <relativePath> setting seems to have no effect.  I do not
receive
> an error message that the parent was not found either.
>
> I'll add my use case to the comments.  Thanks again Dan.
>
>
> -----Original Message-----
> From: dan tran [mailto:dantran@gmail.com]
> Sent: Saturday, November 05, 2005 11:52 PM
> To: Maven Users List
> Subject: Re: [m2] <parent>'s <relativePath>
>
> Normally, maven looks for parent pom with this order
>   immeditate parent directory
>  local repo
>  remote repo
>  So the parent pom.xml in parent dir, must have the groupID and artifacID
> found in child pom  But there is a bug that may be your problem too
> http://jira.codehaus.org/browse/MNG-740
>  -D
>
>
>  On 11/5/05, Jeff Jensen <je...@upstairstechnology.com> wrote:
> >
> > Hi,
> >
> > In <parent>, how does one use <relativePath>? I can only get POM
> > inheritance to work if I have done a "mvn install" on the parent
project.
> > Then the component projects find it in the local private repo.
> >
> > I'm sure I just don't understand something yet. If there is docs on
> > it, please give me an RTFM link! TIA
>
>
> ---------------------------------------------------------------------
> 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




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


Re: [m2] 's

Posted by Brett Porter <br...@gmail.com>.
The docs on <relativePath> are lacking, and it really makes it quite
deceptive. It is not <extend> from m1.

What it does is modifies the behaviour of dan's first point.
Basically, we have a concept of a universal source directory (more
generally, a workspace) that is partially implemented - it means that
even without the reactor or the local repository, Maven is able to
find the source code for a particular dependency/parent reference so
that you can more easily develop new versions.

The default location for the parent is ../pom.xml, relativePath allows
you to select a different location, for example when you structure is
flat, or deeper without an intermediate parent pom.

However, the group and artifact ID is still required as when the
parent is coming from the repository, it must look for the parent in
the repository, and so on. This feature is only for enhancing the
development in a local checkout of that project.

Hope that helps....

On 11/7/05, Jeff Jensen <je...@upstairstechnology.com> wrote:
> Brett,
>
> Based on your comment of MNG-624 on 11/6/05 7:56 pm, I'm either not using
> <relativePath> correctly, or can't/not supposed to at all.
>
> So is there a way to do what I tried below, or must the parent POM be in the
> repo?  Does MNG-740 have any merit?
>
> Are there doc/clarification notes on <relativePath> and I just missed it?
>
>
> -----Original Message-----
> From: Jeff Jensen [mailto:jeffjensen@upstairstechnology.com]
> Sent: Sunday, November 06, 2005 8:08 AM
> To: 'Maven Users List'
> Subject: RE: [m2] <parent>'s <relativePath>
>
> Thanks Dan,
>
> My problem seems similar/same as your MNG-740.  I too have the parent pom
> not in a dir directly above the other components, but in a dir at the same
> level as the other components.
>
> In MNG-740, "A" doesn't build for me without the listed step 1: install root
> POM.  The <relativePath> setting seems to have no effect.  I do not receive
> an error message that the parent was not found either.
>
> I'll add my use case to the comments.  Thanks again Dan.
>
>
> -----Original Message-----
> From: dan tran [mailto:dantran@gmail.com]
> Sent: Saturday, November 05, 2005 11:52 PM
> To: Maven Users List
> Subject: Re: [m2] <parent>'s <relativePath>
>
> Normally, maven looks for parent pom with this order
>   immeditate parent directory
>  local repo
>  remote repo
>  So the parent pom.xml in parent dir, must have the groupID and artifacID
> found in child pom  But there is a bug that may be your problem too
> http://jira.codehaus.org/browse/MNG-740
>  -D
>
>
>  On 11/5/05, Jeff Jensen <je...@upstairstechnology.com> wrote:
> >
> > Hi,
> >
> > In <parent>, how does one use <relativePath>? I can only get POM
> > inheritance to work if I have done a "mvn install" on the parent project.
> > Then the component projects find it in the local private repo.
> >
> > I'm sure I just don't understand something yet. If there is docs on
> > it, please give me an RTFM link! TIA
>
>
> ---------------------------------------------------------------------
> 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] 's

Posted by Jeff Jensen <je...@upstairstechnology.com>.
Brett,

Based on your comment of MNG-624 on 11/6/05 7:56 pm, I'm either not using
<relativePath> correctly, or can't/not supposed to at all.

So is there a way to do what I tried below, or must the parent POM be in the
repo?  Does MNG-740 have any merit?

Are there doc/clarification notes on <relativePath> and I just missed it?


-----Original Message-----
From: Jeff Jensen [mailto:jeffjensen@upstairstechnology.com] 
Sent: Sunday, November 06, 2005 8:08 AM
To: 'Maven Users List'
Subject: RE: [m2] <parent>'s <relativePath>

Thanks Dan, 

My problem seems similar/same as your MNG-740.  I too have the parent pom
not in a dir directly above the other components, but in a dir at the same
level as the other components.

In MNG-740, "A" doesn't build for me without the listed step 1: install root
POM.  The <relativePath> setting seems to have no effect.  I do not receive
an error message that the parent was not found either.

I'll add my use case to the comments.  Thanks again Dan.


-----Original Message-----
From: dan tran [mailto:dantran@gmail.com]
Sent: Saturday, November 05, 2005 11:52 PM
To: Maven Users List
Subject: Re: [m2] <parent>'s <relativePath>

Normally, maven looks for parent pom with this order
  immeditate parent directory
 local repo
 remote repo
 So the parent pom.xml in parent dir, must have the groupID and artifacID
found in child pom  But there is a bug that may be your problem too
http://jira.codehaus.org/browse/MNG-740
 -D


 On 11/5/05, Jeff Jensen <je...@upstairstechnology.com> wrote:
>
> Hi,
>
> In <parent>, how does one use <relativePath>? I can only get POM 
> inheritance to work if I have done a "mvn install" on the parent project.
> Then the component projects find it in the local private repo.
>
> I'm sure I just don't understand something yet. If there is docs on 
> it, please give me an RTFM link! TIA


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


RE: [m2] 's

Posted by Jeff Jensen <je...@upstairstechnology.com>.
Thanks Dan, 

My problem seems similar/same as your MNG-740.  I too have the parent pom
not in a dir directly above the other components, but in a dir at the same
level as the other components.

In MNG-740, "A" doesn't build for me without the listed step 1: install root
POM.  The <relativePath> setting seems to have no effect.  I do not receive
an error message that the parent was not found either.

I'll add my use case to the comments.  Thanks again Dan.


-----Original Message-----
From: dan tran [mailto:dantran@gmail.com] 
Sent: Saturday, November 05, 2005 11:52 PM
To: Maven Users List
Subject: Re: [m2] <parent>'s <relativePath>

Normally, maven looks for parent pom with this order
  immeditate parent directory
 local repo
 remote repo
 So the parent pom.xml in parent dir, must have the groupID and artifacID
found in child pom  But there is a bug that may be your problem too
http://jira.codehaus.org/browse/MNG-740
 -D


 On 11/5/05, Jeff Jensen <je...@upstairstechnology.com> wrote:
>
> Hi,
>
> In <parent>, how does one use <relativePath>? I can only get POM 
> inheritance to work if I have done a "mvn install" on the parent project.
> Then the component projects find it in the local private repo.
>
> I'm sure I just don't understand something yet. If there is docs on 
> it, please give me an RTFM link! TIA
>
>
> ---------------------------------------------------------------------
> 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] 's

Posted by dan tran <da...@gmail.com>.
Normally, maven looks for parent pom with this order
  immeditate parent directory
 local repo
 remote repo
 So the parent pom.xml in parent dir, must have the groupID and artifacID
found in child pom
 But there is a bug that may be your problem too
 http://jira.codehaus.org/browse/MNG-740
 -D


 On 11/5/05, Jeff Jensen <je...@upstairstechnology.com> wrote:
>
> Hi,
>
> In <parent>, how does one use <relativePath>? I can only get POM
> inheritance to work if I have done a "mvn install" on the parent project.
> Then the component projects find it in the local private repo.
>
> I'm sure I just don't understand something yet. If there is docs on it,
> please give me an RTFM link! TIA
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>