Skip to content

Commit

Permalink
Revert "Build jna-platform jar with OSGi headers. Fix OSGi "Bundle-ve…
Browse files Browse the repository at this point in the history
…rsion" header of core jna.jar to contain full version number, rather"

This reverts commit e4a1158.
  • Loading branch information
brettwooldridge committed Sep 20, 2013
1 parent e4a1158 commit 57197d3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 62 deletions.
12 changes: 2 additions & 10 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Cross-compile by specifying -Dos.prefix={name-arch} to ant
(cross-compile currently only configured/tested on w32ce-arm and
android-arm/-x86)
android-arm/-x86)
Use ANT_OPTS=-Dskip-native=false to build native parts, or directly
invoke the native or test targets
Expand Down Expand Up @@ -356,7 +356,7 @@
<attribute name="Bundle-Name" value="jna"/>
<attribute name="Bundle-Description" value="JNA Library"/>
<attribute name="Bundle-SymbolicName" value="com.sun.jna"/>
<attribute name="Bundle-Version" value="${jna.major}.${jna.minor}.${jna.revision}"/>
<attribute name="Bundle-Version" value="${spec.version}"/>
<attribute name="Bundle-RequiredExecutionEnvironment" value="J2SE-1.4"/>
<attribute name="Bundle-Vendor" value="${vendor}"/>
<attribute name="Bundle-ActivationPolicy" value="lazy"/>
Expand Down Expand Up @@ -489,14 +489,6 @@ osname=macosx;processor=x86;processor=x86-64;processor=ppc
<property name="libs.junit.classpath" location="lib/junit.jar"/>
<property name="javac.source" value="${platform.compatibility}"/>
<property name="javac.target" value="${platform.compatibility}"/>
<!-- OSGi manifest properties -->
<property name="vendor" value="${vendor}"/>
<property name="impl.title" value="${impl.title}.platform"/>
<property name="impl.version" value="${impl.version}"/>
<property name="spec.title" value="${spec.title}"/>
<property name="spec.vendor" value="${spec.vendor}"/>
<property name="spec.version" value="${spec.version}"/>
<property name="osgi.version" value="${jna.major}.${jna.minor}.${jna.revision}"/>
<fileset dir="${contrib}" includes="platform/build.xml" />
</subant>
<!-- Sources package as required by maven -->
Expand Down
62 changes: 10 additions & 52 deletions contrib/platform/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
Expand All @@ -32,20 +32,20 @@
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
Expand All @@ -57,54 +57,12 @@
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
nbproject/build-impl.xml file.
-->

<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"
value="
com.sun.jna.platform,
com.sun.jna.platform.dnd,
com.sun.jna.platform.mac,
com.sun.jna.platform.unix,
com.sun.jna.platform.win32,
com.sun.jna.platform.win32.COM,
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>
</target>

<target name="test" depends="init,compile,compile-test,-pre-test-run" description="Run platform unit tests.">
<echo>Running platform tests: ${test.src.dir}</echo>
<property name="test.fork" value="yes"/>
Expand Down

0 comments on commit 57197d3

Please sign in to comment.