Author: vanto
Date: Tue Dec  7 00:06:41 2010
New Revision: 1042871

URL: http://svn.apache.org/viewvc?rev=1042871&view=rev
Log:
buildr upgrade to 1.4.3

Added:
    ode/branches/ode-1.3.5.x/tasks/gpg.rake
Modified:
    ode/branches/ode-1.3.5.x/Rakefile
    ode/branches/ode-1.3.5.x/tasks/ws-security.rake

Modified: ode/branches/ode-1.3.5.x/Rakefile
URL: 
http://svn.apache.org/viewvc/ode/branches/ode-1.3.5.x/Rakefile?rev=1042871&r1=1042870&r2=1042871&view=diff
==============================================================================
--- ode/branches/ode-1.3.5.x/Rakefile (original)
+++ ode/branches/ode-1.3.5.x/Rakefile Tue Dec  7 00:06:41 2010
@@ -14,7 +14,7 @@
 #    limitations under the License.
 #
 
-gem "buildr", "~>1.3"
+gem "buildr", "~>1.4.3"
 require "buildr"
 require "buildr/xmlbeans.rb"
 require "buildr/openjpa"
@@ -22,11 +22,28 @@ require "buildr/javacc"
 require "buildr/jetty"
 require "buildr/hibernate"
 
+Buildr.settings.build['jmock'] = "1.2.0"
+
+Buildr::Hibernate::REQUIRES[:xdoclet] = Buildr.group("xdoclet", 
"xdoclet-xdoclet-module", "xdoclet-hibernate-module", 
+ :under=>"xdoclet", :version=>"1.2.3") + ["xdoclet:xjavadoc:jar:1.1-j5"] 
+
+# dirty workaround for BUILDR-541/BUILDR-508
+Java.classpath << Buildr::OpenJPA::REQUIRES
+
 require File.join(File.dirname(__FILE__), 'repositories.rb')
 require File.join(File.dirname(__FILE__), 'dependencies.rb')
 
 # Keep this structure to allow the build system to update version numbers.
