You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Peter Donald (JIRA)" <ji...@apache.org> on 2012/10/07 01:49:16 UTC

[jira] [Updated] (BUILDR-305) Prevent automatic adding of Cobertura.dependencies to test classpath, add configuration option

     [ https://issues.apache.org/jira/browse/BUILDR-305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Donald updated BUILDR-305:
--------------------------------

    Fix Version/s: 1.5
    
> Prevent automatic adding of Cobertura.dependencies to test classpath, add configuration option
> ----------------------------------------------------------------------------------------------
>
>                 Key: BUILDR-305
>                 URL: https://issues.apache.org/jira/browse/BUILDR-305
>             Project: Buildr
>          Issue Type: Improvement
>    Affects Versions: 1.3.4
>            Reporter: Klaas Prause
>             Fix For: 1.5
>
>
> 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"] = cobertura.data_file
> The workaround for us, is to remove all additional cobertura dependencies from the test classpath:
>         # Dirty workaround for cobertura problem to add its dependencies at front of test
>         # classpath. This collides with newer asm packages that are needed for Spring, Hibernate
>         # 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.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira