buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Boisvert (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (BUILDR-381) JUnit tests on Groovy project fail with NoClassDefFoundError: junit/framework/TestCase
Date Sun, 28 Feb 2010 04:40:05 GMT

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

Alex Boisvert resolved BUILDR-381.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.4
         Assignee: Alex Boisvert

Fixed.

Thanks Antoine for the additional spec, although the spec itself doesn't properly test the
classloading issue due to the spec sandboxing.

Turns out it's better not to put the Groovy dependencies into the JVM's classpath since Groovy
has issues loading classes which are not in the system classpath (e.g. JUnit in this case).

Sending        CHANGELOG
Sending        lib/buildr/groovy/compiler.rb
Sending        lib/buildr/java/packaging.rb
Sending        lib/buildr/java/tests.rb
Sending        spec/groovy/compiler_spec.rb
Sending        spec/sandbox.rb
Transmitting file data ......
Committed revision 917115.


> JUnit tests on Groovy project fail with NoClassDefFoundError: junit/framework/TestCase
> --------------------------------------------------------------------------------------
>
>                 Key: BUILDR-381
>                 URL: https://issues.apache.org/jira/browse/BUILDR-381
>             Project: Buildr
>          Issue Type: Bug
>          Components: Test frameworks
>    Affects Versions: 1.3.5
>         Environment: Buildr 1.3.5 (JRuby 1.4.0)
>            Reporter: peter schröder
>            Assignee: Alex Boisvert
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: BUILDR-381.txt, groovy.zip
>
>
> unit tests can not be compiled:
>  ERROR -- : Error instantiating 'groovyc' task: java.lang.NoClassDefFoundError: junit/framework/TestCase
>  Buildr aborted!
>  java.lang.NoClassDefFoundError: junit/framework/TestCase
> WORKAROUND:
> put this at the top of the buildfile:
>  Java.classpath << "junit:junit:jar:4.4"

-- 
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