Skip to content

Commit

Permalink
[Build|OSGi] Migrate from Maven-Bundle-Plugin to Bnd-Maven-Plugin
Browse files Browse the repository at this point in the history
The former uses the latter under the hood, thus the latter is always
more recent and more powerful.
The Bnd-Maven-Plugin requires Java-17 to run the Maven build.
  • Loading branch information
HannesWell authored and iils-hwellmann committed Jan 10, 2024
1 parent 0a0c2d4 commit d0c9d29
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 22 deletions.
10 changes: 5 additions & 5 deletions symja_android_library/matheclipse-external/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@
<plugins>

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<configuration>
<instructions>
<Import-Package>!net.sf.saxon,*</Import-Package>
</instructions>
<bnd><![CDATA[
Import-Package: !net.sf.saxon,*
]]></bnd>
</configuration>
</plugin>

Expand Down
32 changes: 15 additions & 17 deletions symja_android_library/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,9 @@
<pluginManagement>
<plugins>
<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>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -444,8 +444,7 @@
<version>3.3.0</version>
<configuration>
<archive>
<manifestFile>
${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
Expand Down Expand Up @@ -582,22 +581,21 @@
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Bundle-Name>${project.artifactId}</Bundle-Name>
<!-- Suppress import of own exported packages -->
<Export-Package>*;-noimport:=true</Export-Package>
<_nouses>true</_nouses>
</instructions>
<niceManifest>true</niceManifest>
</configuration>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-manifest</id>
<goals>
<goal>manifest</goal>
<goal>bnd-process</goal>
</goals>
<configuration><bnd><![CDATA[
Bundle-SymbolicName: org.$[replacestring;${artifactId};-;.]
Bundle-Name: ${project.artifactId}
# Suppress import of own exported packages
-exportcontents: *;-noimport:=true
-noextraheaders: true
]]></bnd></configuration>
</execution>
</executions>
</plugin>
Expand Down

0 comments on commit d0c9d29

Please sign in to comment.