-VERSION_NUMBER = "1.3.5-SNAPSHOT"
+VERSION_NUMBER = "1.3.5rc1"
+
+# Apache Nexus Repositories
+if VERSION_NUMBER =~ /SNAPSHOT/
+    # Apache Development Snapshot Repository
+    repositories.release_to[:url] = 
'https://repository.apache.org/content/repositories/snapshots'
+else
+    # Apache Release Distribution Repository
+    repositories.release_to[:url] = 
'https://repository.apache.org/service/local/staging/deploy/maven2'
+end
 
 BUNDLE_VERSIONS = {
   "ode.version" => VERSION_NUMBER,
@@ -40,7 +57,7 @@ BUNDLE_VERSIONS = {
   "servicemix.shared.version" => "2009.02-SNAPSHOT",
   "servicemix.specs.version" => "1.4-SNAPSHOT",
 }
-Release.find.tag_name = lambda { |version| "APACHE_ODE_#{version.upcase}" } if 
Release.find
+Release.tag_name = lambda { |version| "APACHE_ODE_#{version.upcase}" } if 
Release
 
 desc "Apache ODE"
 define "ode" do
@@ -291,16 +308,12 @@ define "ode" do
     dao_hibernate = project("dao-hibernate").compile.target
     bpel_store = project("bpel-store").compile.target
 
-    Buildr::Hibernate::REQUIRES[:xdoclet] =  Buildr.group("xdoclet", 
"xdoclet-xdoclet-module", "xdoclet-hibernate-module",
+    hibernate_requires[:xdoclet] = Buildr.group("xdoclet", 
"xdoclet-xdoclet-module", "xdoclet-hibernate-module", 
       :under=>"xdoclet", :version=>"1.2.3") + ["xdoclet:xjavadoc:jar:1.1-j5"] 
+ projects("dao-hibernate")
 
     export = lambda do |properties, source, target|
       file(target=>[properties, source]) do |task|
         mkpath File.dirname(target), :verbose=>false
-        # Protection against a buildr bug until the fix is released, avoids 
build failure
-
-        class << task ; attr_accessor :ant ; end
-        task.enhance { |task| task.ant = Buildr::Hibernate.schemaexport }
        
         hibernate_schemaexport target do |task, ant|
           ant.schemaexport(:properties=>properties.to_s, :quiet=>"yes", 
:text=>"yes", :delimiter=>";",
@@ -519,6 +532,11 @@ define "ode" do
      package(:jar).with :manifest=>_("src/main/resources/META-INF/MANIFEST.MF")
   end
 
+  package_with_sources
+  package_with_javadoc unless ENV["JAVADOC"] =~ /^(no|off|false|skip)$/i
+
+  # sign artifacts
+  projects.each { |pr| pr.packages.each { |pkg| GPG.sign_and_upload(pkg) } }
 end
 
 define "apache-ode" do
@@ -599,12 +617,17 @@ define "apache-ode" do
     if File.exist?(".svn")
       `svn status -v`.reject { |l| l[0] == ?? || l[0] == ?D || l.strip.empty? 
|| l[0...3] == "---"}.
         map { |l| l.split.last }.reject { |f| File.directory?(f) }.
-        each { |f| zip.include f, :as=>f }
+        each { |f| zip.include f, :as=>f.gsub("\\", "/") }
     else
       zip.include Dir.pwd, :as=>"."
     end
   end
 
-  package(:zip, 
:id=>"#{id}-docs").include(javadoc(project("ode").projects).target) unless 
ENV["JAVADOC"] =~ /^(no|off|false|skip)$/i
+  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 disto packages
+  projects.each { |pr| pr.packages.each { |pkg| GPG.sign_and_upload(pkg) } }
+  # sign source and javadoc artifacts
+  packages.each { |pkg| GPG.sign_and_upload(pkg) }
 end
-

Added: ode/branches/ode-1.3.5.x/tasks/gpg.rake
URL: 
http://svn.apache.org/viewvc/ode/branches/ode-1.3.5.x/tasks/gpg.rake?rev=1042871&view=auto
==============================================================================
--- ode/branches/ode-1.3.5.x/tasks/gpg.rake (added)
+++ ode/branches/ode-1.3.5.x/tasks/gpg.rake Tue Dec  7 00:06:41 2010
@@ -0,0 +1,41 @@
+#
+#    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 GPG
+  extend self
+
+  def sign_task(pkg)
+    file(pkg.to_s + '.asc') do
+      puts "GPG signing #{pkg.to_spec}"
+      cmd = 'gpg',
+             '--local-user', ENV['GPG_USER'],
+             '--armor',
+             '--output', pkg.to_s + '.asc'
+      cmd += ['--passphrase', ENV['GPG_PASS']] if ENV['GPG_PASS']
+      cmd += ['--detach-sig', pkg]
+      #cmd << { :verbose => true }
+      #sh *cmd
+      system *cmd
+    end
+  end
+
+  def sign_and_upload(pkg)
+    artifact = Buildr.artifact(pkg.to_spec_hash.merge(:type => 
"#{pkg.type}.asc"))
+    artifact.from sign_task(pkg)
+    task(:upload).enhance [artifact.upload_task]
+  end
+end

Modified: ode/branches/ode-1.3.5.x/tasks/ws-security.rake
URL: 
http://svn.apache.org/viewvc/ode/branches/ode-1.3.5.x/tasks/ws-security.rake?rev=1042871&r1=1042870&r2=1042871&view=diff
==============================================================================
--- ode/branches/ode-1.3.5.x/tasks/ws-security.rake (original)
+++ ode/branches/ode-1.3.5.x/tasks/ws-security.rake Tue Dec  7 00:06:41 2010
@@ -1,4 +1,19 @@
-
+#
+#    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 WSSecurity
 
@@ -22,7 +37,7 @@ module WSSecurity
     def prepare_secure_services_tests(test_dir, file_pattern, modules)
       task(test_dir.to_sym) do 
         # copy the required modules
-        mkdir "#{test_dir}/modules" unless File.directory? 
"#{test_dir}/modules"
+        mkdir_p "#{test_dir}/modules" unless File.directory? 
"#{test_dir}/modules"
         Buildr.artifacts(modules).each(&:invoke)
         cp modules.map {|a| Buildr.repositories.locate(a)} , 
"#{test_dir}/modules"
         # generate one process per test


Reply via email to