You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Matthew Beermann <mb...@yahoo.com> on 2006/05/02 00:47:06 UTC
[m1] Referencing the plugin jar itself from inside plugin.jelly?
I've got a Maven 1 plugin which declares some new Ant tasks (as Java source files). What I can't seem to figure out is, when I'm doing <taskdefs> in plugin.jelly, how do I make reference to the plugin jar /itself/?
In the FAQ, I find reference to a stanza like this:
<ant:taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
<ant:classpath>
<ant:pathelement location="${plugin.getDependencyPath('checkstyle:checkstyle')}"/>
<ant:path refid="maven.dependency.classpath"/>
<ant:classpath>
</ant:taskdef>
...which is all well and good, it adds my plugin's /dependencies/ to the classpath, but it doesn't add my plugin /itself/. What's the property I want here? I tried ${plugin.jar}, ${plugin.path}, etc, but none of those is it. Is there a master reference somewhere to all of ${plugin.foobar} elements?
Thanks,
--Matthew Beermann
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
Re: [m1] Referencing the plugin jar itself from inside plugin.jelly?
Posted by Lukas Theussl <lt...@apache.org>.
What do you want to achieve? Usually you don't need to set your plugin's
classpath as Maven will do that automatically. If you want to access
another plugin's classes, you'd just add it as a dependency in your
project.xml.
HTH,
-Lukas
Matthew Beermann wrote:
> I've got a Maven 1 plugin which declares some new Ant tasks (as Java source files). What I can't seem to figure out is, when I'm doing <taskdefs> in plugin.jelly, how do I make reference to the plugin jar /itself/?
>
> In the FAQ, I find reference to a stanza like this:
>
> <ant:taskdef name="checkstyle"
> classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
> <ant:classpath>
> <ant:pathelement location="${plugin.getDependencyPath('checkstyle:checkstyle')}"/>
> <ant:path refid="maven.dependency.classpath"/>
> <ant:classpath>
> </ant:taskdef>
>
> ...which is all well and good, it adds my plugin's /dependencies/ to the classpath, but it doesn't add my plugin /itself/. What's the property I want here? I tried ${plugin.jar}, ${plugin.path}, etc, but none of those is it. Is there a master reference somewhere to all of ${plugin.foobar} elements?
>
> Thanks,
> --Matthew Beermann
>
>
> ---------------------------------
> Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org