buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject svn commit: r1530502 - in /buildr/trunk: CHANGELOG lib/buildr/core/assets.rb
Date Wed, 09 Oct 2013 06:06:06 GMT
Author: donaldp
Date: Wed Oct  9 06:06:06 2013
New Revision: 1530502

URL: http://svn.apache.org/r1530502
Log:
BUILDR-681 - Stop empty projects creating target/webapp.

Modified:
    buildr/trunk/CHANGELOG
    buildr/trunk/lib/buildr/core/assets.rb

Modified: buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=1530502&r1=1530501&r2=1530502&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Wed Oct  9 06:06:06 2013
@@ -1,4 +1,5 @@
 1.4.14 (Pending)
+* Fixed:  BUILDR-681 - Stop empty projects creating target/webapp.
 * Change: Add dependency from generated jws client source directory
           to the source wsdl in the wsgen addon.
 * Fixed:  Fixed regression in gwt addon due to "pathing_jar"

Modified: buildr/trunk/lib/buildr/core/assets.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/assets.rb?rev=1530502&r1=1530501&r2=1530502&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/assets.rb (original)
+++ buildr/trunk/lib/buildr/core/assets.rb Wed Oct  9 06:06:06 2013
@@ -41,13 +41,16 @@ module Buildr #:nodoc:
       def initialize(*args) #:nodoc:
         super
         enhance do
-          mkdir_p name
-          self.paths.flatten.compact.collect do |a|
-            a.is_a?(String) ? project.file(a) : a
-          end.each do |a|
-            a.invoke if a.respond_to?(:invoke)
-          end.each do |asset|
-            cp_r Dir["#{asset}/*"], "#{name}/"
+          paths = self.paths.flatten.compact
+          if paths.size > 0
+            mkdir_p name
+            paths.collect do |a|
+              a.is_a?(String) ? project.file(a) : a
+            end.each do |a|
+              a.invoke if a.respond_to?(:invoke)
+            end.each do |asset|
+              cp_r Dir["#{asset}/*"], "#{name}/"
+            end
           end
         end
       end



Mime
View raw message