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 17:06:47 UTC
svn commit: r1060845 - in /ode/trunk: .gitignore Rakefile tasks/helpers.rake
Author: vanto
Date: Wed Jan 19 16:06:46 2011
New Revision: 1060845
URL: http://svn.apache.org/viewvc?rev=1060845&view=rev
Log:
Fix OSGi version used in Require-Bundle, thanks to Gert Vanthienen.
Added:
ode/trunk/tasks/helpers.rake
Modified:
ode/trunk/.gitignore
ode/trunk/Rakefile
Modified: ode/trunk/.gitignore
URL: http://svn.apache.org/viewvc/ode/trunk/.gitignore?rev=1060845&r1=1060844&r2=1060845&view=diff
==============================================================================
--- ode/trunk/.gitignore (original)
+++ ode/trunk/.gitignore Wed Jan 19 16:06:46 2011
@@ -18,3 +18,4 @@ bin
target
reports
test-output
+_buildr.rb
Modified: ode/trunk/Rakefile
URL: http://svn.apache.org/viewvc/ode/trunk/Rakefile?rev=1060845&r1=1060844&r2=1060845&view=diff
==============================================================================
--- ode/trunk/Rakefile (original)
+++ ode/trunk/Rakefile Wed Jan 19 16:06:46 2011
@@ -456,8 +456,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
@@ -474,7 +474,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'] = ""
@@ -495,7 +495,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')
@@ -513,7 +513,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/trunk/tasks/helpers.rake
URL: http://svn.apache.org/viewvc/ode/trunk/tasks/helpers.rake?rev=1060845&view=auto
==============================================================================
--- ode/trunk/tasks/helpers.rake (added)
+++ ode/trunk/tasks/helpers.rake Wed Jan 19 16:06:46 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