buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Klaas Prause (JIRA)" <>
Subject [jira] Commented: (BUILDR-305) Prevent automatic adding of Cobertura.dependencies to test classpath, add configuration option
Date Fri, 28 Aug 2009 15:24:04 GMT


Klaas Prause commented on BUILDR-305:

Maven had this issue as well:

the correct solution is to only include the complete dependencies for instrument and add only
the cobertura.jar to the test classpath (as described in the ticket).

> Prevent automatic adding of Cobertura.dependencies to test classpath, add configuration
> ----------------------------------------------------------------------------------------------
>                 Key: BUILDR-305
>                 URL:
>             Project: Buildr
>          Issue Type: Improvement
>    Affects Versions: 1.3.4
>            Reporter: Klaas Prause
> The Cobertura instrument tasks adds all dependencies to the front of the test task classpath.
When using the ivy4r plugin (not verified with buildr standard dependency management) the
dependencies interfere with the real test dependencies, by using the cobertura ASM and not
the newer project dependency on ASM.
> The problematic line:
>             project.test.dependencies.unshift cobertura.instrumented_dir
> -->       project.test.with Cobertura.dependencies
>             project.test.options[:properties]["net.sourceforge.cobertura.datafile"] =
> The workaround for us, is to remove all additional cobertura dependencies from the test
>         # Dirty workaround for cobertura problem to add its dependencies at front of
>         # classpath. This collides with newer asm packages that are needed for Spring,
>         # or Easymock and presumable more packages
>         cobertura_dependencies = Cobertura.dependencies[1, Cobertura.dependencies.size].map
{|d| artifact(d)}
>         test.dependencies.reject! do |item|
>           begin
>             cobertura_dependencies.member? artifact(item)
>           rescue
>           end
>         end
> a real solution would be to have the option to add the dependencies or not, maybe via:
> # remove asm and log4j and let oro untouched
> cobertura.dependencies :asm => false, :log4j => false

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message