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 2013/10/01 19:05:45 UTC

[1/5] git commit: e.printStackTrace() removed and loglevel adjusted.

Updated Branches:
  refs/heads/master 754310dcd -> ec3cb56c2


e.printStackTrace() removed and loglevel adjusted.


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

Branch: refs/heads/master
Commit: 7150fd329f687883d50eb58b7bf0fbb94ad58fc8
Parents: 754310d
Author: Tammo van Lessen <tv...@gmail.com>
Authored: Tue Oct 1 00:46:38 2013 +0200
Committer: Tammo van Lessen <tv...@gmail.com>
Committed: Tue Oct 1 18:56:31 2013 +0200

----------------------------------------------------------------------
 .../ode/bpel/elang/xpath20/runtime/JaxpFunctionResolver.java      | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ode/blob/7150fd32/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/JaxpFunctionResolver.java
----------------------------------------------------------------------
diff --git a/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/JaxpFunctionResolver.java b/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/JaxpFunctionResolver.java
index 3592833..aa29367 100644
--- a/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/JaxpFunctionResolver.java
+++ b/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/JaxpFunctionResolver.java
@@ -307,8 +307,7 @@ public class JaxpFunctionResolver implements XPathFunctionResolver {
             try {
                 result = XslTransformHandler.getInstance().transform(_ectx.getProcessQName(), xslUri, source, parametersMap, resolver);
             } catch (Exception e) {
-                __log.error("Could not transform XSL sheet " + args.get(0) + " on element " + DOMUtils.domToString(varElmt), e);
-                e.printStackTrace();
+            	__log.warn("Could not transform XSL sheet " + args.get(0) + " on element " + DOMUtils.domToString(varElmt), e);
                 throw new XPathFunctionException(
                         new FaultException(_oxpath.getOwner().constants.qnSubLanguageExecutionFault,
                                 e.toString()));


[3/5] git commit: buildr extension to add dependencies to poms.

Posted by va...@apache.org.
buildr extension to add dependencies to poms.


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

Branch: refs/heads/master
Commit: e2c678dbe39ebe517c6eeb5af1e4f472a2dfe471
Parents: 86f8199
Author: Tammo van Lessen <tv...@gmail.com>
Authored: Tue Oct 1 18:40:33 2013 +0200
Committer: Tammo van Lessen <tv...@gmail.com>
Committed: Tue Oct 1 18:59:33 2013 +0200

----------------------------------------------------------------------
 tasks/pomwithdependencies.rake | 81 +++++++++++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ode/blob/e2c678db/tasks/pomwithdependencies.rake
----------------------------------------------------------------------
diff --git a/tasks/pomwithdependencies.rake b/tasks/pomwithdependencies.rake
new file mode 100644
index 0000000..167a58b
--- /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


[4/5] git commit: remove our GPG signing code in favor of the one that is now shipped with Buildr.

Posted by va...@apache.org.
remove our GPG signing code in favor of the one that is now shipped with Buildr.


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

Branch: refs/heads/master
Commit: 4ec5d73ac45c9c30df579a3f77e8c1418f41f695
Parents: e2c678d
Author: Tammo van Lessen <tv...@gmail.com>
Authored: Tue Oct 1 18:50:21 2013 +0200
Committer: Tammo van Lessen <tv...@gmail.com>
Committed: Tue Oct 1 19:02:33 2013 +0200

----------------------------------------------------------------------
 Rakefile | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ode/blob/4ec5d73a/Rakefile
----------------------------------------------------------------------
diff --git a/Rakefile b/Rakefile
index f96d1a0..0eee92e 100644
--- a/Rakefile
+++ b/Rakefile
@@ -21,6 +21,7 @@ require "buildr/openjpa"
 require "buildr/javacc"
 require "buildr/jetty"
 require "buildr/hibernate"
+require "buildr/gpg"
 
 require File.join(File.dirname(__FILE__), 'repositories.rb')
 require File.join(File.dirname(__FILE__), 'dependencies.rb')
@@ -611,8 +612,6 @@ define "ode" do
   package_with_sources :except => ["jbi-karaf-examples:helloworld2-osgi", "jbi-karaf-examples:ping-pong-osgi"]
   package_with_javadoc :except => ["jbi-karaf-examples:helloworld2-osgi", "jbi-karaf-examples:ping-pong-osgi"] unless ENV["JAVADOC"] =~ /^(no|off|false|skip)$/i
 
-  gpg_sign_before_upload
-  
   task :pmd do
     pmd_classpath = transitive('pmd:pmd:jar:4.2.5').each(&:invoke).map(&:to_s).join(File::PATH_SEPARATOR)
     mkdir_p _(:reports)
@@ -720,7 +719,5 @@ define "apache-ode" do
   package(:zip, :id=>"#{id}-docs").include(doc.from(project("ode").projects).
     using(:javadoc, :windowtitle=>"Apache ODE #{project.version}").target, :as=>"#{id}-docs-#{version}") unless ENV["JAVADOC"] =~ /^(no|off|false|skip)$/i
     
-  # sign packages
-  gpg_sign_before_upload
 
 end


[2/5] git commit: dependency and repository cleanup.

Posted by va...@apache.org.
dependency and repository cleanup.


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

Branch: refs/heads/master
Commit: 86f8199a8fb332ab98a49240eb256b9c462e372e
Parents: 7150fd3
Author: Tammo van Lessen <tv...@gmail.com>
Authored: Tue Oct 1 00:47:33 2013 +0200
Committer: Tammo van Lessen <tv...@gmail.com>
Committed: Tue Oct 1 18:59:13 2013 +0200

----------------------------------------------------------------------
 dependencies.rb | 2 +-
 repositories.rb | 8 +-------
 2 files changed, 2 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ode/blob/86f8199a/dependencies.rb
----------------------------------------------------------------------
diff --git a/dependencies.rb b/dependencies.rb
index baa7cf3..6962fbd 100644
--- a/dependencies.rb
+++ b/dependencies.rb
@@ -103,7 +103,7 @@ LOG4J               = "log4j:log4j:jar:1.2.17"
 OPENJPA             = ["org.apache.openjpa:openjpa:jar:1.2.1",
                        "net.sourceforge.serp:serp:jar:1.13.1"]
 
-SAXON               = group("saxon", "saxon-xpath", "saxon-dom", "saxon-xqj", :under=>"net.sf.saxon", :version=>"9.1.0.8")
+SAXON               = ["net.sourceforge.saxon:saxon:jar:9.1.0.8", "net.sourceforge.saxon:saxon:jar:xpath:9.1.0.8", "net.sourceforge.saxon:saxon:jar:dom:9.1.0.8", "net.sourceforge.saxon:saxon:jar:xqj:9.1.0.8"]
 SERVICEMIX          = [
                         group("servicemix-core",
                             :under=>"org.apache.servicemix", :version=>"3.3"),

http://git-wip-us.apache.org/repos/asf/ode/blob/86f8199a/repositories.rb
----------------------------------------------------------------------
diff --git a/repositories.rb b/repositories.rb
index 18fbbaf..f6a40fa 100644
--- a/repositories.rb
+++ b/repositories.rb
@@ -13,13 +13,7 @@
 #    See the License for the specific language governing permissions and
 #    limitations under the License.
 
-repositories.remote << "http://repo.maven.apache.org/maven2"
-repositories.remote << "http://people.apache.org/repo/m2-incubating-repository"
 repositories.remote << "http://repo1.maven.org/maven2"
-repositories.remote << "http://people.apache.org/repo/m2-snapshot-repository"
-repositories.remote << "http://download.java.net/maven/2"
-repositories.remote << "http://svn.apache.org/repos/asf/servicemix/m2-repo"
+repositories.remote << "http://people.apache.org/~vanto/m2/"
 repositories.remote << "https://repository.apache.org/content/groups/snapshots"
-repositories.remote << "http://www.aqute.biz/repo" # TODO: remove me
-repositories.remote << "http://www.intalio.org/public/maven2" # TODO: remove me
 repositories.release_to[:url] ||= "sftp://guest@localhost/home/guest"


[5/5] git commit: JaCoCo test coverage for tests added.

Posted by va...@apache.org.
JaCoCo test coverage for tests added.


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

Branch: refs/heads/master
Commit: ec3cb56c24c721f59347b76f74e51c0b045457df
Parents: 4ec5d73
Author: Tammo van Lessen <tv...@gmail.com>
Authored: Tue Oct 1 18:50:58 2013 +0200
Committer: Tammo van Lessen <tv...@gmail.com>
Committed: Tue Oct 1 19:02:43 2013 +0200

----------------------------------------------------------------------
 tasks/jacoco.rake | 228 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 228 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ode/blob/ec3cb56c/tasks/jacoco.rake
----------------------------------------------------------------------
diff --git a/tasks/jacoco.rake b/tasks/jacoco.rake
new file mode 100644
index 0000000..08b5493
--- /dev/null
+++ b/tasks/jacoco.rake
@@ -0,0 +1,228 @@
+# 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
+  # Initial support for JaCoCo coverage reports.
+  # WARNING: Experimental and may change radically.
+  module JaCoCo
+    class << self
+      VERSION = '0.5.10.201208310627'
+
+      def version
+        @version || Buildr.settings.build['jacoco'] || VERSION
+      end
+
+      def version=(value)
+        @version = value
+      end
+
+      def agent_spec
+        ["org.jacoco:org.jacoco.agent:jar:runtime:#{version}"]
+      end
+
+      def ant_spec
+        [
+          "org.jacoco:org.jacoco.report:jar:#{version}",
+          "org.jacoco:org.jacoco.core:jar:#{version}",
+          "org.jacoco:org.jacoco.ant:jar:#{version}",
+          'asm:asm:jar:3.3.1',
+          'asm:asm-commons:jar:3.3.1',
+          'asm:asm-tree:jar:3.3.1'
+        ]
+      end
+    end
+
+    class Config
+
+      attr_writer :enabled
+
+      def enabled?
+        @enabled.nil? ? true : @enabled
+      end
+
+      attr_writer :destfile
+
+      def destfile
+        @destfile || "#{self.report_dir}/jacoco.cov"
+      end
+
+      attr_writer :output
+
+      def output
+        @output || 'file'
+      end
+
+      attr_accessor :sessionid
+      attr_accessor :address
+      attr_accessor :port
+      attr_accessor :classdumpdir
+      attr_accessor :dumponexit
+      attr_accessor :append
+      attr_accessor :exclclassloader
+
+      def includes
+        @includes ||= []
+      end
+
+      def excludes
+        @excludes ||= []
+      end
+
+      attr_writer :report_dir
+
+      def report_dir
+        @report_dir || project._(:reports, :jacoco)
+      end
+
+      attr_writer :generate_xml
+
+      def generate_xml?
+        @generate_xml.nil? ? false : @generate_xml
+      end
+
+      attr_writer :xml_output_file
+
+      def xml_output_file
+        @xml_output_file || "#{self.report_dir}/jacoco.xml"
+      end
+
+      attr_writer :generate_html
+
+      def generate_html?
+        @generate_html.nil? ? false : @generate_html
+      end
+
+      attr_writer :html_output_directory
+
+      def html_output_directory
+        @html_output_directory || "#{self.report_dir}/jacoco"
+      end
+
+      protected
+
+      def initialize(project)
+        @project = project
+      end
+
+      attr_reader :project
+
+    end
+
+    module ProjectExtension
+      include Extension
+
+      def jacoco
+        @jacoco ||= Buildr::JaCoCo::Config.new(project)
+      end
+
+      after_define do |project|
+        unless project.test.compile.target.nil? || !project.jacoco.enabled?
+          project.test.setup do
+            agent_jar = Buildr.artifacts(Buildr::JaCoCo.agent_spec).each(&:invoke).map(&:to_s).join('')
+            options = []
+            ["destfile",
+             "append",
+             "exclclassloader",
+             "sessionid",
+             "dumponexit",
+             "output",
+             "address",
+             "port",
+             "classdumpdir"].each do |option|
+              value = project.jacoco.send(option.to_sym)
+              options << "#{option}=#{value}" unless value.nil?
+            end
+            options << "includes=#{project.jacoco.includes.join(':')}" unless project.jacoco.includes.empty?
+            options << "excludes=#{project.jacoco.excludes.join(':')}" unless project.jacoco.excludes.empty?
+
+            agent_config = "-javaagent:#{agent_jar}=#{options.join(',')}"
+            project.test.options[:java_args] = (project.test.options[:java_args] || []) + [agent_config]
+          end
+          namespace 'jacoco' do
+            if project.jacoco.generate_xml?
+              desc "Generate JaCoCo reports."
+              task 'reports' do
+                Buildr.ant "jacoco" do |ant|
+                  ant.taskdef(:resource => "org/jacoco/ant/antlib.xml") do |ant|
+                    ant.classpath :path => Buildr.artifacts(Buildr::JaCoCo.ant_spec).each(&:invoke).map(&:to_s).join(File::PATH_SEPARATOR)
+                  end
+                  ant.report do |ant|
+                    ant.executiondata do |ant|
+                      ant.file :file => project.jacoco.destfile
+                    end
+
+                    ant.structure(:name => project.name) do |ant|
+                      if project.compile.target
+                        ant.classfiles do |ant|
+                          ant.fileset :dir => project.compile.target
+                        end
+                      end
+                      ant.sourcefiles(:encoding => "UTF-8") do |ant|
+                        project.compile.sources.each do |path|
+                          ant.fileset :dir => path.to_s
+                        end
+                      end
+                    end
+
+                    ant.xml :destfile => project.jacoco.xml_output_file if project.jacoco.generate_xml?
+                    ant.html :destdir => project.jacoco.html_output_directory if project.jacoco.generate_html?
+                  end
+                end
+              end
+            end
+          end
+        end
+      end
+      namespace 'jacoco' do
+        desc "Generate JaCoCo reports."
+        task 'report' do
+          Buildr.ant "jacoco" do |ant|
+            ant.taskdef(:resource => "org/jacoco/ant/antlib.xml") do |ant|
+              ant.classpath :path => Buildr.artifacts(Buildr::JaCoCo.ant_spec).each(&:invoke).map(&:to_s).join(File::PATH_SEPARATOR)
+            end
+            ant.report do |ant|
+              ant.executiondata do |ant|
+                Buildr.projects.each do |project|
+                  ant.fileset :file=>project.jacoco.destfile if File.exist?(project.jacoco.destfile)
+                end
+              end
+
+              ant.structure(:name => "Jacoco Report") do |ant|
+                ant.classfiles do |ant|
+                  Buildr.projects.map(&:compile).map(&:target).flatten.map(&:to_s).each do |src|
+                    ant.fileset :dir=>src.to_s if File.exist?(src)
+                  end
+                end
+                ant.sourcefiles(:encoding => "UTF-8") do |ant|
+                  Buildr.projects.map(&:compile).map(&:sources).flatten.map(&:to_s).each do |src|
+                    ant.fileset :dir=>src.to_s if File.exist?(src)
+                  end
+                end
+              end
+
+              ant.html :destdir => "reports/jacoco"
+              ant.xml :destfile => "reports/jacoco/jacoco.xml"
+              ant.csv :destfile => "reports/jacoco/jacoco.csv"
+            end
+          end
+        end
+      end
+    end
+  end
+end
+
+class Buildr::Project
+  include Buildr::JaCoCo::ProjectExtension
+end
\ No newline at end of file