Skip to content

Commit

Permalink
Add missing Implementation- and Specification- entries in `MANIFE…
Browse files Browse the repository at this point in the history
…ST.MF` to `bnd-maven-plugin` configuration (apache/logging-log4j2#1923)
  • Loading branch information
vy committed Oct 31, 2023
1 parent 2e488c5 commit a43a0b2
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 15 deletions.
43 changes: 28 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,21 @@
</executions>
</plugin>

<!-- populate the `parsedVersion` property -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>parse-version</id>
<goals>
<goal>parse-version</goal>
</goals>
<phase>validate</phase>
</execution>
</executions>
</plugin>

<!--
~ Generate OSGi and JPMS descriptors.
~ Annotate packages that need to be exported with `org.osgi.annotation.bundle.Export`
Expand Down Expand Up @@ -766,6 +781,19 @@
# Add manifests and modules for each multi-release version:
-jpms-multi-release: $[bnd-multi-release]
# Adds certain `Implementation-*` and `Specification-*` entries to the generated `MANIFEST.MF`.
# Using these properties is known to be a bad practice: https://github.com/apache/logging-log4j2/issues/1923#issuecomment-1786818254
# Users should use `META-INF/maven/<groupId>/<artifactId>/pom.properties` instead.
# Yet we support it due to backward compatibility reasons.
# The issue was reported to `bnd-maven-plugin` too: https://github.com/bndtools/bnd/issues/5855
# We set these values to their Maven Archiver defaults: https://maven.apache.org/shared/maven-archiver/#class_manifest
Implementation-Title: ${project.name}
Implementation-Vendor: ${project.organization.name}
Implementation-Version: ${project.version}
Specification-Title: ${project.name}
Specification-Vendor: ${project.organization.name}
Specification-Version: ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}
# Extra configuration provided by the consumer:
${bnd-extra-config}
]]></bnd>
Expand Down Expand Up @@ -1235,21 +1263,6 @@
<build>
<plugins>

<!-- populate the `parsedVersion` property -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>parse-version</id>
<goals>
<goal>parse-version</goal>
</goals>
<phase>validate</phase>
</execution>
</executions>
</plugin>

<!-- copy `src/site/_constants.tmpl.adoc` to `target/constants-adoc/_constants.adoc` -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
8 changes: 8 additions & 0 deletions src/changelog/.10.x.x/fix-manifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://logging.apache.org/log4j/changelog"
xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.2.xsd"
type="fixed">
<issue id="apache/logging-log4j2#1923" link="https://github.com/apache/logging-log4j2/issues/1923"/>
<description format="asciidoc">Add missing `Implementation-` and `Specification-` entries in `MANIFEST.MF` to `bnd-maven-plugin` configuration</description>
</entry>
1 change: 1 addition & 0 deletions src/site/_release-notes/_10.x.x.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@ This minor release contains several small improvements.
* Fix broken changelog entry validation
* Attach `flatten:clean` to `clean` phase
* Add missing `Implementation-` and `Specification-` entries in `MANIFEST.MF` to `bnd-maven-plugin` configuration (https://github.com/apache/logging-log4j2/issues/1923[apache/logging-log4j2#1923])

0 comments on commit a43a0b2

Please # to comment.