Skip to content

Commit

Permalink
Switch to bnd-maven-plugin in order to support Multi-Release OSGi bun…
Browse files Browse the repository at this point in the history
…dle JAR's via supplemental manifest files.
  • Loading branch information
norrisjeremy committed Jan 3, 2024
1 parent fe26a2c commit 06a98a7
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
java-version: ${{ matrix.java }}
check-latest: true
- name: Test with Maven
run: ./mvnw -B -V -e -P coverage verify -Denforcer.skip=true -Dmaven.resources.skip=true -Dmaven.main.skip=true -Dassembly.skipAssembly=true -Dmaven.javadoc.skip=true -DskipITs=false
run: ./mvnw -B -V -e -P coverage verify -Denforcer.skip=true -Dmaven.resources.skip=true -Dmaven.main.skip=true -Dbnd.skip=true -Dassembly.skipAssembly=true -Dmaven.javadoc.skip=true -DskipITs=false
- uses: actions/upload-artifact@v4
with:
name: java-${{ matrix.java }}-testresults
Expand Down
44 changes: 28 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@
<timezone>+9</timezone>
</developer>
<developer>
<id>mwiede</id>
<name>Matthias Wiedemann</name>
<email>[email protected]</email>
<organization>Community</organization>
<organizationUrl>https://github.com/mwiede</organizationUrl>
</developer>
<developer>
<id>norrisjeremy</id>
<name>Jeremy Norris</name>
<organization>Community</organization>
<organizationUrl>https://github.com/norrisjeremy</organizationUrl>
Expand Down Expand Up @@ -254,7 +256,7 @@
<configuration>
<rules>
<requireJavaVersion>
<version>16</version>
<version>17</version>
</requireJavaVersion>
<dependencyConvergence />
<banDuplicatePomDependencyVersions />
Expand Down Expand Up @@ -403,28 +405,38 @@
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.9</version>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<version>7.0.0</version>
<configuration>
<instructions>
<Export-Package>com.jcraft.jsch;-noimport:=true</Export-Package>
<Import-Package><![CDATA[
com.sun.jna*;version="${range;[=0,+)}",
org.apache.logging.log4j*;version="${range;[=0,4)}",
org.bouncycastle*;version="[1.76,${versionmask;+})",
org.slf4j*;version="[1.7,${versionmask;+})",
org.ietf.jgss;resolution:=optional,
<bnd><![CDATA[
-noextraheaders: false
-removeheaders: \
Bnd-LastModified,\
Bundle-Developers,\
Bundle-DocURL,\
Bundle-SCM,\
Created-By,\
Private-Package
Bundle-SymbolicName: ${project.groupId}.${project.artifactId}
Export-Package: com.jcraft.jsch;-noimport:=true
Import-Package: \
com.sun.jna*;version="${range;[=0,+)}";resolution:=optional,\
org.apache.logging.log4j*;version="${range;[=0,4)}";resolution:=optional,\
org.bouncycastle*;version="[1.76,${versionmask;+})";resolution:=optional,\
org.slf4j*;version="[1.7,${versionmask;+})";resolution:=optional,\
org.newsclub.net.unix;resolution:=optional,\
org.ietf.jgss;resolution:=optional,\
!java.*,\
*
]]></Import-Package>
</instructions>
]]></bnd>
</configuration>
<executions>
<execution>
<id>bundle-manifest</id>
<id>bnd-process</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
<goal>bnd-process</goal>
</goals>
</execution>
</executions>
Expand Down

0 comments on commit 06a98a7

Please sign in to comment.