Re: Is there a property for parent directory?

2007-10-10 Thread Peter Niederwieser

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, [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
 Web: www.cfc.at
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Is there a property for parent directory?

2007-09-11 Thread Huang, Yan
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]



Re: Is there a property for parent directory?

2007-09-11 Thread Roland Asmann
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]



Re: Is there a property for parent directory?

2007-09-11 Thread robert . egan
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 [EMAIL PROTECTED] 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.



Re: Is there a property for parent directory?

2007-09-11 Thread Roland Asmann
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, [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
Web: www.cfc.at

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Is there a property for parent directory?

2007-09-11 Thread Huang, Yan
${parent.basedir} is not working for me ... I used antrun to try to echo it out 
and it seems that it's not defined ..

-Original Message-
From: Roland Asmann [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 11, 2007 3:50 AM
To: Maven Users List
Subject: Re: Is there a property for parent directory?

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]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Is there a property for parent directory?

2007-09-10 Thread Huang, Yan
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]



Re: Is there a property for parent directory?

2007-09-10 Thread Wayne Fay
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]