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] Created: (BUILDR-261) ScalaSpecs should be run with Scala dependencies
Date Sun, 22 Feb 2009 17:15:04 GMT
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.


Mime
View raw message