buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lac...@apache.org
Subject svn commit: r706020 - in /incubator/buildr/trunk: CHANGELOG lib/buildr/ide/eclipse.rb spec/ide/eclipse_spec.rb
Date Sun, 19 Oct 2008 14:33:15 GMT
Author: lacton
Date: Sun Oct 19 07:33:14 2008
New Revision: 706020

URL: http://svn.apache.org/viewvc?rev=706020&view=rev
Log:
BUILDR-171 Eclipse task generates meta-data files for projects with test source code but no
main source code

Modified:
    incubator/buildr/trunk/CHANGELOG
    incubator/buildr/trunk/lib/buildr/ide/eclipse.rb
    incubator/buildr/trunk/spec/ide/eclipse_spec.rb

Modified: incubator/buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/CHANGELOG?rev=706020&r1=706019&r2=706020&view=diff
==============================================================================
--- incubator/buildr/trunk/CHANGELOG (original)
+++ incubator/buildr/trunk/CHANGELOG Sun Oct 19 07:33:14 2008
@@ -3,6 +3,8 @@
 * Change: Upgraded to use Rake 0.8.3, RSpec 1.1.8.
 * Change: Introduced new options from Rake 0.8.3: -I (libdir), -R (rakelib),
           --rules, --no-search, --silent.
+* Change: BUILDR-171 Eclipse task generates meta-data files for projects with
+          test source code but no main source code. 
 * Fixed:  BUILDR-172 Scala compiler not loaded by default.
 * Fixed:  Removed double complete/fail messages showing up on console.
 

Modified: incubator/buildr/trunk/lib/buildr/ide/eclipse.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/ide/eclipse.rb?rev=706020&r1=706019&r2=706020&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/ide/eclipse.rb (original)
+++ incubator/buildr/trunk/lib/buildr/ide/eclipse.rb Sun Oct 19 07:33:14 2008
@@ -42,7 +42,8 @@
       # Only for projects that we support
       supported_languages = [:java, :scala]
       supported_packaging = %w(jar war rar mar aar)
-      if (supported_languages.include? project.compile.language || 
+      if (supported_languages.include?(project.compile.language) ||
+          supported_languages.include?(project.test.compile.language) ||
           project.packages.detect { |pkg| supported_packaging.include?(pkg.type.to_s) })
         eclipse.enhance [ file(project.path_to(".classpath")), file(project.path_to(".project"))
]
 
@@ -82,7 +83,7 @@
               # Classpath elements from other projects
               classpathentry.src_projects project_libs
 
-              classpathentry.output project.compile.target
+              classpathentry.output project.compile.target if project.compile.target
               classpathentry.lib libs
               classpathentry.var m2_libs, 'M2_REPO', m2repo
 

Modified: incubator/buildr/trunk/spec/ide/eclipse_spec.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/spec/ide/eclipse_spec.rb?rev=706020&r1=706019&r2=706020&view=diff
==============================================================================
--- incubator/buildr/trunk/spec/ide/eclipse_spec.rb (original)
+++ incubator/buildr/trunk/spec/ide/eclipse_spec.rb Sun Oct 19 07:33:14 2008
@@ -206,6 +206,12 @@
           define('foo')
           classpath_specific_output('src/test/java').should == 'target/test/classes'
         end
+        
+        it 'should accept to be the only code in the project' do
+          rm 'src/main/java/Main.java'
+          define('foo')
+          classpath_sources.should include('src/test/java')
+        end
       end
       
       describe 'main resources' do
@@ -259,6 +265,7 @@
       describe 'project depending on another project' do
         
         it 'should have the underlying project in its classpath' do
+          mkdir 'foo'
           mkdir 'bar'
           define('myproject') {
             project.version = '1.0'



Mime
View raw message