buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djspie...@apache.org
Subject svn commit: r786678 - /buildr/trunk/lib/buildr/scala/compiler.rb
Date Fri, 19 Jun 2009 21:52:41 GMT
Author: djspiewak
Date: Fri Jun 19 21:52:41 2009
New Revision: 786678

URL: http://svn.apache.org/viewvc?rev=786678&view=rev
Log:
Artifact descriptors for the library and compiler when not installed

Modified:
    buildr/trunk/lib/buildr/scala/compiler.rb

Modified: buildr/trunk/lib/buildr/scala/compiler.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/scala/compiler.rb?rev=786678&r1=786677&r2=786678&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/scala/compiler.rb (original)
+++ buildr/trunk/lib/buildr/scala/compiler.rb Fri Jun 19 21:52:41 2009
@@ -64,9 +64,19 @@
       def scala_home
         @home ||= ENV['SCALA_HOME']
       end
+      
+      def installed?
+        !scala_home.nil?
+      end
 
       def dependencies
-        [ 'scala-library.jar', 'scala-compiler.jar'].map { |jar| File.expand_path("lib/#{jar}",
scala_home) }
+        deps = ['scala-library', 'scala-compiler']
+        
+        if installed?
+          deps.map { |s| File.expand_path("lib/#{s}.jar", scala_home) }
+        else
+          deps.map { |s| 'org.scala-lang:' + s + ':jar:' + Scala.version }
+        end
       end
 
       def use_fsc



Mime
View raw message