You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by do...@apache.org on 2013/10/23 01:42:14 UTC
svn commit: r1534852 - in /buildr/trunk: CHANGELOG lib/buildr/core/assets.rb
Author: donaldp
Date: Tue Oct 22 23:42:14 2013
New Revision: 1534852
URL: http://svn.apache.org/r1534852
Log:
BUILDR-689 - Define assets task before the project is defined to avoid "undefined method `project='" if the project attempts to generate into the same directory.
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=1534852&r1=1534851&r2=1534852&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Tue Oct 22 23:42:14 2013
@@ -1,4 +1,7 @@
1.4.15 (Pending)
+* Fixed: BUILDR-689 - Define assets task before the project is
+ defined to avoid "undefined method `project='" if the
+ project attempts to generate into the same directory.
* Added: BUILDR-679 - Support uploading to a snapshot repository
defined by repositories.snapshot_to if the artifact is
a snapshot. Submitted by Tammo van Lessen.
Modified: buildr/trunk/lib/buildr/core/assets.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/assets.rb?rev=1534852&r1=1534851&r2=1534852&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/assets.rb (original)
+++ buildr/trunk/lib/buildr/core/assets.rb Tue Oct 22 23:42:14 2013
@@ -72,6 +72,11 @@ module Buildr #:nodoc:
Project.local_task("assets")
end
+ before_define do |project|
+ # Force the construction of the assets task
+ project.assets.paths
+ end
+
# Access the asset task
def assets
if @assets.nil?
@@ -82,11 +87,6 @@ module Buildr #:nodoc:
end
@assets
end
-
- after_define do |project|
- # Force construction
- project.assets
- end
end
end
end