And now integrated into buildr trunk if you want to try it out. http://buildr.apache.org/contributing.html#edge
alex On Thu, May 26, 2011 at 9:23 PM, Alexis Midon <[email protected]> wrote: > Hi Pablo, > > I ran in the exact same issues this week. > I have a patch for both issues at > https://github.com/alexism/buildr/tree/scala_29 > > You can install this branch until it gets integrated in the next release. > > Alexis > > On Thu, May 26, 2011 at 5:08 PM, Pablo Lalloni <[email protected]> wrote: > > > Hello everyone, > > > > This is my first email to this maillist so please forgive my lack of > > familiarity with local protocols. > > > > Now to the situation... I'm using buildr for the first time ever and > using > > it for a scala project, in my project I've got some specs and suites > > written > > over scalatest framework setted on buildfile.rb with "test.using > > :scalatest" > > > > I'm using scala 2.9.0 setted on build.yaml with "scala.version". > > > > In this setting "buildr clean test" fails with: > > > > Downloading org.scala-tools.testing:scalacheck_2.9.0:jar:1.7 > > Buildr aborted! > > RuntimeError : Failed to download > > org.scala-tools.testing:scalacheck_2.9.0:jar:1.7, tried the following > > repositories: > > http://scala-tools.org/repo-releases/ > > http://scala-tools.org/repo-snapshots/ > > http://www.ibiblio.org/maven2// > > > > I figured out it was because the default version of scalacheck wich gets > > used is 1.7 and for that varsion there is no scala 2.9 jar deployed... so > I > > went and setted "scala.check = 1.9" on build.yaml, then it ended at: > > > > E, [2011-05-26T19:55:32.859152 #10775] ERROR -- : Error instantiating > > 'scalatest' task: scala.collection.immutable.Set$EmptySet$ cannot be cast > > to > > scala.collection.generic.Addable > > Test framework error: scala.collection.immutable.Set$EmptySet$ cannot be > > cast to scala.collection.generic.Addable > > The following tests failed: > > org.retistruen.AsynchronousSuite > > org.retistruen.BufferedMaxSpec > > org.retistruen.VariableSpec > > > > After investigation I determined this was because default scalatest jar > > used > > is 1.3 which again is not scala 2.9 compatible... so I added "scala.test > = > > 1.4.1" at build.yaml, then I got: > > > > Downloading org.scalatest:scalatest:jar:1.4.1 > > Buildr aborted! > > RuntimeError : Failed to download org.scalatest:scalatest:jar:1.4.1, > tried > > the following repositories: > > http://scala-tools.org/repo-releases/ > > http://scala-tools.org/repo-snapshots/ > > http://www.ibiblio.org/maven2// > > > > So I've found there's not scalatest 1.4.1 jar deployed on scala-tools > repo > > without the _2.9.0 artifactId suffix... then I tried to find out how to > > customize the scalatest artifactId buildr uses but I've found no way > other > > than subclassing Scala::Test::ScalaTestFramework using this code: > > > > module Buildr::Scala > > class CustomScalaTest < Buildr::Scala::ScalaTest > > VERSION = "1.4.1" > > class << self > > def dependencies > > ["org.scalatest:scalatest_#{Scala.version}:jar:#{version}"] + > > Check.dependencies + JMock.dependencies + JUnit.dependencies > > end > > end > > end > > end > > > > Buildr::TestFramework << Buildr::Scala::CustomScalaTest > > > > test.using :customscalatest > > > > Then everything worked out... testing and everything else. > > > > Is there an easiest way to override default scalatest artifactId that > gets > > used? > > > > If there isn't... should not this change be on the default > > Buildr::Scala::CustomScalaTest? Better yet... should not all the groupId, > > artifactId and version of scalatest be parameterized so all can be > > customized from build.yaml? > > > > I will be happy to provide a patch if there is interest. > > > > Respect, > > Pablo > > >
