You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Alex Boisvert (JIRA)" <ji...@apache.org> on 2009/02/22 18:15:04 UTC

[jira] Resolved: (BUILDR-261) ScalaSpecs should be run with Scala dependencies

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

Alex Boisvert resolved BUILDR-261.
----------------------------------

    Resolution: Fixed

Fixed. 

boisvert@boog:~/svn/buildr-trunk$ svn commit -m "BUILDR-261: ScalaSpecs should be run with Scala dependencies"
Sending        lib/buildr/scala/tests.rb
Transmitting file data .
Committed revision 746773.

> ScalaSpecs should be run with Scala dependencies
> ------------------------------------------------
>
>                 Key: BUILDR-261
>                 URL: https://issues.apache.org/jira/browse/BUILDR-261
>             Project: Buildr
>          Issue Type: Bug
>          Components: Test frameworks
>    Affects Versions: 1.3.3
>            Reporter: Alex Boisvert
>             Fix For: 1.3.4
>
>
> Scala Specs are not currently run with Scala dependencies which make them fail:
> Buildr::Scala::ScalaTest
> Exception in thread "main" java.lang.NoClassDefFoundError: scala/ScalaObject
> 	at java.lang.ClassLoader.defineClass1(Native Method)
> 	at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
> 	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
> 	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
> 	at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
> 	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
> 	at HelloWorldSpecs.main(HelloWorldSpecs.scala)
> Caused by: java.lang.ClassNotFoundException: scala.ScalaObject
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
> 	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
> 	... 13 more
> Failed to execute java HelloWorldSpecs, see errors above- should compile and run specifications with "Specs" suffix (ERROR - 1)
> 1)
> RuntimeError in 'Buildr::Scala::ScalaTest should compile and run specifications with "Specs" suffix'
> Tests failed!
> Solution is to add Scala depedencies...
> Index: lib/buildr/scala/tests.rb
> ===================================================================
> --- lib/buildr/scala/tests.rb	(revision 746743)
> +++ lib/buildr/scala/tests.rb	(working copy)
> @@ -129,7 +129,8 @@
>        nostacktrace = (options[:nostacktrace]) ? "-ns" : ""
>        cmd_options = { :properties => options[:properties],
>                        :java_args => options[:java_args],
> -                      :classpath => dependencies}
> +                      :classpath => dependencies + Scalac.dependencies}
> +                      
>        specs.each do |spec|
>          Java.load
>          begin

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