This is an automated email from the ASF dual-hosted git repository.

vy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/logging-parent.git

commit a43a0b26066b637a5b0cd07cee877c83f0f3347d
Author: Volkan Yazıcı <[email protected]>
AuthorDate: Tue Oct 31 21:32:37 2023 +0100

    Add missing `Implementation-` and `Specification-` entries in `MANIFEST.MF` 
to `bnd-maven-plugin` configuration (apache/logging-log4j2#1923)
---
 pom.xml                                | 43 ++++++++++++++++++++++------------
 src/changelog/.10.x.x/fix-manifest.xml |  8 +++++++
 src/site/_release-notes/_10.x.x.adoc   |  1 +
 3 files changed, 37 insertions(+), 15 deletions(-)

diff --git a/pom.xml b/pom.xml
index fc81766..553821c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -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`
@@ -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>
@@ -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>
diff --git a/src/changelog/.10.x.x/fix-manifest.xml 
b/src/changelog/.10.x.x/fix-manifest.xml
new file mode 100644
index 0000000..1fea5cc
--- /dev/null
+++ b/src/changelog/.10.x.x/fix-manifest.xml
@@ -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>
diff --git a/src/site/_release-notes/_10.x.x.adoc 
b/src/site/_release-notes/_10.x.x.adoc
index 5ca0c19..2fdbf63 100644
--- a/src/site/_release-notes/_10.x.x.adoc
+++ b/src/site/_release-notes/_10.x.x.adoc
@@ -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])

Reply via email to