seratch / scalatest

Automatically exported from code.google.com/p/scalatest
Apache License 2.0
0 stars 0 forks source link

scala 2.10.2 seems to require scala-actors.jar for scalatest to work in ant. #42

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I have over a decade of Java experience, but I am a Scala newbie.

What steps will reproduce the problem?
1. Run scalatest from ant with Scala 2.10.2 without scala-actors.jar in the 
classpath.  It's possible that the issue only comes up when it can't find the 
compiled class it's supposed to test (the classname attribute is set wrong), 
but I'm guessing it's more general.
2. See errors: java.lang.NoClassDefFoundError: scala/actors/Actor$
3. To fix it, I made my classpath look like this:
<path id="scalatest.classpath">
  <pathelement location="${testLib}/scalatest_2.10-1.9.1.jar"/>
  <pathelement location="${scala-library.jar}"/>
  <pathelement location="${scala-reflect.jar}"   />
  <pathelement location="${scala.home}/lib/scala-actors.jar" />
</path>

I'm using:
Scala 2.10.2
Scalatest 2.10-1.9.1
Ubuntu 12.04 64-bit

Original issue reported on code.google.com by Glen.K.P...@gmail.com on 4 Jul 2013 at 4:40

GoogleCodeExporter commented 8 years ago
Hi Glen,

Scalatest originally used an actor to serialize events fired at reporters. 
After actors were deprecated and moved to a separate scala-actors.jar we 
changed this to just use java.util.concurrent. But this change is in the 
ScalaTest 2.0 branch, so the requirement will go away once you upgrade to a 2.0 
milestone release or 2.0 final once that is released.

Original comment by b...@artima.com on 4 Jul 2013 at 4:54

GoogleCodeExporter commented 8 years ago
Thank you very much for your help.  I finally have everything working with 
scala-actors.jar.  scala-reflect.jar is not needed.  A note about the 
scala-actors.jar dependency for pre-scalatest-2.0 would have helped me if it 
was in the instructions here:
http://www.scalatest.org/user_guide/using_the_scalatest_ant_task

Original comment by Glen.K.P...@gmail.com on 4 Jul 2013 at 5:28