Thanks for the help, here's what I did:

>maven plugin:download -DartifactId=maven-clover-plugin -DgroupId=clover
-Dversion=1.4

I'm assuming that the groupId is clover as I'm guessing that this
relates to the groupId dependency?  Although it doesn't make sense to me
as this is a build dependency, not a dependency in my source.  But I
can' think of anything else to put in groupId.  When I tried it with
version 1.4 it said

BUILD FAILED
File...... file:/C:/Documents and
Settings/ccabanero/.maven/plugins/maven-plugin-plugin-1.1/
Element... ant:fail
Line...... 210
Column.... 52
Unable to find plug-in
Total time: 3 seconds
Finished at: Thu Feb 05 22:52:42 PST 2004

When I try it with version=1.2 it works OK so I'm wondering if this has
something to do with the repository not having the latest plug-in?

Needless to say, to someone new to Maven, I wish there were better
documentation on this.  ;-)  As a former Ant user it never occurred to
me that I would download a plug in.  Very cool feature, of course, but
by browsing the site it would be appear to an Ant user that you would
download the jar file from the plug-in project site and install it, just
like installing a jar in the lib directory of Ant.

Incidentally, the whole reason I'm trying to upgrade the plug-in is
because I'm having problems with Clover.  When I run my tests over and
over the coverage results differ.  Sometimes it says I'm not executing
any code in a class being tested even through clearly the tests are
running and coverage should be really high for that class.  I've been
using Clover a lot with Ant and haven't seen these problems before.  I'm
hoping that by getting the latest maven-clover-plugin I can get a later
version of the clover.jar or tell the maven-clover-plugin to point to my
personalized clover.jar file.

So, I since I can't get the plugin:download to work what I did was
delete the old plugin and manually install clover-plugin-1.4.  It
appeared to correctly download version 1.2.3 of clover.jar but I got
this (by running '>maven clover -e'):

BUILD FAILED
java.lang.NoClassDefFoundError
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
ccessorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
tructorAccessorImpl.java:27)
        at
java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at junit.framework.TestSuite.createTest(TestSuite.java:135)
        at junit.framework.TestSuite.addTestMethod(TestSuite.java:114)
        at junit.framework.TestSuite.<init>(TestSuite.java:75)
        at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.<init>(JUni
tTestRunner.java:261)
        at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.<init>(JUni
tTestRunner.java:219)
        at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JUnit
Task.java:822)
        at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask
.java:556)
        at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask
.java:532)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at
org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232)
        at
org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
        at
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
        at
org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
        at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:88)
        at
org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
        at
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
        at
org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
        at
com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128)
        at com.werken.werkz.Goal.fire(Goal.java:639)
        at com.werken.werkz.Goal.attain(Goal.java:575)
        at
com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193)
        at
com.werken.werkz.jelly.AttainGoalTag.doTag(AttainGoalTag.java:134)
        at
org.apache.maven.jelly.tags.werkz.LazyAttainGoalTag.doTag(LazyAttainGoal
Tag.java:107)
        at
org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
        at
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
        at
org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
        at
com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128)
        at com.werken.werkz.Goal.fire(Goal.java:639)
        at com.werken.werkz.Goal.attain(Goal.java:575)
        at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
        at com.werken.werkz.Goal.attain(Goal.java:573)
        at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
        at com.werken.werkz.Goal.attain(Goal.java:573)
        at
org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:448
)
        at
org.apache.maven.MavenSession.attainGoals(MavenSession.java:348)
        at org.apache.maven.cli.App.doMain(App.java:543)
        at org.apache.maven.cli.App.main(App.java:1109)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at com.werken.forehead.Forehead.run(Forehead.java:551)
        at com.werken.forehead.Forehead.main(Forehead.java:581)
File...... file:/C:/Documents and
Settings/ccabanero/.maven/plugins/maven-test-plugin-1.4/
Element... junit
Line...... 94
Column.... 39
java.lang.NoClassDefFoundError
Total time: 5 seconds
Finished at: Thu Feb 05 23:03:52 PST 2004

Thanks for the help,
Christian

-----Original Message-----
From: Brett Porter [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 05, 2004 9:08 PM
To: 'Maven Users List'
Subject: RE: Trouble installing new clover-plug-in



> How do I use the plugin:download goal?  It says that I have
> to specify 'artifactId' but I'm not sure how to do this (I'm 
> new to maven).

-DartifactId=maven-clover-plugin

> And then how do I run with -e?  Would that be  >maven -e clover  ?

yep

> As an aside, I'm also wondering why clover doesn't run by
> default when I do maven jar or maven test or maven 
> site:generate.  I do have 
> <report>maven-clover-plugin</report>  in my reports section 
> of my project.xml.  It's a little confusing figuring out 
> which goals depend on which other goals.  How would I make it 
> so that clover always runs if I run the test goal?
> 

To make it run by default after maven jar, you need a postGoal in
maven.xml:

<postGoal name="jar">
  <attainGoal name="clover" />
</postGoal>

See the user guide on how to set up maven.xml.

The report tag you mentioned will make sure it is always generated when
you
run site:generate.

- Brett


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

Reply via email to