You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by fa...@mpsa.com on 2005/09/29 15:11:26 UTC

[M2] How to use "relativePath" of in a pom?




Hi,

I've seen that there's a "relativePath" attribute for the "parent" element
of the pom. According to the documentation, this is "the relative path of
the parent-pom within the project hierarchy". If this property exists, I
guess this allows to discover the parent pom without specifying the
version, the artifactId and the groupId of the parent, which would be
_very_ handy. However, I get the following error when launching maven:
"Missing groupId element from parent element".

So my question is: is this property working? I guess no:
http://jira.codehaus.org/browse/MNG-1012 (which hasn't been assigned yet)
But maybe this doesn't work this way. So my second question is: how does
this property work?

Thanks in advance for your answers!

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


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


Re: [M2] How to use "relativePath" of in a pom?

Posted by Brett Porter <br...@gmail.com>.
Got it one Kenney.

On 9/29/05, Kenney Westerhof <ke...@apache.org> wrote:
> On Thu, 29 Sep 2005 fabrice.belingard@mpsa.com wrote:
>
> Hi,
>
> > Hi,
> >
> > I've seen that there's a "relativePath" attribute for the "parent" element
> > of the pom. According to the documentation, this is "the relative path of
> > the parent-pom within the project hierarchy". If this property exists, I
> > guess this allows to discover the parent pom without specifying the
> > version, the artifactId and the groupId of the parent, which would be
> > _very_ handy. However, I get the following error when launching maven:
> > "Missing groupId element from parent element".
> >
> > So my question is: is this property working? I guess no:
> > http://jira.codehaus.org/browse/MNG-1012 (which hasn't been assigned yet)
> > But maybe this doesn't work this way. So my second question is: how does
> > this property work?
>
> I'm not entirely up-to-speed on this new feature, but AFAIK the
> artifactId and groupId are mandatory in a <parent> element (version too
> IIRC).
> POMs should be able to be used stand-alone. A client that uses your pom
> wouldn't know where to look for that parent pom, since the directory
> structure on ibiblio is not quite the same as the project tree structure.
>
> Before this attribute was in, m2 always checked ../pom.xml to see if it
> matched the declared parent. If so, it used that (and the data in
> target/*) instead of going to your local/remote repositories for the pom.
> I guess this attribute is just an extension to that, so you can specify
> other locations for your parent project than ../.
>
> Other m2 devs - jump in if this is incorrect!
>
> -- Kenney
>
> > Thanks in advance for your answers!
> >
> > Best Regards / Cordialement,
> > Fabrice BELLINGARD
> > DINQ/DSIN/INSI/EATE/IDVS/AIDV
> > (+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
> --
> Kenney Westerhof
> http://www.neonics.com
> GPG public key: http://www.gods.nl/~forge/kenneyw.key
>
> ---------------------------------------------------------------------
> 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] "reporting" element of profiles not merged?

Posted by fa...@mpsa.com.



OK, http://jira.codehaus.org/browse/MNG-1112 for those interested.

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                    
             06/10/2005 11:16          <us...@maven.apache.org>            
                                                                        cc 
                                                                           
                 Veuillez                                            Objet 
                répondre à             Re: [M2] "reporting" element of     
             Maven Users List          profiles not merged?                
             <users@maven.apa                                              
                 che.org>                                                  
                                                                           
                                                                           
                                                                           
                                                                           




Yes, looks like a bug.

- Brett

On 10/6/05, fabrice.belingard@mpsa.com <fa...@mpsa.com> wrote:
>
>
>
>
> Hi all,
>
> I'm playing a bit with profiles, and it seems to me that report plugins
> listed in a profile are not added to the list of reports when the profile
> is activated. That is, it seems that when a profile is activated, its
> "reporting" element is not merged with the "reporting" element of the
pom.
>
> For instance, try the following command with the pom given below: "m2
> site:site -Denv=TEST"
> -> you will have the JXR report generated, but not the taglist. (and you
> can check that the profile is activated though, because the "index.html"
> generated page shows "Profile Activated" instead of "${foo}" in the
> description)
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <project>
>       <modelVersion>4.0.0</modelVersion>
>       <groupId>test</groupId>
>       <artifactId>test</artifactId>
>       <packaging>jar</packaging>
>       <name>Test</name>
>       <version>1.0.0</version>
>       <description>Test project - ${foo}</description>
>       <reporting>
>             <plugins>
>                   <plugin>
>                         <groupId>org.codehaus.mojo</groupId>
>                         <artifactId>jxr-maven-plugin</artifactId>
>                         <version>2.0-beta-1</version>
>                   </plugin>
>             </plugins>
>       </reporting>
>       <profiles>
>             <profile>
>                   <id>test-site-profile</id>
>                   <activation>
>                         <property>
>                               <name>env</name>
>                               <value>TEST</value>
>                         </property>
>                   </activation>
>                   <reporting>
>                         <plugins>
>                               <plugin>
>                                     <groupId>org.codehaus.mojo</groupId>
>                                     <artifactId>taglist-maven-plugin
> </artifactId>
>                                     <version>2.0-beta-1</version>
>                               </plugin>
>                         </plugins>
>                   </reporting>
>                   <properties>
>                         <foo>Profile Activated</foo>
>                   </properties>
>             </profile>
>       </profiles>
> </project>
>
> Is this a bug? If so, I will add it to Jira.
>
>
> Best Regards / Cordialement,
> Fabrice BELLINGARD
> DINQ/DSIN/INSI/EATE/IDVS/AIDV
> (+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com
>
>
> ---------------------------------------------------------------------
> 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] "reporting" element of profiles not merged?

Posted by Brett Porter <br...@gmail.com>.
Yes, looks like a bug.

- Brett

On 10/6/05, fabrice.belingard@mpsa.com <fa...@mpsa.com> wrote:
>
>
>
>
> Hi all,
>
> I'm playing a bit with profiles, and it seems to me that report plugins
> listed in a profile are not added to the list of reports when the profile
> is activated. That is, it seems that when a profile is activated, its
> "reporting" element is not merged with the "reporting" element of the pom.
>
> For instance, try the following command with the pom given below: "m2
> site:site -Denv=TEST"
> -> you will have the JXR report generated, but not the taglist. (and you
> can check that the profile is activated though, because the "index.html"
> generated page shows "Profile Activated" instead of "${foo}" in the
> description)
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <project>
>       <modelVersion>4.0.0</modelVersion>
>       <groupId>test</groupId>
>       <artifactId>test</artifactId>
>       <packaging>jar</packaging>
>       <name>Test</name>
>       <version>1.0.0</version>
>       <description>Test project - ${foo}</description>
>       <reporting>
>             <plugins>
>                   <plugin>
>                         <groupId>org.codehaus.mojo</groupId>
>                         <artifactId>jxr-maven-plugin</artifactId>
>                         <version>2.0-beta-1</version>
>                   </plugin>
>             </plugins>
>       </reporting>
>       <profiles>
>             <profile>
>                   <id>test-site-profile</id>
>                   <activation>
>                         <property>
>                               <name>env</name>
>                               <value>TEST</value>
>                         </property>
>                   </activation>
>                   <reporting>
>                         <plugins>
>                               <plugin>
>                                     <groupId>org.codehaus.mojo</groupId>
>                                     <artifactId>taglist-maven-plugin
> </artifactId>
>                                     <version>2.0-beta-1</version>
>                               </plugin>
>                         </plugins>
>                   </reporting>
>                   <properties>
>                         <foo>Profile Activated</foo>
>                   </properties>
>             </profile>
>       </profiles>
> </project>
>
> Is this a bug? If so, I will add it to Jira.
>
>
> Best Regards / Cordialement,
> Fabrice BELLINGARD
> DINQ/DSIN/INSI/EATE/IDVS/AIDV
> (+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com
>
>
> ---------------------------------------------------------------------
> 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


[M2] "reporting" element of profiles not merged?

Posted by fa...@mpsa.com.



Hi all,

I'm playing a bit with profiles, and it seems to me that report plugins
listed in a profile are not added to the list of reports when the profile
is activated. That is, it seems that when a profile is activated, its
"reporting" element is not merged with the "reporting" element of the pom.

For instance, try the following command with the pom given below: "m2
site:site -Denv=TEST"
-> you will have the JXR report generated, but not the taglist. (and you
can check that the profile is activated though, because the "index.html"
generated page shows "Profile Activated" instead of "${foo}" in the
description)

<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
      <modelVersion>4.0.0</modelVersion>
      <groupId>test</groupId>
      <artifactId>test</artifactId>
      <packaging>jar</packaging>
      <name>Test</name>
      <version>1.0.0</version>
      <description>Test project - ${foo}</description>
      <reporting>
            <plugins>
                  <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>jxr-maven-plugin</artifactId>
                        <version>2.0-beta-1</version>
                  </plugin>
            </plugins>
      </reporting>
      <profiles>
            <profile>
                  <id>test-site-profile</id>
                  <activation>
                        <property>
                              <name>env</name>
                              <value>TEST</value>
                        </property>
                  </activation>
                  <reporting>
                        <plugins>
                              <plugin>
                                    <groupId>org.codehaus.mojo</groupId>
                                    <artifactId>taglist-maven-plugin
</artifactId>
                                    <version>2.0-beta-1</version>
                              </plugin>
                        </plugins>
                  </reporting>
                  <properties>
                        <foo>Profile Activated</foo>
                  </properties>
            </profile>
      </profiles>
</project>

Is this a bug? If so, I will add it to Jira.


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


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


Réf. : Re: [M2] How to use "relativePath" of in a pom?

Posted by fa...@mpsa.com.



> And if you check out the EAR in isolation, how should it behave? Break?
"Check out the EAR in isolation"? What do you mean? Check out from SCM? If
so, I don't see troubles with this case... Well, I guess you have a broader
view of those issues :o)
As for me (and as for now), I experience that the <extend> of M1 pom was
really handy, and I can't do that with M2. Hope I'm just missing some
details.

> It's an option, but one that has burned many a Maven 1 user. is there
> a reason you can't enter the groupId/artifactId as well/instead?

Actually, specifying only groupId and artifactId would be fine, for they
never change during the development lifecycle. But version changes often,
and version is mandatory in children as well, isn't it? ("Missing version
element from parent element") And this is my concern: I don't wanna change
the version in every pom but only in one place, like it used to be in M1.



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                    
             29/09/2005 16:02          <us...@maven.apache.org>            
                                                                        cc 
                                                                           
                 Veuillez                                            Objet 
                répondre à             Re: [M2] How to use "relativePath"  
             Maven Users List          of <parent> in a pom?               
             <users@maven.apa                                              
                 che.org>                                                  
                                                                           
                                                                           
                                                                           
                                                                           




And if you check out the EAR in isolation, how should it behave? Break?

It's an option, but one that has burned many a Maven 1 user. is there
a reason you can't enter the groupId/artifactId as well/instead?

- Brett

On 9/29/05, fabrice.belingard@mpsa.com <fa...@mpsa.com> wrote:
>
>
>
>
> Right, thanks for your answer Kenney!
> However, this is definitely not handy when you have a multi-module
project
> (for instance when you build an Ear). When your parent is part of the
same
> build process (using built-in reactor) and on the same file system, using
> only "relativePath" would be far more handy. And when installing or
> deploying the artifacts, this "relativePath" could be replaced by the
real
> artifactId/groupId/version values of the parent (which would make you pom
> stand-alone).
>
> I've just seen there's an issue concerning this topic
> (http://jira.codehaus.org/browse/MNG-624), but it targets version 2.1...
> :o(
>
> Best Regards / Cordialement,
> Fabrice BELLINGARD
> DINQ/DSIN/INSI/EATE/IDVS/AIDV
> (+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com
>
>
>
>              Kenney Westerhof
>              <kenney@apache.o
>              rg>
Pour
>                                        Maven Users List
>              29/09/2005 15:28          <us...@maven.apache.org>
>
cc
>
>                  Veuillez
Objet
>                 répondre à             Re: [M2] How to use "relativePath"
>              Maven Users List          of <parent>  in a pom?
>              <users@maven.apa
>                  che.org>
>
>
>
>
>
>
>
>
> On Thu, 29 Sep 2005 fabrice.belingard@mpsa.com wrote:
>
> Hi,
>
> > Hi,
> >
> > I've seen that there's a "relativePath" attribute for the "parent"
> element
> > of the pom. According to the documentation, this is "the relative path
of
> > the parent-pom within the project hierarchy". If this property exists,
I
> > guess this allows to discover the parent pom without specifying the
> > version, the artifactId and the groupId of the parent, which would be
> > _very_ handy. However, I get the following error when launching maven:
> > "Missing groupId element from parent element".
> >
> > So my question is: is this property working? I guess no:
> > http://jira.codehaus.org/browse/MNG-1012 (which hasn't been assigned
yet)
> > But maybe this doesn't work this way. So my second question is: how
does
> > this property work?
>
> I'm not entirely up-to-speed on this new feature, but AFAIK the
> artifactId and groupId are mandatory in a <parent> element (version too
> IIRC).
> POMs should be able to be used stand-alone. A client that uses your pom
> wouldn't know where to look for that parent pom, since the directory
> structure on ibiblio is not quite the same as the project tree structure.
>
> Before this attribute was in, m2 always checked ../pom.xml to see if it
> matched the declared parent. If so, it used that (and the data in
> target/*) instead of going to your local/remote repositories for the pom.
> I guess this attribute is just an extension to that, so you can specify
> other locations for your parent project than ../.
>
> Other m2 devs - jump in if this is incorrect!
>
> -- Kenney
>
> > Thanks in advance for your answers!
> >
> > Best Regards / Cordialement,
> > Fabrice BELLINGARD
> > DINQ/DSIN/INSI/EATE/IDVS/AIDV
> > (+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
> --
> Kenney Westerhof
> http://www.neonics.com
> GPG public key: http://www.gods.nl/~forge/kenneyw.key
>
> ---------------------------------------------------------------------
> 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: [ann] Maven 2.0 Beta 3 Released

Posted by fa...@mpsa.com.



> The Apache Maven team are proud to announce the  third beta release
> of Maven 2.0.

Wouah, the new CSS is cool! :o)

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


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


Re: [M2] How to use "relativePath" of in a pom?

Posted by Brett Porter <br...@gmail.com>.
And if you check out the EAR in isolation, how should it behave? Break?

It's an option, but one that has burned many a Maven 1 user. is there
a reason you can't enter the groupId/artifactId as well/instead?

- Brett

On 9/29/05, fabrice.belingard@mpsa.com <fa...@mpsa.com> wrote:
>
>
>
>
> Right, thanks for your answer Kenney!
> However, this is definitely not handy when you have a multi-module project
> (for instance when you build an Ear). When your parent is part of the same
> build process (using built-in reactor) and on the same file system, using
> only "relativePath" would be far more handy. And when installing or
> deploying the artifacts, this "relativePath" could be replaced by the real
> artifactId/groupId/version values of the parent (which would make you pom
> stand-alone).
>
> I've just seen there's an issue concerning this topic
> (http://jira.codehaus.org/browse/MNG-624), but it targets version 2.1...
> :o(
>
> Best Regards / Cordialement,
> Fabrice BELLINGARD
> DINQ/DSIN/INSI/EATE/IDVS/AIDV
> (+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com
>
>
>
>              Kenney Westerhof
>              <kenney@apache.o
>              rg>                                                      Pour
>                                        Maven Users List
>              29/09/2005 15:28          <us...@maven.apache.org>
>                                                                         cc
>
>                  Veuillez                                            Objet
>                 répondre à             Re: [M2] How to use "relativePath"
>              Maven Users List          of <parent>  in a pom?
>              <users@maven.apa
>                  che.org>
>
>
>
>
>
>
>
>
> On Thu, 29 Sep 2005 fabrice.belingard@mpsa.com wrote:
>
> Hi,
>
> > Hi,
> >
> > I've seen that there's a "relativePath" attribute for the "parent"
> element
> > of the pom. According to the documentation, this is "the relative path of
> > the parent-pom within the project hierarchy". If this property exists, I
> > guess this allows to discover the parent pom without specifying the
> > version, the artifactId and the groupId of the parent, which would be
> > _very_ handy. However, I get the following error when launching maven:
> > "Missing groupId element from parent element".
> >
> > So my question is: is this property working? I guess no:
> > http://jira.codehaus.org/browse/MNG-1012 (which hasn't been assigned yet)
> > But maybe this doesn't work this way. So my second question is: how does
> > this property work?
>
> I'm not entirely up-to-speed on this new feature, but AFAIK the
> artifactId and groupId are mandatory in a <parent> element (version too
> IIRC).
> POMs should be able to be used stand-alone. A client that uses your pom
> wouldn't know where to look for that parent pom, since the directory
> structure on ibiblio is not quite the same as the project tree structure.
>
> Before this attribute was in, m2 always checked ../pom.xml to see if it
> matched the declared parent. If so, it used that (and the data in
> target/*) instead of going to your local/remote repositories for the pom.
> I guess this attribute is just an extension to that, so you can specify
> other locations for your parent project than ../.
>
> Other m2 devs - jump in if this is incorrect!
>
> -- Kenney
>
> > Thanks in advance for your answers!
> >
> > Best Regards / Cordialement,
> > Fabrice BELLINGARD
> > DINQ/DSIN/INSI/EATE/IDVS/AIDV
> > (+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
> --
> Kenney Westerhof
> http://www.neonics.com
> GPG public key: http://www.gods.nl/~forge/kenneyw.key
>
> ---------------------------------------------------------------------
> 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] How to use "relativePath" of in a pom?

Posted by fa...@mpsa.com.



Right, thanks for your answer Kenney!
However, this is definitely not handy when you have a multi-module project
(for instance when you build an Ear). When your parent is part of the same
build process (using built-in reactor) and on the same file system, using
only "relativePath" would be far more handy. And when installing or
deploying the artifacts, this "relativePath" could be replaced by the real
artifactId/groupId/version values of the parent (which would make you pom
stand-alone).

I've just seen there's an issue concerning this topic
(http://jira.codehaus.org/browse/MNG-624), but it targets version 2.1...
:o(

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


                                                                           
             Kenney Westerhof                                              
             <kenney@apache.o                                              
             rg>                                                      Pour 
                                       Maven Users List                    
             29/09/2005 15:28          <us...@maven.apache.org>            
                                                                        cc 
                                                                           
                 Veuillez                                            Objet 
                répondre à             Re: [M2] How to use "relativePath"  
             Maven Users List          of <parent>  in a pom?              
             <users@maven.apa                                              
                 che.org>                                                  
                                                                           
                                                                           
                                                                           
                                                                           




On Thu, 29 Sep 2005 fabrice.belingard@mpsa.com wrote:

Hi,

> Hi,
>
> I've seen that there's a "relativePath" attribute for the "parent"
element
> of the pom. According to the documentation, this is "the relative path of
> the parent-pom within the project hierarchy". If this property exists, I
> guess this allows to discover the parent pom without specifying the
> version, the artifactId and the groupId of the parent, which would be
> _very_ handy. However, I get the following error when launching maven:
> "Missing groupId element from parent element".
>
> So my question is: is this property working? I guess no:
> http://jira.codehaus.org/browse/MNG-1012 (which hasn't been assigned yet)
> But maybe this doesn't work this way. So my second question is: how does
> this property work?

I'm not entirely up-to-speed on this new feature, but AFAIK the
artifactId and groupId are mandatory in a <parent> element (version too
IIRC).
POMs should be able to be used stand-alone. A client that uses your pom
wouldn't know where to look for that parent pom, since the directory
structure on ibiblio is not quite the same as the project tree structure.

Before this attribute was in, m2 always checked ../pom.xml to see if it
matched the declared parent. If so, it used that (and the data in
target/*) instead of going to your local/remote repositories for the pom.
I guess this attribute is just an extension to that, so you can specify
other locations for your parent project than ../.

Other m2 devs - jump in if this is incorrect!

-- Kenney

> Thanks in advance for your answers!
>
> Best Regards / Cordialement,
> Fabrice BELLINGARD
> DINQ/DSIN/INSI/EATE/IDVS/AIDV
> (+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

---------------------------------------------------------------------
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] How to use "relativePath" of in a pom?

Posted by Kenney Westerhof <ke...@apache.org>.
On Thu, 29 Sep 2005 fabrice.belingard@mpsa.com wrote:

Hi,

> Hi,
>
> I've seen that there's a "relativePath" attribute for the "parent" element
> of the pom. According to the documentation, this is "the relative path of
> the parent-pom within the project hierarchy". If this property exists, I
> guess this allows to discover the parent pom without specifying the
> version, the artifactId and the groupId of the parent, which would be
> _very_ handy. However, I get the following error when launching maven:
> "Missing groupId element from parent element".
>
> So my question is: is this property working? I guess no:
> http://jira.codehaus.org/browse/MNG-1012 (which hasn't been assigned yet)
> But maybe this doesn't work this way. So my second question is: how does
> this property work?

I'm not entirely up-to-speed on this new feature, but AFAIK the
artifactId and groupId are mandatory in a <parent> element (version too
IIRC).
POMs should be able to be used stand-alone. A client that uses your pom
wouldn't know where to look for that parent pom, since the directory
structure on ibiblio is not quite the same as the project tree structure.

Before this attribute was in, m2 always checked ../pom.xml to see if it
matched the declared parent. If so, it used that (and the data in
target/*) instead of going to your local/remote repositories for the pom.
I guess this attribute is just an extension to that, so you can specify
other locations for your parent project than ../.

Other m2 devs - jump in if this is incorrect!

-- Kenney

> Thanks in advance for your answers!
>
> Best Regards / Cordialement,
> Fabrice BELLINGARD
> DINQ/DSIN/INSI/EATE/IDVS/AIDV
> (+33) (01 61) 45 15 91  -  fabrice.belingard@mpsa.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

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