-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1494 from matthiasblaesing/pr-1492
Add 'uses' information to OSGI metadata in MANIFEST.MF
- Loading branch information
Showing
5 changed files
with
140 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 | ||
http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>net.java.dev.jna</groupId> | ||
<artifactId>create-export-package-metadata</artifactId> | ||
<version>1.0.0</version> | ||
<packaging>bundle</packaging> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<build> | ||
<sourceDirectory>${sourceDirectory}</sourceDirectory> | ||
<outputDirectory>${outputDirectory}</outputDirectory> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.felix</groupId> | ||
<artifactId>maven-bundle-plugin</artifactId> | ||
<version>5.1.8</version> | ||
<extensions>true</extensions> | ||
<configuration> | ||
<instructions> | ||
<Export-Package>${exportedPackages}</Export-Package> | ||
<Import-Package>${importedPackages}</Import-Package> | ||
</instructions> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>bundle-manifest</id> | ||
<phase>process-classes</phase> | ||
<goals> | ||
<goal>manifest</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/usr/bin/env sh | ||
set -e | ||
|
||
extract_export_package_value_for_buildxml() { | ||
sed -z -E 's:\r?\n ::g' "$1" \ | ||
| grep '^Export-Package' \ | ||
| sed 's/^Export-Package: //' \ | ||
| sed 's/",/",\n/g' \ | ||
| sed 's/1\.0\.0/${osgi.version}/g' \ | ||
| sed 's/"/\"/g' | ||
} | ||
|
||
rm -rf tmp | ||
|
||
mkdir tmp | ||
|
||
cp -r src tmp | ||
|
||
mvn \ | ||
-f create-export-package-metadata-pom.xml \ | ||
-DsourceDirectory=tmp/src \ | ||
-DoutputDirectory=tmp/target \ | ||
-DexportedPackages=com.sun.jna,com.sun.jna.ptr,com.sun.jna.win32 \ | ||
clean package | ||
|
||
cp -r contrib/platform/src tmp | ||
|
||
mvn \ | ||
-f create-export-package-metadata-pom.xml \ | ||
-DsourceDirectory=tmp/src \ | ||
-DoutputDirectory=tmp/target-platform \ | ||
-DexportedPackages=\ | ||
com.sun.jna.platform,\ | ||
com.sun.jna.platform.dnd,\ | ||
com.sun.jna.platform.linux,\ | ||
com.sun.jna.platform.mac,\ | ||
com.sun.jna.platform.unix,\ | ||
com.sun.jna.platform.unix.aix,\ | ||
com.sun.jna.platform.unix.solaris,\ | ||
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.win32.COM.util,\ | ||
com.sun.jna.platform.win32.COM.util.annotation,\ | ||
com.sun.jna.platform.wince \ | ||
-DimportedPackages=com.sun.jna,com.sun.jna.ptr,com.sun.jna.win32 \ | ||
clean package | ||
|
||
echo 'build.xml: Export-Package:' | ||
echo | ||
extract_export_package_value_for_buildxml tmp/target/META-INF/MANIFEST.MF | ||
echo | ||
echo | ||
|
||
echo 'contrib/platform/build.xml: Export-Package:' | ||
echo | ||
extract_export_package_value_for_buildxml tmp/target-platform/META-INF/MANIFEST.MF | ||
echo | ||
echo | ||
|
||
rm -r tmp |