You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by as...@apache.org on 2008/01/08 21:29:34 UTC

svn commit: r610131 - in /incubator/buildr/trunk/lib/ide: eclipse.rb idea.rb

Author: assaf
Date: Tue Jan  8 12:29:33 2008
New Revision: 610131

URL: http://svn.apache.org/viewvc?rev=610131&view=rev
Log:
BUILDR-16

Modified:
    incubator/buildr/trunk/lib/ide/eclipse.rb
    incubator/buildr/trunk/lib/ide/idea.rb

Modified: incubator/buildr/trunk/lib/ide/eclipse.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/ide/eclipse.rb?rev=610131&r1=610130&r2=610131&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/ide/eclipse.rb (original)
+++ incubator/buildr/trunk/lib/ide/eclipse.rb Tue Jan  8 12:29:33 2008
@@ -7,7 +7,7 @@
   module Eclipse #:nodoc:
 
     include Extension
-    
+
     first_time do
       # Global task "eclipse" generates artifacts for all projects.
       desc "Generate Eclipse artifacts for all projects"
@@ -32,7 +32,7 @@
 
       # Check if project has scala facet
       scala = project.task("scalac") if Rake::Task.task_defined?(project.name+":"+"scalac")
-      
+
       # Only for projects that are Eclipse packagable.
       if project.packages.detect { |pkg| pkg.type.to_s =~ /(jar)|(war)|(rar)|(mar)|(aar)/ }
         eclipse.enhance [ file(project.path_to(".classpath")), file(project.path_to(".project")) ]
@@ -60,7 +60,7 @@
               cp = cp.uniq
 
               # Convert classpath elements into applicable Project objects
-              cp.collect! { |path| projects.detect { |prj| prj.packages.detect { |pkg| pkg.to_s == path } } || path }
+              cp.collect! { |path| Buildr.projects.detect { |prj| prj.packages.detect { |pkg| pkg.to_s == path } } || path }
 
               # project_libs: artifacts created by other projects
               project_libs, others = cp.partition { |path| path.is_a?(Project) }
@@ -76,12 +76,12 @@
 
               srcs = project.compile.sources
               srcs << scala.sources if scala
-              
+
               # hack until we have sunit task
               project.path_to("src/test/scala").tap do |dir|
                 srcs += dir if scala and File.exist?(dir)
               end
-              
+
               srcs = srcs.map { |src| relative[src] } + generated.map { |src| relative[src] }
               srcs.sort.uniq.each do |path|
                 xml.classpathentry :kind=>'src', :path=>path, :excluding=>excludes

Modified: incubator/buildr/trunk/lib/ide/idea.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/ide/idea.rb?rev=610131&r1=610130&r2=610131&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/ide/idea.rb (original)
+++ incubator/buildr/trunk/lib/ide/idea.rb Tue Jan  8 12:29:33 2008
@@ -57,7 +57,7 @@
         cp = project.test.compile.classpath.map(&:to_s) - [ project.compile.target.to_s ]
 
         # Convert classpath elements into applicable Project objects
-        cp.collect! { |path| projects.detect { |prj| prj.packages.detect { |pkg| pkg.to_s == path } } || path }
+        cp.collect! { |path| Buildr.projects.detect { |prj| prj.packages.detect { |pkg| pkg.to_s == path } } || path }
 
         # project_libs: artifacts created by other projects
         project_libs, others = cp.partition { |path| path.is_a?(Project) }
@@ -109,8 +109,8 @@
               end
 
               # Libraries
-              ext_libs = libs.map {|path| "$MODULE_DIR$/#{path.to_s}" } + 
-              m2_libs.map { |path| path.to_s.sub(m2repo, "$M2_REPO$") }                  
+              ext_libs = libs.map {|path| "$MODULE_DIR$/#{path.to_s}" } +
+              m2_libs.map { |path| path.to_s.sub(m2repo, "$M2_REPO$") }
               ext_libs.each do |path|
                 xml.orderEntry :type=>"module-library" do
                   xml.library do