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 2011/01/19 16:55:04 UTC

svn commit: r1060839 - in /ode/branches/ode-1.3.5.x: .gitignore Rakefile tasks/helpers.rake

Author: vanto
Date: Wed Jan 19 15:55:04 2011
New Revision: 1060839

URL: http://svn.apache.org/viewvc?rev=1060839&view=rev
Log:
Fix OSGi version used in Require-Bundle, thanks to Gert Vanthienen.

Added:
    ode/branches/ode-1.3.5.x/tasks/helpers.rake
Modified:
    ode/branches/ode-1.3.5.x/.gitignore
    ode/branches/ode-1.3.5.x/Rakefile

Modified: ode/branches/ode-1.3.5.x/.gitignore
URL: http://svn.apache.org/viewvc/ode/branches/ode-1.3.5.x/.gitignore?rev=1060839&r1=1060838&r2=1060839&view=diff
==============================================================================
--- ode/branches/ode-1.3.5.x/.gitignore (original)
+++ ode/branches/ode-1.3.5.x/.gitignore Wed Jan 19 15:55:04 2011
@@ -18,3 +18,4 @@ bin
 target
 reports
 test-output
+_buildr.rb

Modified: ode/branches/ode-1.3.5.x/Rakefile
URL: http://svn.apache.org/viewvc/ode/branches/ode-1.3.5.x/Rakefile?rev=1060839&r1=1060838&r2=1060839&view=diff
==============================================================================
--- ode/branches/ode-1.3.5.x/Rakefile (original)
+++ ode/branches/ode-1.3.5.x/Rakefile Wed Jan 19 15:55:04 2011
@@ -450,8 +450,8 @@ define "ode" do
       BUNDLE_VERSIONS.each {|key, value| bnd[key] = value }
       bnd['Bundle-Name'] = "Apache ODE :: Commands"
       bnd['Bundle-Version'] = VERSION_NUMBER
-      bnd['Require-Bundle'] = "org.apache.ode.ode-jbi-bundle;version=#{VERSION_NUMBER}"
-      bnd['Import-Package'] = 'org.osgi.service.command,org.apache.karaf.shell.console;version="[2.0,2.1)",*'
+      bnd['Require-Bundle'] = "org.apache.ode.ode-jbi-bundle;bundle-version=#{osgi_version_for(VERSION_NUMBER)}"
+      bnd['Import-Package'] = 'org.osgi.service.command,org.apache.karaf.shell.console;version="[2.1,2.2)",*'
       bnd['Private-Package'] = "org.apache.ode.karaf.commands;version=#{VERSION_NUMBER}"
       bnd['Include-Resource'] = _('src/main/resources')
     end
@@ -468,7 +468,7 @@ define "ode" do
         bnd['Bundle-Name'] = "Apache ODE :: Hello World Example"
         bnd['Bundle-SymbolicName'] = "org.apache.ode.examples-helloworld2-bundle"
         bnd['Bundle-Version'] = VERSION_NUMBER
-        bnd['Require-Bundle'] = "org.apache.ode.ode-jbi-bundle;version=#{VERSION_NUMBER}"
+        bnd['Require-Bundle'] = "org.apache.ode.ode-jbi-bundle;bundle-version=#{osgi_version_for(VERSION_NUMBER)}"
         bnd['Import-Package'] = "org.apache.servicemix.cxfbc,org.apache.servicemix.common.osgi"
         bnd['Export-Package'] = ""
         bnd['-exportcontents'] = ""
@@ -489,7 +489,7 @@ define "ode" do
         bnd['Bundle-Name'] = "Apache ODE :: Ping-Pong Example"
         bnd['Bundle-SymbolicName'] = "org.apache.ode.examples-ping-pong-bundle"
         bnd['Bundle-Version'] = VERSION_NUMBER
-        bnd['Require-Bundle'] = "org.apache.ode.ode-jbi-bundle;version=#{VERSION_NUMBER}"
+        bnd['Require-Bundle'] = "org.apache.ode.ode-jbi-bundle;bundle-version=#{osgi_version_for(VERSION_NUMBER)}"
         bnd['Import-Package'] = "org.apache.servicemix.cxfbc,org.apache.servicemix.common.osgi"
         bnd['Export-Package'] = "org.apache.ode.ping"
         bnd['Include-Resource'] = _('src/main/resources')
@@ -507,7 +507,7 @@ define "ode" do
       bnd['Bundle-Name'] = "Apache ODE :: PMAPI HTTP Binding"
       bnd['Bundle-SymbolicName'] = "org.apache.ode-pmapi-httpbinding"
       bnd['Bundle-Version'] = VERSION_NUMBER
-      bnd['Require-Bundle'] = "org.apache.ode.ode-jbi-bundle;version=#{VERSION_NUMBER}"
+      bnd['Require-Bundle'] = "org.apache.ode.ode-jbi-bundle;bundle-version=#{osgi_version_for(VERSION_NUMBER)}"
       bnd['Import-Package'] = "org.apache.servicemix.cxfbc,org.apache.servicemix.common.osgi"
       bnd['-exportcontents'] = ""
       bnd['Include-Resource'] = _('src/main/resources')

Added: ode/branches/ode-1.3.5.x/tasks/helpers.rake
URL: http://svn.apache.org/viewvc/ode/branches/ode-1.3.5.x/tasks/helpers.rake?rev=1060839&view=auto
==============================================================================
--- ode/branches/ode-1.3.5.x/tasks/helpers.rake (added)
+++ ode/branches/ode-1.3.5.x/tasks/helpers.rake Wed Jan 19 15:55:04 2011
@@ -0,0 +1,27 @@
+# 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.
+
+def osgi_version_for(version)
+  parts = version.split(/[\.,-]/)
+  result = Array.new(3, 0)
+  parts.each_index { |i|
+    if (result.size == 3) then
+      if (parts[i] =~ /\d+/) then result[i] = parts[i] else result = result << parts[i] end
+    else
+      result[3] = [result[3], parts[i]].join("-")
+    end
+  }
+  result.join(".")
+end