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 2014/07/31 07:12:18 UTC
[04/50] git commit: 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.
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.
git-svn-id: https://svn.apache.org/repos/asf/buildr/trunk@1534852 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/buildr/repo
Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/dbb367cd
Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/dbb367cd
Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/dbb367cd
Branch: refs/heads/master
Commit: dbb367cd0f202292ddd2028a0a1ced2557bb5612
Parents: e9dd8f7
Author: Peter Donald <do...@apache.org>
Authored: Tue Oct 22 23:42:14 2013 +0000
Committer: Peter Donald <do...@apache.org>
Committed: Tue Oct 22 23:42:14 2013 +0000
----------------------------------------------------------------------
CHANGELOG | 3 +++
lib/buildr/core/assets.rb | 10 +++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/buildr/blob/dbb367cd/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index e170327..baf854f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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.
http://git-wip-us.apache.org/repos/asf/buildr/blob/dbb367cd/lib/buildr/core/assets.rb
----------------------------------------------------------------------
diff --git a/lib/buildr/core/assets.rb b/lib/buildr/core/assets.rb
index 3566d9c..bfd3b22 100644
--- a/lib/buildr/core/assets.rb
+++ b/lib/buildr/core/assets.rb
@@ -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