On Thu, 27 Apr 2006, Edwin Punzalan wrote:
(sorry for crossposting but some devs don't follow the userlist entirely)
You can't use ${project.build.*} expressions in the <build> section
under some circumstances. I tested with project.build.directory and
project.build.outputDirectory (even in a <resource><directory> section) -
you might even get recursion
when specifying <build><directory>${project.build.directory} :)
${project.version} works though.
I think this is a bug but I'm not sure if this can/will be fixed..
Officially you should only be able to use such an expression after
the tag in the <build> section you refer to is itself
interpolated/resolved.
For instance, in the <build> section the resources are specified first,
then the directory (target/), then finalName etc.
If you use the value of the <build><directory> before it's defined (like
in a resources section), it should fail. Although sourceDirectory is
specified afterwards, so it _should_ work (but doesn't).
The interpolation process is not done in this order though, and I'm not
sure why ${project.build.*} doesn't work and ${project.version} does.
There's some room for improvement here.
-- Kenney
>
> I think interpolation is done before the super-pom is used. So when mvn
> is interpolating your pom, there is no default value set for
> project.build.directory yet.
>
> Maybe you can try adding a <build><directory> value in your pom ???
>
> Anyway, your project is a bit odd. Usually, checked out sources should
> also have a pom that goes with the source.
>
>
> ^_^
>
>
>
> dan tran wrote:
> > Hello all,
> >
> > I have a need to use maven-scm to fetch and place an external source
> > to somewhere inside target directory at generate-sources phase ( this
> > works fine with maven-scm-plugin) and point my build.sourceDirectory to
> > the new location, but maven does not seems to be able to interpolate it.
> > ( in all maven 2 versions) Here is my test pom.
> >
> >
> > <project>
> > <modelVersion>4.0.0</modelVersion>
> >
> > <groupId>test</groupId>
> > <artifactId>test</artifactId>
> > <version>1.0-SNAPSHOT</version>
> > <packaging>jar</packaging>
> > <name>Test</name>
> >
> > <build>
> > <sourceDirectory>${project.build.directory}/checkout</sourceDirectory>
> > </build>
> >
> > </project>
> >
> > mvn -X compile shows
> >
> > [DEBUG] (f) basedir = C:\Documents and Settings\dtran\tmp
> > [DEBUG] (f) buildDirectory = C:\Documents and Settings\dtran\tmp\target
> > [DEBUG] (f) classpathElements = [C:\Documents and
> > Settings\dtran\tmp\target\cl
> > asses]
> > [DEBUG] (f) compileSourceRoots = [C:\Documents and
> > Settings\dtran\tmp\${projec
> > t.build.directory}\checkout]
> >
> > ....
> >
> > is it a bug?
> >
> > -D
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]