Skip to content

Commit

Permalink
Readd OSGI manifest information to jna-platform
Browse files Browse the repository at this point in the history
The OSGI headers were added in 2013 and broken when the netbeans 
specific nbproject/build-impl.xml was updated.

Closes: #226
  • Loading branch information
matthiasblaesing committed Dec 19, 2016
1 parent 82c8638 commit 2368bb5
Showing 1 changed file with 26 additions and 28 deletions.
54 changes: 26 additions & 28 deletions contrib/platform/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,31 +64,31 @@
-->

<target name="-do-jar-without-manifest">
<jar jarfile="${dist.jar}" compress="${jar.compress}">
<manifest>
<attribute name="Main-Class" value="com.sun.jna.Native"/>
<attribute name="Manifest-Version" value="1.0"/>
<attribute name="Implementation-Title" value="${impl.title}"/>
<attribute name="Implementation-Vendor" value="${vendor}"/>
<attribute name="Implementation-Version" value="${impl.version}"/>
<attribute name="Specification-Title" value="${spec.title}"/>
<attribute name="Specification-Vendor" value="${spec.vendor}"/>
<attribute name="Specification-Version" value="${spec.version}"/>
<!--
OSGi Bundle attributes
See http://www.osgi.org/Specifications/Reference
-->
<attribute name="Bundle-Category" value="jni"/>
<attribute name="Bundle-ManifestVersion" value="2"/>
<attribute name="Bundle-Name" value="jna-platform"/>
<attribute name="Bundle-Description" value="JNA Platform Library"/>
<attribute name="Bundle-SymbolicName" value="com.sun.jna.platform"/>
<attribute name="Bundle-Version" value="${osgi.version}"/>
<attribute name="Bundle-RequiredExecutionEnvironment" value="J2SE-1.4"/>
<attribute name="Bundle-Vendor" value="${vendor}"/>
<attribute name="Require-Bundle" value="com.sun.jna;bundle-version=&quot;${osgi.version}&quot;"/>
<attribute name="Export-Package"
<target name="-pre-jar">
<tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
<manifest file="${tmp.manifest.file}" mode="replace">
<attribute name="Main-Class" value="com.sun.jna.Native"/>
<attribute name="Manifest-Version" value="1.0"/>
<attribute name="Implementation-Title" value="${impl.title}"/>
<attribute name="Implementation-Vendor" value="${vendor}"/>
<attribute name="Implementation-Version" value="${impl.version}"/>
<attribute name="Specification-Title" value="${spec.title}"/>
<attribute name="Specification-Vendor" value="${spec.vendor}"/>
<attribute name="Specification-Version" value="${spec.version}"/>
<!--
OSGi Bundle attributes
See http://www.osgi.org/Specifications/Reference
-->
<attribute name="Bundle-Category" value="jni"/>
<attribute name="Bundle-ManifestVersion" value="2"/>
<attribute name="Bundle-Name" value="jna-platform"/>
<attribute name="Bundle-Description" value="JNA Platform Library"/>
<attribute name="Bundle-SymbolicName" value="com.sun.jna.platform"/>
<attribute name="Bundle-Version" value="${osgi.version}"/>
<attribute name="Bundle-RequiredExecutionEnvironment" value="J2SE-1.4"/>
<attribute name="Bundle-Vendor" value="${vendor}"/>
<attribute name="Require-Bundle" value="com.sun.jna;bundle-version=&quot;${osgi.version}&quot;"/>
<attribute name="Export-Package"
value="
com.sun.jna.platform,
com.sun.jna.platform.dnd,
Expand All @@ -100,9 +100,7 @@ com.sun.jna.platform.win32.COM.tlb,
com.sun.jna.platform.win32.COM.tlb.imp,
com.sun.jna.platform.wince
"/>
</manifest>
<fileset dir="${build.classes.dir}"/>
</jar>
</manifest>
</target>

<target name="test" depends="init,compile,compile-test,-pre-test-run" description="Run platform unit tests.">
Expand Down

0 comments on commit 2368bb5

Please sign in to comment.