From d8f06dbb1472e271b0b512dc790d8c41de8c7743 Mon Sep 17 00:00:00 2001 From: Jiri Date: Jul 13 2023 08:42:38 +0000 Subject: Removed depndece on bnd plugin --- diff --git a/google-gson.spec b/google-gson.spec index 4ece35f..c4dafcd 100644 --- a/google-gson.spec +++ b/google-gson.spec @@ -5,12 +5,14 @@ Summary: Java lib for conversion of Java objects into JSON representation License: ASL 2.0 URL: https://github.com/google/gson Source0: https://github.com/google/gson/archive/gson-parent-%{version}.tar.gz +Source1: pregenerated-MANIFEST.MF # Internal packages are naughtily used by other packages in Fedora Patch1: 0002-Also-export-internal-packages-in-OSGi-metadata.patch # Remove dependency on unavailable templating-maven-plugin # Reverts upstream commit https://github.com/google/gson/commit/d84e26d Patch3: 0004-This-commit-added-a-dependency-on-templating-maven-p.patch +Patch4: repalceBndManifestByHardcoded.patch BuildArch: noarch ExclusiveArch: %{java_arches} noarch @@ -19,7 +21,7 @@ BuildRequires: maven-local BuildRequires: mvn(junit:junit) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-jar-plugin) -BuildRequires: bnd-maven-plugin +#BuildRequires: bnd-maven-plugin BuildRequires: maven-resources-plugin BuildRequires: mvn(com.fasterxml.jackson.core:jackson-databind) @@ -40,6 +42,9 @@ This package contains the API documentation for %{name}. #rm ./gradle/wrapper/gradle-wrapper.jar %patch1 -p1 %patch3 -p1 +%patch4 -p1 + +cp %{SOURCE1} . # The test EnumWithObfuscatedTest requires the plugins copy-rename-maven-plugin, proguard-maven-plugin and maven-resources-plugin to work correctly because it tests Gson interaction with a class obfuscated by ProGuard. # https://github.com/google/gson/issues/2045 @@ -56,6 +61,9 @@ rm ./gson/src/test/java/com/google/gson/internal/bind/DefaultDateTypeAdapterTest %pom_remove_plugin :moditect-maven-plugin gson +%pom_remove_plugin :bnd-maven-plugin gson +rm gson/src/test/java/com/google/gson/regression/OSGiTest.java + # Remove dependency on unavailable templating-maven-plugin %pom_remove_plugin org.codehaus.mojo:templating-maven-plugin gson rm gson/src/test/java/com/google/gson/internal/GsonBuildConfigTest.java diff --git a/pregenerated-MANIFEST.MF b/pregenerated-MANIFEST.MF new file mode 100644 index 0000000..523ef93 --- /dev/null +++ b/pregenerated-MANIFEST.MF @@ -0,0 +1,38 @@ +Manifest-Version: 1.0 +Created-By: 17.0.6 (Red Hat, Inc.) +Build-Jdk-Spec: 17 +Bnd-LastModified: 1679918602352 +Bundle-ContactAddress: https://github.com/google/gson +Bundle-Description: Gson JSON library +Bundle-Developers: google;organization=Google;organizationUrl="https://w + ww.google.com" +Bundle-DocURL: https://github.com/google/gson/gson +Bundle-License: "Apache-2.0";link="https://www.apache.org/licenses/LICEN + SE-2.0.txt" +Bundle-ManifestVersion: 2 +Bundle-Name: Gson +Bundle-RequiredExecutionEnvironment: JavaSE-1.7, JavaSE-1.8 +Bundle-SCM: url="https://github.com/google/gson/gson/",connection="scm:g + it:https://github.com/google/gson.git/gson",developer-connection="scm:g + it:git@github.com:google/gson.git/gson",tag="gson-parent-2.10.1" +Bundle-SymbolicName: com.google.gson +Bundle-Vendor: Google Gson Project +Bundle-Version: 2.10.1 +Export-Package: com.google.gson;uses:="com.google.gson.internal,com.goog + le.gson.reflect,com.google.gson.stream";version="2.10.1",com.google.gso + n.annotations;version="2.10.1",com.google.gson.reflect;version="2.10.1" + ,com.google.gson.stream;version="2.10.1",com.google.gson.internal;x-int + ernal:=true;uses:="com.google.gson,com.google.gson.reflect,com.google.g + son.stream";version="2.10.1",com.google.gson.internal.bind;x-internal:= + true;uses:="com.google.gson,com.google.gson.internal,com.google.gson.re + flect,com.google.gson.stream";version="2.10.1",com.google.gson.internal + .bind.util;x-internal:=true;version="2.10.1" +Import-Package: sun.misc;resolution:=optional,com.google.gson.annotation + s,com.google.gson.internal.bind.util,com.google.gson.reflect,com.google + .gson.stream +Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.7))" +Tool: Bnd-6.3.1 +JavaPackages-GroupId: com.google.code.gson +JavaPackages-ArtifactId: gson +JavaPackages-Version: 2.10.1 + diff --git a/repalceBndManifestByHardcoded.patch b/repalceBndManifestByHardcoded.patch new file mode 100644 index 0000000..878975a --- /dev/null +++ b/repalceBndManifestByHardcoded.patch @@ -0,0 +1,12 @@ +--- a/gson/pom.xml ++++ b/gson/pom.xml +@@ -114,7 +114,7 @@ + + + +- ${project.build.outputDirectory}/META-INF/MANIFEST.MF ++ ${project.build.outputDirectory}/../../../pregenerated-MANIFEST.MF + + + +