I understand the backwards compatibility issues. Unfortunately,
I'm experimenting with an unconventional (and deep) directory
hierarchy and am forced to use something like
<directory>../../../../../target/bin</directory>
I was hoping to clean things up a bit.
I had posted a question earlier about using
${project.parent.relativePath}
for the same reason, but it resolves literally to "../pom.xml",
which seems odd for two reasons:
+ A path is not a file.
+ The <relativePath> element is specifically for those
unconventionally nested arrangements where projects
don't map directly onto the filesystem. There's an
incorrect assumption being made that a parent project
lies directly above a sub-project.
Brad
-----Original Message-----
From: dan tran [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 22, 2006 9:46 AM
To: Maven Users List
Subject: Re: Evaluation of ${basedir} in an Expression
That is the expected behavior, even thou it seems odd, and i hope it stays
that way.
Fixing this will break lots of builds, mine for sure.
<build>
<directory>../target/bin</directory>
...
</build>
should work for B. Again it is a little odd since you are forced to
hardcoded the target/bin
-D
On 6/22/06, Brad Harper <[EMAIL PROTECTED]> wrote:
>
> Am I misreading the process by which expressions are evaluated?
>
> Consider project A with pom.xml containing
>
> <properties>
> <target.binary.dir>${basedir}/target/bin</target.binary.dir>
> </properties>
>
> and A's sub-project B with pom.xml containing
>
> <build>
> <directory>${target.binary.dir}</directory>
> ...
> </build>
>
> Given Table A-6 from "Better Builds with Maven",
> [ http://www.mergere.com/m2book_download.jsp ], the description
> for ${basedir} says
>
> The current project's root directory.
>
> The result shows that ${basedir} is being evaluated for B, and not A,
> where the expression appears.
>
> Brad
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> 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]