Skip to content

Commit

Permalink
Simplify maven-bundle-plugin configuration
Browse files Browse the repository at this point in the history
Instead of the 'maven-bundle-plugin:cleanVersions' goal, use
BND-lib's range macro:
https://bnd.bndtools.org/macros/range.html

Additionally use angular brackets for BND-macros
(https://bnd.bndtools.org/chapters/850-macros.html) and make the
version-ranges for imported sshd packages more strict.
  • Loading branch information
HannesWell authored and tomaswolf committed Mar 25, 2023
1 parent 0b0ecb0 commit 9222146
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1457,31 +1457,20 @@
<inherited>true</inherited>
<extensions>true</extensions>
<executions>
<execution>
<id>versions</id>
<phase>validate</phase>
<goals>
<goal>cleanVersions</goal>
</goals>
<configuration>
<versions>
<sshd.osgi.version.clean>${project.version}</sshd.osgi.version.clean>
</versions>
</configuration>
</execution>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
<configuration>
<supportIncrementalBuild>true</supportIncrementalBuild>
<instructions>
<Import-Package><![CDATA[
org.apache.sshd*;version="[$(version;==;${sshd.osgi.version.clean}),$(version;=+;${sshd.osgi.version.clean}))",
org.slf4j*;version="${range;[==,${slf4j.upper.bound})}",
org.apache.sshd*;version="$<range;[===,=+);$<maven_version;${project.version}>>",
org.slf4j*;version="$<range;[==,${slf4j.upper.bound})>",
*
]]></Import-Package>
]]></Import-Package>
<Export-Package>*;-noimport:=true</Export-Package>
</instructions>
<noWarningProjectTypes>pom</noWarningProjectTypes>
Expand Down

0 comments on commit 9222146

Please sign in to comment.