buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Klaas Prause (JIRA)" <j...@apache.org>
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

    [ https://issues.apache.org/jira/browse/BUILDR-305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12748856#action_12748856
] 

Klaas Prause commented on BUILDR-305:
-------------------------------------

Maven had this issue as well:
http://jira.codehaus.org/browse/MCOBERTURA-11

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
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
>
> 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.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message