Author: boisvert
Date: Thu Jul 19 23:21:12 2012
New Revision: 1363581
URL: http://svn.apache.org/viewvc?rev=1363581&view=rev
Log:
* Changed: Default to Scala 2.9.2, ScalaTest 1.8, Scala Specs2 1.11,
ScalaCheck 1.10.0.
* Changed: Scala artifact repository changed to
http://oss.sonatype.org/content/repositories/releases
Modified:
buildr/trunk/CHANGELOG
buildr/trunk/buildr.buildfile
buildr/trunk/doc/languages.textile
buildr/trunk/lib/buildr/scala.rb
buildr/trunk/lib/buildr/scala/bdd.rb
buildr/trunk/lib/buildr/scala/compiler.rb
buildr/trunk/lib/buildr/scala/doc.rb
buildr/trunk/lib/buildr/scala/tests.rb
buildr/trunk/spec/sandbox.rb
buildr/trunk/spec/scala/doc_spec.rb
buildr/trunk/spec/scala/scala.rb
buildr/trunk/spec/scala/tests_spec.rb
Modified: buildr/trunk/CHANGELOG
URL:
http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=1363581&r1=1363580&r2=1363581&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Thu Jul 19 23:21:12 2012
@@ -1,4 +1,8 @@
1.4.8 (Pending)
+* Changed: Default to Scala 2.9.2, ScalaTest 1.8, Scala Specs2 1.11,
+ ScalaCheck 1.10.0.
+* Changed: Scala artifact repository changed to
+ http://oss.sonatype.org/content/repositories/releases
* Added: BUILDR-645 Support Mercurial as a version control system (Tan Quach)
* Fixed: BUILDR-646 TGZ files do not keep their permissions when extracted
via Buildr::Unzip#extract
Modified: buildr/trunk/buildr.buildfile
URL:
http://svn.apache.org/viewvc/buildr/trunk/buildr.buildfile?rev=1363581&r1=1363580&r2=1363581&view=diff
==============================================================================
--- buildr/trunk/buildr.buildfile (original)
+++ buildr/trunk/buildr.buildfile Thu Jul 19 23:21:12 2012
@@ -18,8 +18,8 @@ require 'buildr/jetty'
require 'buildr/nailgun'
require 'buildr/scala'
repositories.remote << 'http://repo1.maven.org/maven2'
-repositories.remote << 'http://scala-tools.org/repo-releases/'
+repositories.remote << 'https://oss.sonatype.org/content/groups/scala-tools'
define 'buildr' do
compile.using :source=>'1.5', :target=>'1.5', :debug=>false
Modified: buildr/trunk/doc/languages.textile
URL:
http://svn.apache.org/viewvc/buildr/trunk/doc/languages.textile?rev=1363581&r1=1363580&r2=1363581&view=diff
==============================================================================
--- buildr/trunk/doc/languages.textile (original)
+++ buildr/trunk/doc/languages.textile Thu Jul 19 23:21:12 2012
@@ -189,7 +189,7 @@ You may also determine the version in us
Scala.version # => '2.8.0'
{% endhighlight %}
-Regardless of how the Scala version is determined, if you have the same Scala
version installed on your system and the SCALA_HOME environment variable points
to it, then your local installation will be used. Otherwise, Buildr will
download it from the "Scala Tools repository":http://scala-tools.org/ which is
automatically enlisted when you @require@ Scala. The only drawback if you
don't have a local installation is the FSC compiler won't be available.
+Regardless of how the Scala version is determined, if you have the same Scala
version installed on your system and the SCALA_HOME environment variable points
to it, then your local installation will be used. Otherwise, Buildr will
download it from the "Sonatype
repository":http://oss.sonatype.org/content/repositories/releases which is
automatically enlisted when you @require@ Scala. The only drawback if you
don't have a local installation is the FSC compiler won't be available.
p(tip). For Mac users, if you have installed Scala via
"MacPorts":http://www.macports.org/ Buildr will look in the
@/opt/local/share/scala/@ directory if you have not set @SCALA_HOME@.
Modified: buildr/trunk/lib/buildr/scala.rb
URL:
http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/scala.rb?rev=1363581&r1=1363580&r2=1363581&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/scala.rb (original)
+++ buildr/trunk/lib/buildr/scala.rb Thu Jul 19 23:21:12 2012
@@ -15,7 +15,7 @@
ENV['SCALA_HOME'] ||= '/opt/local/share/scala/' if
File.exist?('/opt/local/share/scala/lib/scala-compiler.jar')
-Buildr.repositories.remote << 'http://scala-tools.org/repo-releases'
+Buildr.repositories.remote <<
'http://oss.sonatype.org/content/repositories/releases'
require 'buildr/scala/compiler'
require 'buildr/scala/tests'
Modified: buildr/trunk/lib/buildr/scala/bdd.rb
URL:
http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/scala/bdd.rb?rev=1363581&r1=1363580&r2=1363581&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/scala/bdd.rb (original)
+++ buildr/trunk/lib/buildr/scala/bdd.rb Thu Jul 19 23:21:12 2012
@@ -134,8 +134,10 @@ module Buildr::Scala
VERSION = case
when Buildr::Scala.version?("2.8.0"), Buildr::Scala.version?("2.8.1"),
Buildr::Scala.version?("2.8.2")
'1.5'
+ when Buildr::Scala.version?("2.9")
+ '1.11'
else
- '1.6.1'
+ fail "No default specs2 version for Scala
#{Scala.version_without_build}"
end
class << self
@@ -150,7 +152,12 @@ module Buildr::Scala
end
def artifact
- Buildr.settings.build['scala.specs2.artifact'] ||
"specs2_#{Buildr::Scala.version_without_build}"
+ case
+ when Buildr.settings.build['scala.specs2.artifact']
+ Buildr.settings.build['scala.specs2.artifact']
+ else
+ "specs2_#{Buildr::Scala.version_without_build}"
+ end
end
def scalaz_dependencies
Modified: buildr/trunk/lib/buildr/scala/compiler.rb
URL:
http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/scala/compiler.rb?rev=1363581&r1=1363580&r2=1363581&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/scala/compiler.rb (original)
+++ buildr/trunk/lib/buildr/scala/compiler.rb Thu Jul 19 23:21:12 2012
@@ -14,7 +14,7 @@
# the License.
module Buildr::Scala
- DEFAULT_VERSION = '2.9.1'
+ DEFAULT_VERSION = '2.9.2'
class << self
Modified: buildr/trunk/lib/buildr/scala/doc.rb
URL:
http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/scala/doc.rb?rev=1363581&r1=1363580&r2=1363581&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/scala/doc.rb (original)
+++ buildr/trunk/lib/buildr/scala/doc.rb Thu Jul 19 23:21:12 2012
@@ -23,8 +23,13 @@ module Buildr
after_define(:scaladoc => :doc) do |project|
if project.doc.engine? Scaladoc
options = project.doc.options
- key = Scala.version?(2.7) ? :windowtitle : "doc-title".to_sym
- options[key] = (project.comment || project.name) unless options[key]
+ if Scala.version?(2.7)
+ options[:windowtitle] = (project.comment || project.name) unless
options[:windowtitle]
+ else
+ doc_title = "doc-title".to_sym
+ options[doc_title] = (project.comment || project.name) unless
options[doc_title]
+ options.delete(:windowtitle) if options[:windowtitle]
+ end
end
end
end
@@ -33,7 +38,8 @@ module Buildr
specify :language => :scala, :source_ext => 'scala'
def generate(sources, target, options = {})
- cmd_args = [ '-d', target, trace?(:scaladoc) ? '-verbose' : '' ]
+ cmd_args = [ '-d', target]
+ cmd_args << '-verbose' if trace?(:scaladoc)
options.reject { |key, value| [:sourcepath, :classpath].include?(key)
}.
each { |key, value| value.invoke if value.respond_to?(:invoke) }.
each do |key, value|
@@ -74,11 +80,17 @@ module Buildr
class VScaladoc < Base
VERSION = '1.2-m1'
- Buildr.repositories.remote << 'http://scala-tools.org/repo-snapshots'
+ Buildr.repositories.remote <<
'https://oss.sonatype.org/content/groups/scala-tools'
class << self
def dependencies
- [ "org.scala-tools:vscaladoc:jar:#{VERSION}" ]
+ case
+ when Buildr::Scala.version?("2.7")
+ [ "org.scala-tools:vscaladoc:jar:#{VERSION}" ]
+ else
+ warn "VScaladoc does not support Scala 2.8+"
+ []
+ end
end
end
Modified: buildr/trunk/lib/buildr/scala/tests.rb
URL:
http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/scala/tests.rb?rev=1363581&r1=1363580&r2=1363581&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/scala/tests.rb (original)
+++ buildr/trunk/lib/buildr/scala/tests.rb Thu Jul 19 23:21:12 2012
@@ -40,7 +40,7 @@ module Buildr::Scala
when Buildr::Scala.version?("2.8.1")
'1.8'
else
- '1.9'
+ '1.10.0'
end
class << self
@@ -58,10 +58,16 @@ module Buildr::Scala
def dependencies
return [version] if (version =~ /:/)
+ group = case
+ when version =~ /^1.[67]/
+ "org.scala-tools.testing"
+ else
+ "org.scalacheck"
+ end
if classifier
- ["org.scala-tools.testing:#{artifact}:jar:#{classifier}:#{version}"]
+ ["#{group}:#{artifact}:jar:#{classifier}:#{version}"]
else
- ["org.scala-tools.testing:#{artifact}:jar:#{version}"]
+ ["#{group}:#{artifact}:jar:#{version}"]
end
end
@@ -83,7 +89,12 @@ module Buildr::Scala
# * :java_args -- Arguments passed as is to the JVM.
class ScalaTest < Buildr::TestFramework::Java
- VERSION = Buildr::Scala.version?(2.7, 2.8) ? '1.3' : '1.6.1'
+ VERSION = case
+ when Buildr::Scala.version?(2.7)
+ '1.3'
+ else
+ '1.8'
+ end
class << self
def version
Modified: buildr/trunk/spec/sandbox.rb
URL:
http://svn.apache.org/viewvc/buildr/trunk/spec/sandbox.rb?rev=1363581&r1=1363580&r2=1363581&view=diff
==============================================================================
--- buildr/trunk/spec/sandbox.rb (original)
+++ buildr/trunk/spec/sandbox.rb Thu Jul 19 23:21:12 2012
@@ -19,11 +19,12 @@
# repository and cache these across test cases.
Buildr.application.instance_eval { @rakefile = File.expand_path('buildfile') }
repositories.remote << 'http://repo1.maven.org/maven2'
-repositories.remote << 'http://scala-tools.org/repo-releases'
+repositories.remote << 'https://oss.sonatype.org/content/groups/scala-tools'
+
# Force Scala version for specs; don't want to rely on SCALA_HOME
module Buildr::Scala
- SCALA_VERSION_FOR_SPECS = ENV["SCALA_VERSION"] || "2.8.1"
+ SCALA_VERSION_FOR_SPECS = ENV["SCALA_VERSION"] || "2.9.2"
end
Buildr.settings.build['scala.version'] = Buildr::Scala::SCALA_VERSION_FOR_SPECS
Modified: buildr/trunk/spec/scala/doc_spec.rb
URL:
http://svn.apache.org/viewvc/buildr/trunk/spec/scala/doc_spec.rb?rev=1363581&r1=1363580&r2=1363581&view=diff
==============================================================================
--- buildr/trunk/spec/scala/doc_spec.rb (original)
+++ buildr/trunk/spec/scala/doc_spec.rb Thu Jul 19 23:21:12 2012
@@ -52,10 +52,17 @@ describe "Scaladoc" do
define('foo') do
doc.using :windowtitle => "foo"
end
- Java.scala.tools.nsc.ScalaDoc.should_receive(:process) do |args|
+ actual = Java.scala.tools.nsc.ScalaDoc.new
+ scaladoc = Java.scala.tools.nsc.ScalaDoc.new
+ Java.scala.tools.nsc.ScalaDoc.should_receive(:new) do
+ scaladoc
+ end
+ scaladoc.should_receive(:process) do |args|
# Convert Java Strings to Ruby Strings, if needed.
- args.map { |a| a.is_a?(String) ? a : a.toString }.should
include("-doc-title")
- 0 # normal return
+ xargs = args.map { |a| a.is_a?(String) ? a : a.toString }
+ xargs.should include("-doc-title")
+ xargs.should_not include("-windowtitle")
+ actual.process(args).should eql(true)
end
project('foo').doc.invoke
end unless Buildr::Scala.version?(2.7, "2.8.0")
Modified: buildr/trunk/spec/scala/scala.rb
URL:
http://svn.apache.org/viewvc/buildr/trunk/spec/scala/scala.rb?rev=1363581&r1=1363580&r2=1363581&view=diff
==============================================================================
--- buildr/trunk/spec/scala/scala.rb (original)
+++ buildr/trunk/spec/scala/scala.rb Thu Jul 19 23:21:12 2012
@@ -18,11 +18,11 @@ require File.expand_path(File.join(File.
describe 'scala' do
- it 'should automatically add the remote scala-tools.org repository' do
+ it 'should automatically add the remote oss.sonatype.org repository' do
# NOTE: the sandbox environment clears "repositories.remote" so we can't
# test for this spec right now.
#
- # repositories.remote.should
include('http://scala-tools.org/repo-releases')
+ # repositories.remote.should
include('http://oss.sonatype.org/content/repositories/releases')
end
it "should provide the Scala version string" do
Modified: buildr/trunk/spec/scala/tests_spec.rb
URL:
http://svn.apache.org/viewvc/buildr/trunk/spec/scala/tests_spec.rb?rev=1363581&r1=1363580&r2=1363581&view=diff
==============================================================================
--- buildr/trunk/spec/scala/tests_spec.rb (original)
+++ buildr/trunk/spec/scala/tests_spec.rb Thu Jul 19 23:21:12 2012
@@ -32,8 +32,8 @@ describe "scalatest version" do
Scala::ScalaTest.dependencies.should
include("org.scalatest:scalatest:jar:1.3")
end
when Buildr::Scala.version?(2.9)
- it 'should be 1.6.1 for scala 2.9' do
- Scala::ScalaTest.dependencies.should
include("org.scalatest:scalatest_2.9.0:jar:1.6.1")
+ it 'should be 1.8 for scala 2.9' do
+ Scala::ScalaTest.dependencies.should
include("org.scalatest:scalatest_2.9.2:jar:1.8")
end
end
end