From 9a4c0b17a5ce73b826d286d30a0444b13cc5af05 Mon Sep 17 00:00:00 2001 From: Marcono1234 Date: Sat, 6 Nov 2021 17:38:19 +0100 Subject: [PATCH] Put module-info.class into Multi-Release JAR folder --- gson/bnd.bnd | 6 ++++++ gson/pom.xml | 1 + pom.xml | 45 +++++++++++++++++++++++++-------------------- 3 files changed, 32 insertions(+), 20 deletions(-) diff --git a/gson/bnd.bnd b/gson/bnd.bnd index 07746f0a48..5237831fc8 100644 --- a/gson/bnd.bnd +++ b/gson/bnd.bnd @@ -17,3 +17,9 @@ Import-Package: sun.misc;resolution:=optional, * com.google.gson.annotations,\ com.google.gson.reflect,\ com.google.gson.stream + +# Ignore error about module-info.class being in wrong directory +# See related https://issues.apache.org/jira/browse/FELIX-5592 (but that is for different plugin) +# and https://github.com/bndtools/bnd/issues/2227 +-fixupmessages:\ + "Classes found in the wrong directory: \\{META-INF/versions/9/module-info\\.class=module-info\\}";is:=warning diff --git a/gson/pom.xml b/gson/pom.xml index d9d37baa33..0671c5b79f 100644 --- a/gson/pom.xml +++ b/gson/pom.xml @@ -59,6 +59,7 @@ maven-jar-plugin + ${project.build.outputDirectory}/META-INF/MANIFEST.MF diff --git a/pom.xml b/pom.xml index d0d45be9a1..c9e6294ba0 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ UTF-8 - 1.6 + 1.6 @@ -70,30 +70,32 @@ default-compile - 9 + [1.5,9) - 9 + ${javaVersion} + ${javaVersion} + + module-info.java + - base-compile + java-9-compile compile - - module-info.java - + + 9 + + 9 + + module-info.java + + true - - - [1.5,9) - - 1.6 - 1.6 - org.apache.maven.plugins @@ -104,12 +106,15 @@ org.apache.maven.plugins maven-jar-plugin 3.2.0 - - - org.apache.felix - maven-bundle-plugin - 5.1.2 - true + + + + + true + + +