You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Gilles Scokart <gs...@hotmail.com> on 2005/08/29 15:46:55 UTC
[m2] Use variables in configuration of a plug in
I have tried to use ${project.compileClasspathElements} into the
configuration tag of a plugin (antrun), and it seems to work.
But when I use ${project.runtimeClasspathElements}, I only have the same
result. The pure runtime dependencies are not present in the list.
Is it a general behaviour that can be used in any plugin or is it specific
to antrun ?
Where can we found the list of defined variables ?
Why is the project.runtimeClasspathElements not set correctly? Is it a bug?
Did I made something wrong?
Thanks,
Gilles Scokart
_________________________________________________________________
Créez gratuitement votre espace perso en ligne avec MSN Spaces !
http://spaces.msn.com/?mkt=fr-be
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Use variables in configuration of a plug in
Posted by Kenney Westerhof <fo...@neonics.com>.
On Mon, 29 Aug 2005, Gilles Scokart wrote:
Hi Gilles,
Lucky for you I can reproduce this :)
You want to use 'runtime' dependencies in the generate-test-resources
phase, but they are not resolved there yet (the velocity-dep dependency).
I'm not sure but you could try specifying 'test' as a scope, but I think
that's only used for tests at runtime. If you change it to 'compile'
(we need a 'test-compile' scope maybe..?) it should work..
Although it's weird that getRuntimeClasspathElements returns the same
as getCompileClasspathElements when the 'runtime' scope hasn't been
resolved yet.
Comments from other m2 developers?
-- Kenney
>
> > > I have tried to use ${project.compileClasspathElements} into the
> > > configuration tag of a plugin (antrun), and it seems to work.
> >
> >How did you use it? Could you post the pom.xml?
>
> I will try to clean it a little bit, then I will post it here.
>
> >
> > > But when I use ${project.runtimeClasspathElements}, I only have the same
> > > result. The pure runtime dependencies are not present in the list.
> >
> >That's because all compile time dependencies are also runtime
> >dependencies. See
> >http://maven.apache.org/maven2/dependency-mechanism.html#dependency_scope
> >
>
> Yes, but runtime class path should contain more. It should contain the
> compile + pure runtime dependencies.
>
> > > Is it a general behaviour that can be used in any plugin or is it
> >specific
> > > to antrun ?
> >
> >It's general behaviour.
>
> Does it mean that we can use $project.xxx in the configuration of other
> plugin. Is there other variable than $project. For instance, I have tried
> (unsuccessfully) to found a varaible that map to the local repository.
>
> >I'm really curious how you intend to use this.. AFAIK it'll return
> >something like "[/path/to/a.jar,/path/to/b.jar]".
>
> That's exactly what I receive. I use it because I have a project that build
> an ant task, and I want to test this ant task by executing it from the pom,
> in the testing phase.
> I use this value, to set a classpath. I use a series of echo and relplace
> to format it correctly.
>
> _________________________________________________________________
> Créez gratuitement votre espace perso en ligne avec MSN Spaces !
> http://spaces.msn.com/?mkt=fr-be
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Use variables in configuration of a plug in
Posted by Gilles Scokart <gs...@hotmail.com>.
> > I have tried to use ${project.compileClasspathElements} into the
> > configuration tag of a plugin (antrun), and it seems to work.
>
>How did you use it? Could you post the pom.xml?
I will try to clean it a little bit, then I will post it here.
>
> > But when I use ${project.runtimeClasspathElements}, I only have the same
> > result. The pure runtime dependencies are not present in the list.
>
>That's because all compile time dependencies are also runtime
>dependencies. See
>http://maven.apache.org/maven2/dependency-mechanism.html#dependency_scope
>
Yes, but runtime class path should contain more. It should contain the
compile + pure runtime dependencies.
> > Is it a general behaviour that can be used in any plugin or is it
>specific
> > to antrun ?
>
>It's general behaviour.
Does it mean that we can use $project.xxx in the configuration of other
plugin. Is there other variable than $project. For instance, I have tried
(unsuccessfully) to found a varaible that map to the local repository.
>I'm really curious how you intend to use this.. AFAIK it'll return
>something like "[/path/to/a.jar,/path/to/b.jar]".
That's exactly what I receive. I use it because I have a project that build
an ant task, and I want to test this ant task by executing it from the pom,
in the testing phase.
I use this value, to set a classpath. I use a series of echo and relplace
to format it correctly.
_________________________________________________________________
Créez gratuitement votre espace perso en ligne avec MSN Spaces !
http://spaces.msn.com/?mkt=fr-be
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Use variables in configuration of a plug in
Posted by Kenney Westerhof <fo...@neonics.com>.
On Mon, 29 Aug 2005, Gilles Scokart wrote:
Hi Gilles,
> I have tried to use ${project.compileClasspathElements} into the
> configuration tag of a plugin (antrun), and it seems to work.
How did you use it? Could you post the pom.xml?
> But when I use ${project.runtimeClasspathElements}, I only have the same
> result. The pure runtime dependencies are not present in the list.
That's because all compile time dependencies are also runtime
dependencies. See
http://maven.apache.org/maven2/dependency-mechanism.html#dependency_scope
> Is it a general behaviour that can be used in any plugin or is it specific
> to antrun ?
It's general behaviour.
> Where can we found the list of defined variables ?
In antrun you can use ${project.*} where * is any MavenProject.java
property (get*), but you already figured that out. Other than that,
just ${basedir} is available (and your own custom defined properties,
and those ant provides by default).
> Why is the project.runtimeClasspathElements not set correctly? Is it a bug?
> Did I made something wrong?
I'm really curious how you intend to use this.. AFAIK it'll return
something like "[/path/to/a.jar,/path/to/b.jar]".
>
> Thanks,
> Gilles Scokart
>
> _________________________________________________________________
> Cr�ez gratuitement votre espace perso en ligne avec MSN Spaces !
> http://spaces.msn.com/?mkt=fr-be
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org