You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Jochen Wiedmann <jo...@gmail.com> on 2005/09/02 05:52:46 UTC
How to add a plugins classes to the classpath?
Hi,
I am working on an enhanced version of the maven-jdepend-plugin. The
plugin currently contains the following code:
<ant:java classname="jdepend.xmlui.JDepend"
fork="true" failonerror="true">
<ant:arg line="-file '${maven.build.dir}/jdepend-raw-report.xml'
'${maven.build.dest}'"/>
<ant:classpath>
<ant:path refid="maven-classpath"/>
<ant:path refid="maven.dependency.classpath"/>
<ant:pathelement path="${plugin.getDependencyPath('jdepend')}"/>
</ant:classpath>
</ant:java>
For several reasons, I would replace the actual JDepend class with a
wrapper class (org.apache.maven.plugins.jdepend.Runner), which would
support additional options and the like. Getting that class into
maven-depend-plugin.jar is straightforward. However, the class is not
found, when the plugin is executed.
How do I need to change the above example for adding the plugins jar
file into the classpath?
Regards,
Jochen
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: How to add a plugins classes to the classpath?
Posted by "Nacho G. Mac Dowell" <ig...@informa.es>.
Hi Jochen,
I think that you could solve that this way:
if your sources are on your main directory of the plugin, try using
<ant:pathelement location="${plugin.dir}"/>. If they are in a
subdirectory then follow the path from there.
best regards,
nacho
Jochen Wiedmann wrote:
>
> Hi,
>
> I am working on an enhanced version of the maven-jdepend-plugin. The
> plugin currently contains the following code:
>
> <ant:java classname="jdepend.xmlui.JDepend"
> fork="true" failonerror="true">
> <ant:arg line="-file '${maven.build.dir}/jdepend-raw-report.xml'
> '${maven.build.dest}'"/>
> <ant:classpath>
> <ant:path refid="maven-classpath"/>
> <ant:path refid="maven.dependency.classpath"/>
> <ant:pathelement path="${plugin.getDependencyPath('jdepend')}"/>
> </ant:classpath>
> </ant:java>
>
> For several reasons, I would replace the actual JDepend class with a
> wrapper class (org.apache.maven.plugins.jdepend.Runner), which would
> support additional options and the like. Getting that class into
> maven-depend-plugin.jar is straightforward. However, the class is not
> found, when the plugin is executed.
>
> How do I need to change the above example for adding the plugins jar
> file into the classpath?
>
>
> Regards,
>
> Jochen
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org