Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

issue #212 Junit should be an osgi bundle

JARs are now built using bnd to generate OSGi manifest headers
  • Loading branch information...
commit 4f6892206f3bd04be9d3abb0e7bc74aec2fd2072 1 parent a681b76
@hwellmann authored
View
22 build.xml
@@ -2,7 +2,7 @@
xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<tstamp />
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
-
+ <taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="lib/biz.aQute.bnd.jar"/>
<property file="${user.home}/.junit.properties" />
<property name="src" value="src/main/java" />
<property name="target" location="target" />
@@ -37,6 +37,7 @@
<target name="versiontag" depends="init">
<filter token="version" value="${version}" />
+ <filter token="version-base" value="${version-base}" />
<copy
file="${versionfile}.template"
@@ -44,6 +45,13 @@
filtering="on"
overwrite="true"
/>
+ <copy
+ todir="${target}/bnd"
+ filtering="on"
+ overwrite="true"
+ >
+ <fileset dir="build/bnd"/>
+ </copy>
</target>
<target name="clean">
@@ -88,16 +96,8 @@
basedir="${src}"
excludes="${unjarred}, **/*.class"
/>
- <jar
- jarfile="${dist}/${binjar}"
- basedir="${bin}"
- excludes="${unjarred}, **/*.java, build.xml"
- />
- <jar
- jarfile="${dist}/${depjar}"
- basedir="${bin}"
- excludes="${unjarred}, org/hamcrest/**, **/*.java, build.xml"
- />
+ <bnd classpath="${bin}${path.separator}${hamcrestlib}" eclipse="false" output="${dist}/${binjar}" files="${target}/bnd/junit.bnd"/>
+ <bnd classpath="${bin}" eclipse="false" output="${dist}/${depjar}" files="${target}/bnd/junit-dep.bnd"/>
</target>
<target name="all.maven.jars" depends="jars,javadoc">
View
9 build/bnd/junit-dep.bnd
@@ -0,0 +1,9 @@
+Bundle-SymbolicName: junit-dep
+Bundle-Name: JUnit
+Bundle-Version: @version-base@
+Export-Package: \
+ junit.*;version="3.8.2",\
+ org.junit.*;version="@version-base@"
+
+Import-Package: org.hamcrest.*;version="1.1"
+
View
8 build/bnd/junit.bnd
@@ -0,0 +1,8 @@
+Bundle-SymbolicName: junit
+Bundle-Name: JUnit
+Bundle-Version: @version-base@
+Export-Package: \
+ org.hamcrest.*;version="1.1",\
+ junit.*;version="3.8.2",\
+ org.junit.*;version="@version-base@"
+
View
BIN  lib/biz.aQute.bnd.jar
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.