Skip to content

Commit b4b116d

Browse files
committed
JRUBY-2741: OSGify jruby.jar in the release jruby distribution (patch by Hendy Irawan)
git-svn-id: http://svn.codehaus.org/jruby/trunk/jruby@7437 961051c9-f516-0410-bf72-c9f7e237a7b7
1 parent 28a661e commit b4b116d

File tree

5 files changed

+31
-1
lines changed

5 files changed

+31
-1
lines changed

build.xml

+15-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@
217217
</and>
218218
</condition>
219219
<antcall target="_jarjar_internal_"/>
220-
220+
221221
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="${build.lib.dir}/jarjar-1.0rc7.jar"/>
222222
<jarjar destfile="${lib.dir}/jruby.jar" compress="false">
223223
<fileset dir="${jruby.classes.dir}"/>
@@ -228,6 +228,20 @@
228228
</manifest>
229229
<rule pattern="org.objectweb.asm.**" result="jruby.objectweb.asm.@1"/>
230230
</jarjar>
231+
<antcall target="_osgify-jruby_" />
232+
</target>
233+
234+
<!-- Use Bnd to wrap the JAR generated by jarjar in above task -->
235+
<target name="_osgify-jruby_">
236+
<filter token="JRUBY_VERSION" value="${version.jruby}"/>
237+
<copy file="${basedir}/jruby.bnd.template" tofile="${build.dir}/jruby.bnd" filtering="true"/>
238+
<taskdef resource="aQute/bnd/ant/taskdef.properties"
239+
classpath="${build.lib.dir}/bnd-0.0.249.jar"/>
240+
<bndwrap definitions="${build.dir}" output="${lib.dir}">
241+
<fileset file="${lib.dir}/jruby.jar" />
242+
</bndwrap>
243+
<move file="${lib.dir}/jruby.jar$" tofile="${lib.dir}/jruby.jar"
244+
overwrite="true" />
231245
</target>
232246

233247
<target name="_jarjar_internal_" unless="jarjar.uptodate">

build_lib/bnd-0.0.249.jar

250 KB
Binary file not shown.

jruby.bnd.template

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Export-Package: org.jruby.*;version="@JRUBY_VERSION@"
2+
Import-Package: !org.jruby.*, *;resolution:=optional
3+
Bundle-Version: @JRUBY_VERSION@
4+
Bundle-Description: JRuby @JRUBY_VERSION@ OSGi bundle
5+
Bundle-Name: JRuby @JRUBY_VERSION@
6+
Bundle-SymbolicName: org.jruby.jruby

maven/jruby-complete/pom.xml

+5
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@
128128
<artifactId>asm-tree</artifactId>
129129
<version>3.0</version>
130130
</artifactItem>
131+
<artifactItem>
132+
<groupId>biz.aQute</groupId>
133+
<artifactId>bnd</artifactId>
134+
<version>0.0.249</version>
135+
</artifactItem>
131136
<artifactItem>
132137
<groupId>jline</groupId>
133138
<artifactId>jline</artifactId>

maven/jruby/pom.xml

+5
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@
128128
<artifactId>asm-tree</artifactId>
129129
<version>3.0</version>
130130
</artifactItem>
131+
<artifactItem>
132+
<groupId>biz.aQute</groupId>
133+
<artifactId>bnd</artifactId>
134+
<version>0.0.249</version>
135+
</artifactItem>
131136
<artifactItem>
132137
<groupId>jline</groupId>
133138
<artifactId>jline</artifactId>

0 commit comments

Comments
 (0)