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/11/07 16:51:33 UTC

svn commit: r712172 - in /incubator/buildr/trunk: CHANGELOG lib/buildr/core/compile.rb lib/buildr/core/filter.rb spec/core/compile_spec.rb

Author: assaf
Date: Fri Nov  7 07:51:11 2008
New Revision: 712172

URL: http://svn.apache.org/viewvc?rev=712172&view=rev
Log:
Removed BUILDR-205 for now. We'll need something smarter for filters, this is not it.

Modified:
    incubator/buildr/trunk/CHANGELOG
    incubator/buildr/trunk/lib/buildr/core/compile.rb
    incubator/buildr/trunk/lib/buildr/core/filter.rb
    incubator/buildr/trunk/spec/core/compile_spec.rb

Modified: incubator/buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/CHANGELOG?rev=712172&r1=712171&r2=712172&view=diff
==============================================================================
--- incubator/buildr/trunk/CHANGELOG (original)
+++ incubator/buildr/trunk/CHANGELOG Fri Nov  7 07:51:11 2008
@@ -24,7 +24,6 @@
 * Fixed: BUILDR-198 Filter#run always calls mkpath with :verbose.
 * Fixed: BUILDR-199 ArchiveTask#needed uses 'each' with no effect (Ittay Dror).
 * Fixed: BUILDR-201 Sample project is not valid (Alexis Midon).
-* Fixed: BUILDR-205 resources.target task does nothing when invoked and directory already exists.
 
 1.3.3 (2008-10-08)
 * Added:  JtestR support. Implemented pending jtestr specs.

Modified: incubator/buildr/trunk/lib/buildr/core/compile.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/core/compile.rb?rev=712172&r1=712171&r2=712172&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/core/compile.rb (original)
+++ incubator/buildr/trunk/lib/buildr/core/compile.rb Fri Nov  7 07:51:11 2008
@@ -407,7 +407,7 @@
       @filter = Buildr::Filter.new
       @filter.using Buildr.settings.profile['filter'] if Hash === Buildr.settings.profile['filter']
       enhance do
-        filter.run if target
+        target.invoke if target
       end
     end
 
@@ -490,10 +490,6 @@
     end
 
     after_define do |project|
-      # TODO: Is this necessary?
-      if project.resources.target
-        file project.resources.target.to_s=>project.resources
-      end
       if project.compile.target
         # This comes last because the target path is set inside the project definition.
         project.build project.compile.target

Modified: incubator/buildr/trunk/lib/buildr/core/filter.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/core/filter.rb?rev=712172&r1=712171&r2=712172&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/core/filter.rb (original)
+++ incubator/buildr/trunk/lib/buildr/core/filter.rb Fri Nov  7 07:51:11 2008
@@ -181,9 +181,9 @@
         copy_map.each do |path, source|
           dest = File.expand_path(path, target.to_s)
           if File.directory?(source)
-            mkpath dest
+            mkpath dest, :verbose=>false
           else
-            mkpath File.dirname(dest), :verbose=>false
+            mkpath File.dirname(dest)
             if @mapper.mapper_type
               mapped = @mapper.transform(File.open(source, 'rb') { |file| file.read }, path)
               File.open(dest, 'wb') { |file| file.write mapped }

Modified: incubator/buildr/trunk/spec/core/compile_spec.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/spec/core/compile_spec.rb?rev=712172&r1=712171&r2=712172&view=diff
==============================================================================
--- incubator/buildr/trunk/spec/core/compile_spec.rb (original)
+++ incubator/buildr/trunk/spec/core/compile_spec.rb Fri Nov  7 07:51:11 2008
@@ -561,13 +561,6 @@
     lambda { project('foo').resources.target.invoke }.should change { File.exist?('target/resources/test') }.to(true)
   end
 
-  it 'should run from target/resources when older than sources' do
-    write 'target/resources/test', 'old'
-    write 'src/main/resources/test', 'modified'
-    define('foo')
-    lambda { project('foo').resources.target.invoke }.should change { File.read('target/resources/test') }.to('modified')
-  end
-
   it 'should not be recursive' do
     define('foo') { define 'bar' }
     lambda { project('foo').resources.invoke }.should_not run_task('foo:bar:resources')