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! On Tuesday 11 September 2007 09:22, Huang, Yan wrote: > I have a "tools" directory under "parent" and the children projects need > to invoke commands under "tools" during the phase of code generation. I > want to provide an absolute path to that "${parent}/tools" so that each > child can invoke from there. > > Or is there other better way to solve it? is there really a ${parent} > property tag in maven? > > -----Original Message----- > From: Wayne Fay [mailto:[EMAIL PROTECTED] > Sent: Monday, September 10, 2007 6:52 PM > To: Maven Users List > Subject: Re: Is there a property for parent directory? > > Why do you need to do this? There may be a better way to do the same > thing that does not involve a ${parent} tag at all. > > Wayne > > On 9/10/07, Huang, Yan <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Is there a property or way to get parent directory in maven? Let's say > > I > > > have this structure of my projects: > > > > Parent > > > > |____ pom.xml > > |____ child project 1 > > | > > | |___ pom.xml > > | > > |____ child project 2 > > | > > |___ pom.xml > > > > Child project 1 and project 2 will inherit from parent 1. Now, when > > building children projects, is there a property in maven that can be > > used to refer to the actual directory of parent during build time? I > > know the notation of ${basedir}/../ might work in most cases, but what > > if child project is in another level down, i.e. > > > > Parent > > > > |____ pom.xml > > |____ children folder 1 > > | > > | |___ child project 1 > > | | > > | | |___ pom.xml > > | | > > | |___ child project 2 > > | | > > | |___ pom.xml > > | > > |____ child project 3 > > | > > |___ pom.xml > > > > Thanks > > Yan > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- 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: [EMAIL PROTECTED] Web: www.cfc.at --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]