From: SourceForge.net <no...@so...> - 2011-06-18 05:32:17
|
Bugs item #3097178, was opened at 2010-10-28 08:10 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=720015&aid=3097178&group_id=130558 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Cobertura Maven artifact dependency problem Initial Comment: The cobertura.pom declares a dependecy on ant 1.7.0. I'm using the maven ant tasks to download Cobertura and define the ant tasks so Cobertura does not have to be installed on every system that runs the build script, like this: <artifact:dependencies pathid="maven.project.cobertura.path"> <dependency groupid="net.sourceforge.cobertura" artifactid="cobertura" version="1.9.4.1"/> </artifact:dependencies> <taskdef classpathref="maven.project.cobertura.path" resource="tasks.properties" /> Because of Cobertura's dependency on ant 1.7.0 it is also downloaded and added to the classpath. This later causes a warning by junit, when the tests are run with a different version of ant: [junit] WARNING: multiple versions of ant detected in path for junit [junit] jar:file:/.../apache-ant-1.7.1/lib/ant.jar!/org/apache/tools/ant/Project.class [junit] and jar:file:/.../repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar!/org/apache/tools/ant/Project.class Since ant is only required to compile the Cobertura ant tasks and not to run it, because the tasks are used from within ant and so ant is already in the classpath the dependency should be set to scope provided: <dependency> <groupId>org.apache.ant</groupId> <artifactId>ant</artifactId> <version>1.7.0</version> <scope>provided</scope> </dependency> That fixed the warning for me. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2011-06-18 05:32 Message: fLxlie <a href="http://sdzswjmuccwa.com/">sdzswjmuccwa</a>, [url=http://tadxfvfzvlpa.com/]tadxfvfzvlpa[/url], [link=http://hmdbbxphfmur.com/]hmdbbxphfmur[/link], http://xunbdyparnll.com/ ---------------------------------------------------------------------- Comment By: Christoph Hohmann (reboot) Date: 2011-01-31 18:38 Message: That could be done, but since Cobertura is only tool for developers and does not add any overhead to a program, it is not really required, in my opinion. The problem is the dependency that adds a second versions of Project.class to the classpath. Spliting the ant code into a seperate jar would not fix this. A compile dependency pulls the Ant API into the dependencies for a task that is used from within Ant were the depencencies are already present. ---------------------------------------------------------------------- Comment By: Piotr Tabor (ptab) Date: 2011-01-31 06:21 Message: It seem to me that cobertura has cobertura anttasks integrated in the main package (net.sourceforge.cobertura.ant.*). And the tasks depends on ant. The right sollution is to extract cobertura-ant.jar from the cobertura.jar file. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=720015&aid=3097178&group_id=130558 |