Skip to content

Commit 52cf6cd

Browse files
HannesWellceki
authored andcommitted
Fix LOGBACK-1728: Incorrect OSGi execution-environment requirements
Remove the explicitly specified, but out dated, 'Bundle-RequiredExecutionEnvironment: JavaSE-1.6' entry and let the maven-bundle-plugin instead add a automatically computed ee-requirement (therefore remove the '_noee' instruction). This ensures the OSGi-ExecutionEnvironment metadata are always up to date. Remove all other explicitly configuration that can be derived automatically and is not necessary, like more Import-Package values or '_failok'. Some of the explicitly imported packages are not even referenced in the code. Fixes https://jira.qos.ch/browse/LOGBACK-1728 Signed-off-by: Hannes Wellmann <[email protected]>
1 parent ed49e46 commit 52cf6cd

4 files changed

Lines changed: 1 addition & 18 deletions

File tree

logback-access/pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@
127127
<plugin>
128128
<groupId>org.apache.felix</groupId>
129129
<artifactId>maven-bundle-plugin</artifactId>
130-
<extensions>true</extensions>
131130
<executions>
132131
<execution>
133132
<id>bundle-manifest</id>
@@ -148,13 +147,10 @@
148147
<Import-Package>
149148
ch.qos.logback.core.rolling,
150149
ch.qos.logback.core.rolling.helper,
151-
javax.servlet.*;version="4.0.0",
152150
org.apache.catalina.*;version="${tomcat.version}";resolution:=optional,
153151
org.eclipse.jetty.*;version="${jetty.version}";resolution:=optional,
154152
*
155153
</Import-Package>
156-
<Bundle-RequiredExecutionEnvironment>JavaSE-1.6
157-
</Bundle-RequiredExecutionEnvironment>
158154
</instructions>
159155
</configuration>
160156
</plugin>

logback-classic/pom.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@
303303
<plugin>
304304
<groupId>org.apache.felix</groupId>
305305
<artifactId>maven-bundle-plugin</artifactId>
306-
<extensions>true</extensions>
307306
<executions>
308307
<execution>
309308
<id>bundle-manifest</id>
@@ -315,8 +314,6 @@
315314
</executions>
316315
<configuration>
317316
<instructions>
318-
<_noee>true</_noee> <!-- Jigsaw -->
319-
<_failok>true</_failok> <!-- Jigsaw -->
320317
<Export-Package>ch.qos.logback.classic*, org.slf4j.impl;version=${slf4j.version}</Export-Package>
321318
<!-- LB-CLASSIC It is necessary to specify the rolling
322319
file packages as classes are created via IOC (xml
@@ -326,16 +323,11 @@
326323
sun.reflect;resolution:=optional,
327324
javax.*;resolution:=optional,
328325
org.xml.*;resolution:=optional,
329-
org.slf4j,
330-
org.slf4j.spi,
331-
org.slf4j.event,
332326
ch.qos.logback.core.rolling,
333327
ch.qos.logback.core.rolling.helper,
334-
ch.qos.logback.core.util,
335328
ch.qos.logback.core.read,
336329
*
337330
</Import-Package>
338-
<Bundle-RequiredExecutionEnvironment>JavaSE-1.6</Bundle-RequiredExecutionEnvironment>
339331
<!-- Needed to integrate ServiceLoader mechanism with OSGi -->
340332
<Require-Capability>osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"</Require-Capability>
341333
<Provide-Capability>osgi.serviceloader;osgi.serviceloader=org.slf4j.spi.SLF4JServiceProvider</Provide-Capability>

logback-core/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@
128128
<plugin>
129129
<groupId>org.apache.felix</groupId>
130130
<artifactId>maven-bundle-plugin</artifactId>
131-
<extensions>true</extensions>
132131

133132
<executions>
134133
<execution>
@@ -141,8 +140,6 @@
141140
</executions>
142141
<configuration>
143142
<instructions>
144-
<_noee>true</_noee> <!-- Jigsaw -->
145-
<_failok>true</_failok> <!-- Jigsaw -->
146143
<Export-Package>ch.qos.logback.core.*</Export-Package>
147144
<Import-Package>
148145
javax.*;resolution:=optional,
@@ -152,8 +149,6 @@
152149
org.codehaus.commons.compiler;resolution:=optional,
153150
*
154151
</Import-Package>
155-
<Bundle-RequiredExecutionEnvironment>JavaSE-1.6
156-
</Bundle-RequiredExecutionEnvironment>
157152
</instructions>
158153
</configuration>
159154
</plugin>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
<maven-release-plugin.version>3.0.0-M4</maven-release-plugin.version>
9696
<maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
9797
<maven-dependency-plugin.version>3.2.0</maven-dependency-plugin.version>
98-
<maven-bundle-plugin.version>5.1.6</maven-bundle-plugin.version>
98+
<maven-bundle-plugin.version>5.1.8</maven-bundle-plugin.version>
9999
<maven-antrun-plugin.version>3.1.0</maven-antrun-plugin.version>
100100
<ant.version>1.10.12</ant.version>
101101
<cobertura.maven.plugin.version>2.7</cobertura.maven.plugin.version>

0 commit comments

Comments
 (0)