You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by bo...@apache.org on 2008/08/04 20:53:53 UTC

svn commit: r682463 - /incubator/buildr/trunk/lib/buildr/ide/eclipse.rb

Author: boisvert
Date: Mon Aug  4 11:53:53 2008
New Revision: 682463

URL: http://svn.apache.org/viewvc?rev=682463&view=rev
Log:
BUILDR-117: Shared directory for both code and resources produces duplicate Eclipse classpath entries

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

Modified: incubator/buildr/trunk/lib/buildr/ide/eclipse.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/ide/eclipse.rb?rev=682463&r1=682462&r2=682463&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/ide/eclipse.rb (original)
+++ incubator/buildr/trunk/lib/buildr/ide/eclipse.rb Mon Aug  4 11:53:53 2008
@@ -89,16 +89,10 @@
               # Generated: classpath elements in the project are assumed to be generated
               generated, libs = others.partition { |path| path.to_s.index(project.path_to.to_s) == 0 }
 
-              srcs = project.compile.sources
+              # Main resources implicitly copied into project.compile.target
+              srcs = (project.compile.sources + generated + project.resources.sources).map { |src| relative[src] }
 
-              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
-              end
-
-              # Main resources implicitly copied into project.compile.target
-              main_resource_sources = project.resources.sources.map { |src| relative[src] }
-              main_resource_sources.each do |path|
                 if File.exist? project.path_to(path)
                   xml.classpathentry :kind=>'src', :path=>path, :excluding=>excludes
                 end