You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by va...@apache.org on 2015/06/11 16:22:43 UTC

ode git commit: small improvement for POM creation.

Repository: ode
Updated Branches:
  refs/heads/master a43d53fab -> 9f5acb1c0


small improvement for POM creation.


Project: http://git-wip-us.apache.org/repos/asf/ode/repo
Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/9f5acb1c
Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/9f5acb1c
Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/9f5acb1c

Branch: refs/heads/master
Commit: 9f5acb1c0528488fc84e8556fc7c30aae359075d
Parents: a43d53f
Author: Tammo van Lessen <tv...@gmail.com>
Authored: Thu Jun 11 16:22:37 2015 +0200
Committer: Tammo van Lessen <tv...@gmail.com>
Committed: Thu Jun 11 16:22:37 2015 +0200

----------------------------------------------------------------------
 tasks/pomwithdependencies.rake | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ode/blob/9f5acb1c/tasks/pomwithdependencies.rake
----------------------------------------------------------------------
diff --git a/tasks/pomwithdependencies.rake b/tasks/pomwithdependencies.rake
index b12348e..03b6371 100644
--- a/tasks/pomwithdependencies.rake
+++ b/tasks/pomwithdependencies.rake
@@ -22,14 +22,16 @@ module Buildr
     module PomWithDependencies
         include Extension
 
-    # We have to add the dependencies to the monkey patched POM before the dependencies are
-    # changed in the compile, test and run after_define
-    after_define(:compile) do |project|
-        project.package.pom.dependencies =
-        [project.compile.dependencies.select {|dep| dep.respond_to?(:to_spec) && dep.respond_to?(:to_hash)}.map { |a| a.to_hash.merge(:scope => 'compile') },
-            project.test.dependencies.select {|dep| dep.respond_to?(:to_spec) && dep.respond_to?(:to_hash) && !project.compile.dependencies.include?(dep)}.map { |a| a.to_hash.merge(:scope => 'test') },
-            project.run.classpath.select {|dep| dep.respond_to?(:to_spec) && dep.respond_to?(:to_hash) && !project.compile.dependencies.include?(dep)}.map { |a| a.to_hash.merge(:scope => 'runtime') }
-            ].flatten
+        # We have to add the dependencies to the monkey patched POM before the dependencies are
+        # changed in the compile, test and run after_define
+        after_define(:compile) do |project|
+            deps =
+                [project.compile.dependencies.select {|dep| dep.respond_to?(:to_spec) && dep.respond_to?(:to_hash)}.map { |a| a.to_hash.merge(:scope => 'compile') },
+                project.test.dependencies.select {|dep| dep.respond_to?(:to_spec) && dep.respond_to?(:to_hash) && !project.compile.dependencies.include?(dep)}.map { |a| a.to_hash.merge(:scope => 'test') },
+                project.run.classpath.select {|dep| dep.respond_to?(:to_spec) && dep.respond_to?(:to_hash) && !project.compile.dependencies.include?(dep)}.map { |a| a.to_hash.merge(:scope => 'runtime') }
+                ].flatten
+
+            project.packages.each {|pack| pack.pom.dependencies = deps}
         end
     end