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 23:06:57 UTC
[1/3] ode git commit: re-adding pom with dependency builder.
Repository: ode
Updated Branches:
refs/heads/ode-1.3.x 37c6cecfa -> 803d4ef64
re-adding pom with dependency builder.
Project: http://git-wip-us.apache.org/repos/asf/ode/repo
Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/31d2afbf
Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/31d2afbf
Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/31d2afbf
Branch: refs/heads/ode-1.3.x
Commit: 31d2afbf2416aad61a1035d786830469471c9932
Parents: 37c6cec
Author: Tammo van Lessen <tv...@gmail.com>
Authored: Thu Jun 11 14:07:18 2015 +0200
Committer: Tammo van Lessen <tv...@gmail.com>
Committed: Thu Jun 11 23:03:14 2015 +0200
----------------------------------------------------------------------
tasks/pomwithdependencies.rake | 81 +++++++++++++++++++++++++++++++++++++
1 file changed, 81 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ode/blob/31d2afbf/tasks/pomwithdependencies.rake
----------------------------------------------------------------------
diff --git a/tasks/pomwithdependencies.rake b/tasks/pomwithdependencies.rake
new file mode 100644
index 0000000..b12348e
--- /dev/null
+++ b/tasks/pomwithdependencies.rake
@@ -0,0 +1,81 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with this
+# work for additional information regarding copyright ownership. The ASF
+# licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+module Buildr
+
+ #
+ # Module to add project dependencies to our artifact's pom files.
+ # Inspired by BUILDR-486 and https://github.com/jvshahid/buildr-dependency-extensions.
+ #
+ 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
+ end
+ end
+
+ module ActsAsArtifact
+ # monkey patch Buildr's the pom xml generation
+ def pom_xml
+ Proc.new do
+ xml = Builder::XmlMarkup.new(:indent=>2)
+ xml.instruct!
+ xml.project do
+ xml.modelVersion '4.0.0'
+ xml.groupId group
+ xml.artifactId id
+ xml.version version
+ xml.classifier classifier if classifier
+ unless @dependencies.nil? || @dependencies.empty?
+ xml.dependencies do
+ @dependencies.uniq.each do |art|
+ xml.dependency do
+ xml.groupId art[:group]
+ xml.artifactId art[:id]
+ xml.version art[:version]
+ xml.classifier art[:classifier] if art.has_key? :classifier
+ xml.scope art[:scope] if art.has_key? :scope
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+
+ # make ActAsArtifac dependency aware
+ def dependencies=(dependencies)
+ @dependencies = dependencies
+ end
+
+ def dependencies
+ @dependencies ||= POM.load(self).dependencies.map { |spec| artifact(spec) } if self.is_a? Artifact
+ @dependencies ||= []
+ end
+
+ end
+end
+
+# use this module for all projects.
+class Buildr::Project
+ include Buildr::PomWithDependencies
+end
[3/3] ode git commit: also mount $HOME/.buildr into docker container.
Posted by va...@apache.org.
also mount $HOME/.buildr into docker container.
Project: http://git-wip-us.apache.org/repos/asf/ode/repo
Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/803d4ef6
Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/803d4ef6
Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/803d4ef6
Branch: refs/heads/ode-1.3.x
Commit: 803d4ef64368f24921c6e88f0af2cb33dc5c583b
Parents: d78d216
Author: Tammo van Lessen <tv...@gmail.com>
Authored: Thu Jun 11 22:26:36 2015 +0200
Committer: Tammo van Lessen <tv...@gmail.com>
Committed: Thu Jun 11 23:05:35 2015 +0200
----------------------------------------------------------------------
ci-build.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ode/blob/803d4ef6/ci-build.sh
----------------------------------------------------------------------
diff --git a/ci-build.sh b/ci-build.sh
index 3f8a7bf..76adcc9 100755
--- a/ci-build.sh
+++ b/ci-build.sh
@@ -33,4 +33,4 @@ BUILDR_COMMAND="su $CONTAINER_USERNAME -c '/opt/jruby/bin/jruby -S buildr $BUILD
FINAL_COMMAND="$CREATE_USER_COMMAND && $BUNDLER_COMMAND && $BUILDR_COMMAND"
-docker run --rm -e JAVADOC=no -e JAVA_OPTS -v `pwd`:/workspace -v $HOME/.m2:/home/dummy/.m2 -v /tmp:/tmp --entrypoint bash vanto/apache-buildr:latest-jruby-jdk7 -c "$FINAL_COMMAND"
\ No newline at end of file
+docker run --rm -e JAVADOC=no -e JAVA_OPTS -v `pwd`:/workspace -v $HOME/.m2:/home/dummy/.m2 -v $HOME/.buildr:/home/dummy/.buildr -v /tmp:/tmp --entrypoint bash vanto/apache-buildr:latest-jruby-jdk7 -c "$FINAL_COMMAND"
[2/3] ode git commit: small improvement for POM creation.
Posted by va...@apache.org.
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/d78d216e
Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/d78d216e
Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/d78d216e
Branch: refs/heads/ode-1.3.x
Commit: d78d216e75405408bea5a686492cf32099e62bef
Parents: 31d2afb
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 23:03:39 2015 +0200
----------------------------------------------------------------------
tasks/pomwithdependencies.rake | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ode/blob/d78d216e/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