You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Peter Niederwieser <pn...@gmail.com> on 2007/10/10 18:36:27 UTC
Re: Is there a property for parent directory?
Judging from a few experiments I did, ${parent} doesn't reference the parent
POM; rather, it references the <parent> element of the current POM. That's
why ${parent.basedir} doesn't work.
I hoped I could write something like <url>${parent.url}/subproject</url>,
but it seems I have to specify the full path every time.
Cheers
Peter
MALICE wrote:
>
> Yes it is.
> ${parent} gives you a 'pom', on which you can access all properties that
> you
> can access directly (e.g. 'groupId', 'artifactId', 'version',
> 'packaging').
>
>
> On Tuesday 11 September 2007 13:17, robert.egan@aciworldwide.com wrote:
>> Is this ${parent} property generally available, i.e.
>> ${parent.artifactId},
>> etc....
>>
>> It would help me refactor a number of places where I use something
>> similar
>> to this in a parent POM
>>
>> <properties>
>> <super.artifactId>${artifactId}<super.artifactId>
>> </properties>
>>
>> Roland Asmann <Ro...@cfc.at> wrote on 09/11/2007 06:49:55 AM:
>> > Yes there is: ${parent.basedir} should be the one you need....
>> > Be carefull though, if your child-project are deeper than one level,
>> you
>> >
>> > should use ${parent.parent.basedir} (and so on).
>> >
>> > Isn't it possible for you to make a dependency of some kind to the
>> > tools-project? Or build your tools as maven-plugins, that way you won't
>>
>> need
>>
>> > the variables!
>> >
>> > [snipped discussion of why...]
>>
>> This email message and any attachments may contain confidential,
>> proprietary or non-public information. The information is intended
>> solely
>> for the designated recipient(s). If an addressing or transmission error
>> has misdirected this email, please notify the sender immediately and
>> destroy this email. Any review, dissemination, use or reliance upon this
>> information by unintended recipients is prohibited. Any opinions
>> expressed in this email are those of the author personally.
>
> --
> Roland Asmann
>
> CFC Informationssysteme Entwicklungsgesellschaft m.b.H
> Bäckerstrasse 1/2/7
> A-1010 Wien
> FN 266155f, Handelsgericht Wien
>
> Tel.: +43/1/513 88 77 - 27
> Fax.: +43/1/513 88 62
> Email: Roland.Asmann@cfc.at
> Web: www.cfc.at
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Is-there-a-property-for-parent-directory--tf4419146s177.html#a13139517
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org