You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by javed mandary <ja...@gmail.com> on 2006/04/25 12:48:01 UTC

Getting root parent POM artifactid

Hi,
    is there any properties value that returns the top Parent POM's artifact
id and version number.

Say i have a structure as follows:

root POM
  |
  |----------module A POM
  |
  |---------module B POM
                        |
                        |------------------module C POM



Is there a way to retrieve the artifactId and version number of top root POM
from module C POM ?

cheers,
        Javed

Re: Getting root parent POM artifactid

Posted by Bogdan Sulima <ps...@googlemail.com>.
${pom.parent.parent.artifactId} and ${pom.parent.parent.version}

this should work with the specified hierarchy.
but if "C POM" does not have 2 parent poms, but just 1 or even 0, your
script fails with NullPointerException.




On 4/25/06, javed mandary <ja...@gmail.com> wrote:
> Hi,
>     is there any properties value that returns the top Parent POM's artifact
> id and version number.
>
> Say i have a structure as follows:
>
> root POM
>   |
>   |----------module A POM
>   |
>   |---------module B POM
>                         |
>                         |------------------module C POM
>
>
>
> Is there a way to retrieve the artifactId and version number of top root POM
> from module C POM ?
>
> cheers,
>         Javed
>
>

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