Great timing.  I was just having the same problem.  However, should the
checkstyle plugin simply pickup the project dependencies?  That is, if I add
the jar file that contains my custom checks to a project's dependencies
list, shouldn't the checkstyle plugin find the checks?  After all, the
checkstyle plugin does use maven.dependency.classpath to setup the
checkstyle classpath.  For some reason this doesn't seem to work.  I also
tried the suggestion below, and that doesn't seem to work either.  Both
approaches result in the following failure for me:

checkstyle:report:
checkstyle:run:
    [echo] Using file:checkstyle.xml for checkstyle ...

BUILD FAILED
File......
d:\profiles\cdaniels\.maven\plugins\maven-checkstyle-plugin-2.4.1\plugin.jel
ly
Element... ant:checkstyle
Line...... 141
Column.... 63
Unable to create a Checker: cannot initialize module TreeWalker - Unable to
instantiate
mypackage.MyCheck
Total time: 4 seconds
Finished at: Tue Jun 08 15:12:42 BST 2004


> -----Original Message-----
> From: Vincent Massol [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 08, 2004 2:26 PM
> To: 'Maven Users List'
> Subject: RE: Can I change plugin dependencies locally?
>
>
> Hi Jason,
>
> Yes, there is a way (Actually, it should be nice to document it in the
> checkstyle plugin documentation):
>
> <preGoal name="checkstyle:init">
>   <ant:path id="maven.dependency.classpath.checkstyle"
>       location="${pom.getDependencyPath('mygroup:myartifact')}"/>
>   <maven:addPath id="maven.dependency.classpath"
>       refid="maven.dependency.classpath.checkstyle"/>
> </preGoal>
>
> Hope it helps,
> -Vincent
>
> > -----Original Message-----
> > From: Morris, Jason [IT] [mailto:[EMAIL PROTECTED]
> > Sent: 08 June 2004 11:11
> > To: Maven User Group (E-mail)
> > Subject: Can I change plugin dependencies locally?
> >
> > I am using Checkstyle, but I am using my own custom Checks. This means
> > Checkstyle has to run with mychecks.jar in the classpath. The only way
> I
> > can do this is to edit the project.xml for the Checkstyle plugin and
> add
> > mychecks as a dependency.
> >
> > Is there a way to do this without "hacking" the plugin itself? Can I
> > override a plugin's dependencies from Maven.xml or similar?
> >
> > Any ideas appreciated,
> >
> >     Jason
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to