I fixed it at last...
In case someone met the same problem as me, here is how I did:
I was missing pluginRepositories in my pom file. Thanks to a discussion
with Wayne Fay, he told me he was using repository in his pom file.
I checked what this file could have as tags and found this pluginRepository.
Here is my section:
<pluginRepositories>
<pluginRepository>
<id>central</id>
<name>Maven Plugin Repository</name>
<url>http://repo1.maven.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
</pluginRepository>
<pluginRepository>
<id>CodeHaus</id>
<name></name>
<url>http://snapshots.maven.codehaus.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</releases>
</pluginRepository>
</pluginRepositories>
I got cobertura, jdepend and changes that are working fine (well seems so).
Here is my section for the reporting plugins:
<reporting>
<plugins>
<!-- Link to javadoc in the site -->
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<!-- Produces html output of the code -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jxr-maven-plugin</artifactId>
</plugin>
<!--
Build unit tests reports but take care to have your
LANG variable set as en_US under Linux else report fails.
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>surefire-report-maven-plugin</artifactId>
</plugin>
<!-- Code coverage plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.0-20060130.214008-3</version>
</plugin>
<!-- Follow up of the project: what has changed, why, etc -->
<!-- When bug tracking tool has been set, check this:
http://mojo.codehaus.org/changes-maven-plugin/howto.html
It allows to automagically generate the list of bugs fixed
with the same plugin!! Looks great !
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>changes-maven-plugin</artifactId>
<version>2.0-beta-2-SNAPSHOT</version>
<reportSets>
<reportSet>
<reports>
<report>changes-report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jdepend-maven-plugin</artifactId>
<version>2.0-beta-1-SNAPSHOT</version>
</plugin>
</plugins>
</reporting>
Hope this can help someone and save its time ;)
Boris
Boris Lenzinger wrote:
Cobertura plugin is not finished but I guess it is working for a
single project no ? There are some versions released.
I'll check the issues you pointed.
Anyway, I have the same problem with jdepend-maven-plugin and
changes-maven-plugin.
David Sag wrote:
The cobertura plugin is not finished yet.
I recommend you pop over to
http://jira.codehaus.org/browse/MCOBERTURA-2 and
http://jira.codehaus.org/browse/MCOBERTURA-5 and vote on those issues
Kind regards,
Dave Sag
Boris Lenzinger <[EMAIL PROTECTED]> wrote on 15-03-2006
11:03:35:
> Hi,
>
> I'm newbie in Maven and I'm exploring this great tool. I'm using it
for
> a personnal project but I encounter a problem that I cannot fix. I've
> searched on the ML and googled with no result on this problem.
>
> I'm using Maven 2.0.2.
>
> I want to generate code coverage reports on the project (and some
other
> like jdepend, changes, etc). I saw cobertura-maven-plugin and
wanted to
> use it.
> In the central repository, it seems to be working with Maven1 only. I
> get a NullPointerException that is raised which is caracteristic of
> trying to use a plugin of Maven1 with Maven2 no ? I saw some mails
about
> this in the ML saying plugins were not up-to-date.
>
> I've searched for a repository that could have the plugins I'm
> interested in for Maven2. I found one here
> (http://snapshots.maven.codehaus.org/maven2).
>
> I then added to settings.xml a profile where I added the
repository. At
> last I've set the profile as always active.
> Here is the declaration:
> <profiles>
> <profile>
> <id>additional-repository</id>
>
> <repositories>
> <repository>
> <id>codehaus</id>
> <name>Code Haus snapshots.</name>
> <url>http://snapshots.maven.codehaus.org/maven2</url>
> <layout>default</layout>
> </repository>
> </repositories>
> </profile>
> </profiles>
>
> <activeProfiles>
> <activeProfile>additional-repository</activeProfile>
> </activeProfiles>
>
> Declaration in the pom file:
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>cobertura-maven-plugin</artifactId>
> <version>2.0-20060130.214008-3</version>
> </plugin>
>
> Then I execute the command mvn site.
>
> Maven starts to download the pom file related to the plugin and
then say
> that it cannot find the plugin.
> Here is the exact message:
> +-+-+-+-+-+-+-+-+-+ START OF MESSAGE +-+-+-+-+-+-+-+-+-+
>
> [INFO] Building Common Classes
> [INFO] task-segment: [site]
> [INFO]
>
----------------------------------------------------------------------------
> Downloading:
> http://snapshots.maven.codehaus.
> org/maven2/org/codehaus/mojo/cobertura-maven-plugin/2.0-
> SNAPSHOT/cobertura-maven-plugin-2.0-20060130.214008-3.pom
> 3K downloaded
> [INFO]
>
----------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO]
>
----------------------------------------------------------------------------
> [INFO] A required plugin was not found: Plugin could not be found -
> check that the goal name is correct: Unable to download the artifact
> from any repository
>
> >
org.codehaus.mojo:cobertura-maven-plugin:maven-plugin:2.0-20060130.214008-3
>
> from the specified remote repositories:
> central (http://repo1.maven.org/maven2)
>
> >
org.codehaus.mojo:cobertura-maven-plugin:maven-plugin:2.0-20060130.214008-3
>
> from the specified remote repositories:
> central (http://repo1.maven.org/maven2)
>
> +-+-+-+-+-+-+-+-+-+ END OF MESSAGE +-+-+-+-+-+-+-+-+-+
>
> I've tried tons of things but with no success. I've search in the
> mailing list but found nothing (well for the problem else I found some
> interesting references to plugin or some fixes for other problems I
> could have).
>
> In the FAQ there is a section that answers to this but it is not
> applying to me since I'm not behind a proxy and it was working fine
> until I want those plugins from a special repository.
>
> So I ask for help since I cannot find a solution.
>
> Any help would be greatly appreciated.
>
> thanks in advance
>
> Boris
>
>
> ---------------------------------------------------------------------
> 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]