New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fully automate OSGi metadata creation and implement minor fixes #327
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,8 +37,29 @@ | |
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-simple</artifactId> | ||
<version>${project.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
|
||
<plugin> | ||
<groupId>biz.aQute.bnd</groupId> | ||
<artifactId>bnd-maven-plugin</artifactId> | ||
<configuration> | ||
<bnd><![CDATA[ | ||
Bundle-SymbolicName: org.slf4j.osgi-over-slf4j | ||
Import-Package: org.slf4j.*, * | ||
-exportcontents: | ||
Bundle-Activator: org.slf4j.osgi.logservice.impl.Activator | ||
Bundle-Category: osgi | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is that header necessary? |
||
Automatic-Module-Name: ${bsn} | ||
]]></bnd> | ||
</configuration> | ||
</plugin> | ||
|
||
</plugins> | ||
</build> | ||
|
||
</project> |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,13 +30,13 @@ | |
<scm> | ||
<url>https://github.com/qos-ch/slf4j</url> | ||
<connection>scm:git:https://github.com/qos-ch/slf4j.git</connection> | ||
</scm> | ||
</scm> | ||
|
||
<properties> | ||
<!-- yyyy-MM-dd'T'HH:mm:ss'Z' --> | ||
<project.build.outputTimestamp>2022-12-12T19:19:39Z</project.build.outputTimestamp> | ||
<project.build.outputTimestamp>2022-12-12T19:19:39Z</project.build.outputTimestamp> | ||
<latest.stable.version>1.7.36</latest.stable.version> | ||
<latest.2.version>2.0.0-alpha7</latest.2.version> | ||
<latest.2.version>2.0.0-alpha7</latest.2.version> | ||
<!-- java.util.ServiceLoader requires Java 6 --> | ||
<jdk.version>8</jdk.version> | ||
<maven.compiler.source>${jdk.version}</maven.compiler.source> | ||
|
@@ -47,8 +47,9 @@ | |
<!-- used in integration testing --> | ||
<slf4j.api.minimum.compatible.version>1.6.0</slf4j.api.minimum.compatible.version> | ||
<cal10n.version>0.8.1</cal10n.version> | ||
<reload4j.version>1.2.22</reload4j.version> | ||
<reload4j.version>1.2.22</reload4j.version> | ||
<logback.version>1.2.10</logback.version> | ||
<jcl.version>1.2</jcl.version> | ||
<junit.version>4.13.1</junit.version> | ||
<maven-site-plugin.version>3.7.1</maven-site-plugin.version> | ||
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version> | ||
|
@@ -58,9 +59,7 @@ | |
<maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version> | ||
<maven-jar-plugin.version>3.2.0</maven-jar-plugin.version> | ||
<maven-jxr-plugin.version>3.1.1</maven-jxr-plugin.version> | ||
<maven-bundle-plugin.version>5.1.8</maven-bundle-plugin.version> | ||
<build-helper-maven-plugin.version>3.2.0</build-helper-maven-plugin.version> | ||
|
||
<bnd.version>6.4.0</bnd.version> | ||
</properties> | ||
|
||
<developers> | ||
|
@@ -78,7 +77,7 @@ | |
<module>slf4j-jdk14</module> | ||
<module>slf4j-jdk-platform-logging</module> | ||
<module>slf4j-log4j12</module> | ||
<module>slf4j-reload4j</module> | ||
<module>slf4j-reload4j</module> | ||
<module>slf4j-ext</module> | ||
<module>jcl-over-slf4j</module> | ||
<module>log4j-over-slf4j</module> | ||
|
@@ -96,6 +95,12 @@ | |
<version>${junit.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>biz.aQute.bnd</groupId> | ||
<artifactId>biz.aQute.bnd.annotation</artifactId> | ||
<version>${bnd.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<dependencyManagement> | ||
|
@@ -113,7 +118,6 @@ | |
<version>${project.version}</version> | ||
</dependency> | ||
|
||
|
||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-simple</artifactId> | ||
|
@@ -125,7 +129,7 @@ | |
<artifactId>reload4j</artifactId> | ||
<version>${reload4j.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>ch.qos.cal10n</groupId> | ||
<artifactId>cal10n-api</artifactId> | ||
|
@@ -192,14 +196,14 @@ | |
<source>${jdk.version}</source> | ||
<target>${jdk.version}</target> | ||
</configuration> | ||
</execution> | ||
</execution> | ||
|
||
<execution> | ||
<execution> | ||
<id>module-compile</id> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>compile</goal> | ||
</goals> | ||
</goals> | ||
<configuration> | ||
<release>9</release> | ||
<compileSourceRoots> | ||
|
@@ -209,8 +213,6 @@ | |
</configuration> | ||
</execution> | ||
|
||
|
||
|
||
</executions> | ||
|
||
</plugin> | ||
|
@@ -238,27 +240,39 @@ | |
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.felix</groupId> | ||
<artifactId>maven-bundle-plugin</artifactId> | ||
<version>${maven-bundle-plugin.version}</version> | ||
<groupId>biz.aQute.bnd</groupId> | ||
<artifactId>bnd-maven-plugin</artifactId> | ||
<version>${bnd.version}</version> | ||
<configuration> | ||
<!-- populated by the plugin itself --> | ||
<bnd><![CDATA[ | ||
# Use $[ .. ] to defer variable subtitution to bnd to not get this parent's values | ||
|
||
Bundle-SymbolicName: ${replacestring;${project.artifactId};-;.} | ||
Bundle-Name: $[project.artifactId] | ||
Bundle-Vendor: SLF4J.ORG | ||
-snapshot: | ||
|
||
Import-Package: org.slf4j.* | ||
-exportcontents: org.slf4j.* | ||
|
||
X-Compile-Source-JDK: ${maven.compiler.source} | ||
X-Compile-Target-JDK: ${maven.compiler.target} | ||
Implementation-Version: ${project.version} | ||
Implementation-Title: $[project.artifactId] | ||
Comment on lines
+259
to
+262
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does anybody know for what those are used? |
||
Multi-Release: true | ||
|
||
-removeheaders: Private-Package,Bundle-SCM, Bundle-Developers, Include-Resource | ||
-fixupmessages: 'Classes found in the wrong directory: .*' | ||
]]></bnd> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>bundle-manifest</id> | ||
<phase>process-classes</phase> | ||
<goals> | ||
<goal>manifest</goal> | ||
<goal>bnd-process</goal> | ||
</goals> | ||
<configuration> | ||
<instructions> | ||
<!-- populated by the plugin itself --> | ||
<Bundle-Version>${parsedVersion.osgiVersion}</Bundle-Version> | ||
<Bundle-Description>${project.description}</Bundle-Description> | ||
<X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK> | ||
<X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK> | ||
<Implementation-Version>${project.version}</Implementation-Version> | ||
<Multi-Release>true</Multi-Release> | ||
</instructions> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
@@ -293,21 +307,6 @@ | |
</executions> | ||
</plugin> | ||
|
||
<!-- as suggested in http://jira.qos.ch/browse/SLF4J-143 --> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>build-helper-maven-plugin</artifactId> | ||
<version>${build-helper-maven-plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<id>parse-version</id> | ||
<goals> | ||
<goal>parse-version</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-site-plugin</artifactId> | ||
|
@@ -319,8 +318,8 @@ | |
<artifactId>maven-project-info-reports-plugin</artifactId> | ||
<version>3.0.0</version> | ||
</plugin> | ||
|
||
</plugins> | ||
|
||
</build> | ||
|
||
<reporting> | ||
|
@@ -335,7 +334,7 @@ | |
<linkJavadoc>true</linkJavadoc> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
|
@@ -382,7 +381,7 @@ | |
</groups> | ||
</configuration> | ||
</plugin> | ||
|
||
</plugins> | ||
</reporting> | ||
|
||
|
@@ -450,8 +449,7 @@ | |
</plugins> | ||
</build> | ||
|
||
<pluginRepositories> | ||
</pluginRepositories> | ||
<pluginRepositories /> | ||
</profile> | ||
|
||
<profile> | ||
|
@@ -506,16 +504,15 @@ | |
|
||
<pluginRepositories> | ||
<pluginRepository> | ||
<id>apache-snapshot-repo</id> | ||
<name>apache-snapshot-repo</name> | ||
<url>https://repository.apache.org/content/groups/snapshots/</url> | ||
<releases> | ||
<enabled>false</enabled> | ||
</releases> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
</snapshots> | ||
|
||
<id>apache-snapshot-repo</id> | ||
<name>apache-snapshot-repo</name> | ||
<url>https://repository.apache.org/content/groups/snapshots/</url> | ||
<releases> | ||
<enabled>false</enabled> | ||
</releases> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
</snapshots> | ||
</pluginRepository> | ||
</pluginRepositories> | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adding Automatic-Module-Name headers, wouldn't it be better to add a regular modules-info.java?
This question applies for the other artifacts, where I added that header as well.