Specific Cobertura version in Maven-cobertura-plugin

I found this blog post by Brian Fox explaining how to override a plugin's dependencies.
This allowed me to configure the maven-cobertura-plugin to use a specific cobertura version (1.9.1.1 being the latest one available in the central maven repository), instead of the one configured by the plugin itself (1.9).
As stated by Brian, as long as the newly introduced version's API is compatible with the original one, there should be no problem.

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>net.sourceforge.cobertura</groupId>
<artifactId>cobertura</artifactId>
<version>1.9.1.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
</plugin>
</plugins>
</reporting>

No comments:

Post a Comment