You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mikael Lundgren <mi...@leanon.se> on 2003/12/01 16:06:55 UTC
Ant classpath and Maven repository
Hi,
yet again what seems to be a simple query but for which I can't find the
answer...
I'm trying to create a maven.xml goal that uses functionality that
exists in a maven plugin (but which isn't exploited). I did manage to
change the actual plugin (ie the plugin.jelly file) to alter the
behaviour in the way I wanted, but changing the plugin like that is not
what I had in mind.
In the maven.xml file however I can't seem to understand how I can build
a classpath to the jars that are necessary. The only thing I can come up
with is adding the plugins i'm interested in to the dependencies in the
pom... which obvioulsy is't what I intended (this would be done by using
something along the lines of pom.getDependencyPath(...)).
Oh, btw... I'm trying to add a simple CPD report to my project from the
PMD plugin... So if anyone already did this... well... I'd be interested ;-)
So, basically what I'm asking is: how do I create a classpath to a
plugin (or repository) jar from within maven.xml?
Thanks
/Mikael Lundgren
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Ant classpath and Maven repository
Posted by di...@multitask.com.au.
What's not possible?
--
dIon Gillard, Multitask Consulting
Blog: http://blogs.codehaus.org/people/dion/
Mikael Lundgren <mi...@leanon.se> wrote on 02/12/2003 05:49:43
AM:
> From reading the sources it would seem that what i wanted to achieve
> isn't really possible.
>
> So... i wrote my own very first maven plugin instead. It is totally
> unsofisticated and only barely does what I wanted it to... but hey,
> small steps.
>
> Cheers!
>
> /Mikael Lundgren
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Ant classpath and Maven repository
Posted by Mikael Lundgren <mi...@leanon.se>.
From reading the sources it would seem that what i wanted to achieve
isn't really possible.
So... i wrote my own very first maven plugin instead. It is totally
unsofisticated and only barely does what I wanted it to... but hey,
small steps.
Cheers!
/Mikael Lundgren
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Ant classpath and Maven repository
Posted by di...@multitask.com.au.
Why not just tailor the pmd plugin using properties?
Here's a snippet from one of our project.properties files:
maven.pmd.rulesetfiles=${basedir}/../GeneralCommon/pmd.xml,\
rulesets/basic.xml,\
rulesets/unusedcode.xml,\
rulesets/imports.xml,\
rulesets/codesize.xml,\
rulesets/coupling.xml,\
rulesets/design.xml,\
rulesets/strings.xml
Note the first entry is a file for our customising of pmd and has this in
it:
<?xml version="1.0"?>
<ruleset name="Hidden">
<description>
The Favorites ruleset contains links to rules that I like to use. Usually
I
combine this ruleset with the unusedcode.xml, basic.xml, and import.xml
rulesets for my projects.
This ruleset also serves as an example of do a custom ruleset.
</description>
<rule ref="rulesets/controversial.xml/UnnecessaryConstructorRule"/>
<rule ref="rulesets/controversial.xml/NullAssignment"/>
<rule ref="rulesets/controversial.xml/AssignmentInOperandRule"/>
<rule ref="rulesets/naming.xml">
<exclude name="ShortVariable"/>
<exclude name="LongVariable"/>
</rule>
</ruleset>
Does this help at all?
--
dIon Gillard, Multitask Consulting
Blog: http://blogs.codehaus.org/people/dion/
Mikael Lundgren <mi...@leanon.se> wrote on 03/12/2003 09:18:03
AM:
> Well, that's what I ended up doing, only I created my own plugin from
> the PMD plugin, that way if there are updates to the PMD plugin won't
> affect my changes.
>
> Anyway it was a good experience learning how easy it really is to create
> a plugin for Maven.
>
> I guess that what I need is to truly understand how Jelly works.
>
> /Mikael
>
> dion@multitask.com.au wrote:
>
> > Can't you just use and tailor the PMD plugin?
> >
> > That's what I do.
> > --
> > dIon Gillard, Multitask Consulting
> > Blog: http://blogs.codehaus.org/people/dion/
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Ant classpath and Maven repository
Posted by Mikael Lundgren <mi...@leanon.se>.
Well, that's what I ended up doing, only I created my own plugin from
the PMD plugin, that way if there are updates to the PMD plugin won't
affect my changes.
Anyway it was a good experience learning how easy it really is to create
a plugin for Maven.
I guess that what I need is to truly understand how Jelly works.
/Mikael
dion@multitask.com.au wrote:
> Can't you just use and tailor the PMD plugin?
>
> That's what I do.
> --
> dIon Gillard, Multitask Consulting
> Blog: http://blogs.codehaus.org/people/dion/
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Ant classpath and Maven repository
Posted by di...@multitask.com.au.
Can't you just use and tailor the PMD plugin?
That's what I do.
--
dIon Gillard, Multitask Consulting
Blog: http://blogs.codehaus.org/people/dion/
Mikael Lundgren <mi...@leanon.se> wrote on 02/12/2003 02:06:55
AM:
> Hi,
>
> yet again what seems to be a simple query but for which I can't find the
> answer...
>
> I'm trying to create a maven.xml goal that uses functionality that
> exists in a maven plugin (but which isn't exploited). I did manage to
> change the actual plugin (ie the plugin.jelly file) to alter the
> behaviour in the way I wanted, but changing the plugin like that is not
> what I had in mind.
>
> In the maven.xml file however I can't seem to understand how I can build
> a classpath to the jars that are necessary. The only thing I can come up
> with is adding the plugins i'm interested in to the dependencies in the
> pom... which obvioulsy is't what I intended (this would be done by using
> something along the lines of pom.getDependencyPath(...)).
>
> Oh, btw... I'm trying to add a simple CPD report to my project from the
> PMD plugin... So if anyone already did this... well... I'd be interested
;-)
>
> So, basically what I'm asking is: how do I create a classpath to a
> plugin (or repository) jar from within maven.xml?
>
> Thanks
> /Mikael Lundgren
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org