From c8cc3cffdaa1ce5f282ed0361608a5689958403f38257177c5dfef3bc40655dd Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Mon, 25 Apr 2022 18:45:15 +0000 Subject: [PATCH 01/13] OBS-URL: https://build.opensuse.org/package/show/Java:packages/google-guice?expand=0&rev=11 --- google-guice.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/google-guice.spec b/google-guice.spec index f5297c2..69f8468 100644 --- a/google-guice.spec +++ b/google-guice.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -44,8 +44,6 @@ BuildRequires: java-devel >= 1.7 BuildRequires: javapackages-local BuildRequires: objectweb-asm BuildRequires: slf4j -BuildRequires: xmvn-install -BuildRequires: xmvn-resolve BuildArch: noarch %description From bfcec9c5921e39a4b0a5b5b20e3e3b584da5e138e62ed449f3fb1a4ce6e7e3d7 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 26 Apr 2022 07:52:31 +0000 Subject: [PATCH 02/13] OBS-URL: https://build.opensuse.org/package/show/Java:packages/google-guice?expand=0&rev=12 --- google-guice.spec | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/google-guice.spec b/google-guice.spec index 69f8468..2f97d3a 100644 --- a/google-guice.spec +++ b/google-guice.spec @@ -44,6 +44,11 @@ BuildRequires: java-devel >= 1.7 BuildRequires: javapackages-local BuildRequires: objectweb-asm BuildRequires: slf4j +Requires: mvn(aopalliance:aopalliance) +Requires: mvn(cglib:cglib) +Requires: mvn(com.google.guava:guava) +Requires: mvn(javax.inject:javax.inject) +Requires: mvn(org.ow2.asm:asm) BuildArch: noarch %description @@ -66,6 +71,7 @@ and above. This package provides parent POM for Guice modules. %package -n %{short_name}-assistedinject Summary: AssistedInject extension module for Guice Group: Development/Libraries/Java +Requires: mvn(com.google.inject:guice) = %{version} %description -n %{short_name}-assistedinject Guice is a dependency injection framework for Java 5 @@ -74,6 +80,7 @@ and above. This package provides AssistedInject module for Guice. %package -n %{short_name}-extensions Summary: Extensions for Guice Group: Development/Libraries/Java +Requires: mvn(com.google.inject:guice-parent:pom:) = %{version} %description -n %{short_name}-extensions Guice is a dependency injection framework for Java 5 @@ -82,6 +89,9 @@ and above. This package provides extensions POM for Guice. %package -n %{short_name}-grapher Summary: Grapher extension module for Guice Group: Development/Libraries/Java +Requires: mvn(com.google.inject.extensions:guice-assistedinject) = %{version} +Requires: mvn(com.google.inject.extensions:guice-multibindings) = %{version} +Requires: mvn(com.google.inject:guice) = %{version} %description -n %{short_name}-grapher Guice is a dependency injection framework for Java 5 @@ -90,6 +100,7 @@ and above. This package provides Grapher module for Guice. %package -n %{short_name}-jmx Summary: JMX extension module for Guice Group: Development/Libraries/Java +Requires: mvn(com.google.inject:guice) = %{version} %description -n %{short_name}-jmx Guice is a dependency injection framework for Java 5 @@ -98,6 +109,7 @@ and above. This package provides JMX module for Guice. %package -n %{short_name}-jndi Summary: JNDI extension module for Guice Group: Development/Libraries/Java +Requires: mvn(com.google.inject:guice) = %{version} %description -n %{short_name}-jndi Guice is a dependency injection framework for Java 5 @@ -106,6 +118,7 @@ and above. This package provides JNDI module for Guice. %package -n %{short_name}-multibindings Summary: MultiBindings extension module for Guice Group: Development/Libraries/Java +Requires: mvn(com.google.inject:guice) = %{version} %description -n %{short_name}-multibindings Guice is a dependency injection framework for Java 5 @@ -114,6 +127,7 @@ and above. This package provides MultiBindings module for Guice. %package -n %{short_name}-servlet Summary: Servlet extension module for Guice Group: Development/Libraries/Java +Requires: mvn(com.google.inject:guice) = %{version} %description -n %{short_name}-servlet Guice is a dependency injection framework for Java 5 @@ -122,6 +136,7 @@ and above. This package provides Servlet module for Guice. %package -n %{short_name}-testlib Summary: TestLib extension module for Guice Group: Development/Libraries/Java +Requires: mvn(com.google.inject:guice) = %{version} %description -n %{short_name}-testlib Guice is a dependency injection framework for Java 5 @@ -130,6 +145,7 @@ and above. This package provides TestLib module for Guice. %package -n %{short_name}-throwingproviders Summary: ThrowingProviders extension module for Guice Group: Development/Libraries/Java +Requires: mvn(com.google.inject:guice) = %{version} %description -n %{short_name}-throwingproviders Guice is a dependency injection framework for Java 5 @@ -138,6 +154,7 @@ and above. This package provides ThrowingProviders module for Guice. %package -n %{short_name}-bom Summary: Bill of Materials for Guice Group: Development/Libraries/Java +Requires: mvn(com.google.inject:guice-parent:pom:) = %{version} %description -n %{short_name}-bom Guice is a dependency injection framework for Java 5 From d907ec975fee6a9c81042d7963c7009b7a23b003477378d1107f26f4a1ca3842 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 26 Apr 2022 08:56:53 +0000 Subject: [PATCH 03/13] OBS-URL: https://build.opensuse.org/package/show/Java:packages/google-guice?expand=0&rev=13 --- google-guice.spec | 114 +++++++++++++++++++++++++++------------------- 1 file changed, 68 insertions(+), 46 deletions(-) diff --git a/google-guice.spec b/google-guice.spec index 2f97d3a..a14273e 100644 --- a/google-guice.spec +++ b/google-guice.spec @@ -201,7 +201,6 @@ find . -name "*.class" -delete %pom_xpath_remove "pom:dependency[pom:classifier[text()='tests']]" extensions %pom_remove_parent -%pom_set_parent com.google.inject:guice-parent:%{version} jdk8-tests %pom_disable_module persist extensions %pom_disable_module spring extensions @@ -222,15 +221,6 @@ find . -name "*.class" -delete %pom_xpath_remove "pom:optional" core %build -%{mvn_alias} "com.google.inject.extensions:" "org.sonatype.sisu.inject:" - -%{mvn_package} :::no_aop: guice -%{mvn_package} :{*} @1 - -%{mvn_file} ":guice-{*}" %{short_name}/guice-@1 -%{mvn_file} ":guice" %{short_name}/%{name} %{name} -%{mvn_alias} ":guice" "org.sonatype.sisu:sisu-guice" - mkdir -p lib/build mkdir -p extensions/servlet/lib/build build-jar-repository -s -p lib/build \ @@ -242,59 +232,91 @@ pushd build/no_aop popd %{ant} -Dversion=%{version} dist javadoc -%{mvn_artifact} pom.xml -%{mvn_artifact} bom/pom.xml -%{mvn_artifact} build/no_aop/core/pom.xml build/no_aop/build/guice-%{version}.jar -# a huge hack to force the no_aop classifier to the version 2.3.0 reactor -perl -pi -e 's#guice#guiceno_aop#g' .xmvn-reactor -%{mvn_artifact} core/pom.xml build/guice-%{version}.jar -%{mvn_artifact} extensions/pom.xml -%{mvn_artifact} extensions/jmx/pom.xml build/dist/guice-jmx-%{version}.jar -%{mvn_artifact} extensions/assistedinject/pom.xml build/dist/guice-assistedinject-%{version}.jar -%{mvn_artifact} extensions/multibindings/pom.xml build/dist/guice-multibindings-%{version}.jar -%{mvn_artifact} extensions/throwingproviders/pom.xml build/dist/guice-throwingproviders-%{version}.jar -%{mvn_artifact} extensions/servlet/pom.xml build/dist/guice-servlet-%{version}.jar -%{mvn_artifact} extensions/jndi/pom.xml build/dist/guice-jndi-%{version}.jar -%{mvn_artifact} extensions/testlib/pom.xml build/dist/guice-testlib-%{version}.jar -%{mvn_artifact} extensions/grapher/pom.xml build/dist/guice-grapher-%{version}.jar - %install -%mvn_install -J build/docs/javadoc +# jars +install -dm 0755 %{buildroot}%{_javadir}/%{short_name} +install -pm 0644 build/no_aop/build/guice-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{name}-no_aop.jar +ln -sf %{short_name}/%{name}-no_aop.jar %{buildroot}%{_javadir}/%{name}-no_aop.jar +install -pm 0644 build/guice-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{name}.jar +ln -sf %{short_name}/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar + +install -pm 0644 build/dist/guice-jmx-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/guice-jmx.jar +install -pm 0644 build/dist/guice-assistedinject-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/guice-assistedinject.jar +install -pm 0644 build/dist/guice-multibindings-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/guice-multibindings.jar +install -pm 0644 build/dist/guice-throwingproviders-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/guice-throwingproviders.jar +install -pm 0644 build/dist/guice-servlet-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/guice-servlet.jar +install -pm 0644 build/dist/guice-jndi-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/guice-jndi.jar +install -pm 0644 build/dist/guice-testlib-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/guice-testlib.jar +install -pm 0644 build/dist/guice-grapher-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/guice-grapher.jar + +# poms +install -dm 0755 %{buildroot}%{_mavenpomdir}/%{short_name} +install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-parent.pom +%add_maven_depmap %{short_name}/guice-parent.pom -f parent +install -pm 0644 bom/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-bom.pom +%add_maven_depmap %{short_name}/guice-bom.pom -f bom + +install -pm 0644 build/no_aop/core/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/%{name}-no_aop.pom +%add_maven_depmap %{short_name}/%{name}-no_aop.pom %{short_name}/%{name}-no_aop.jar -a org.sonatype.sisu:sisu-guice::no_aop: +# a huge hack to force the no_aop classifier to the version 2.3.0 reactor +perl -pi -e 's#guice#guiceno_aop#g' %{buildroot}%{_datadir}/maven-metadata/%{name}.xml +install -pm 0644 core/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/%{name}.pom +%add_maven_depmap %{short_name}/%{name}.pom %{short_name}/%{name}.jar -a org.sonatype.sisu:sisu-guice + +install -pm 0644 extensions/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/extensions-parent.pom +%add_maven_depmap %{short_name}/extensions-parent.pom -a org.sonatype.sisu.inject:extensions-parent -f extensions + +install -pm 0644 extensions/jmx/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-jmx.pom +%add_maven_depmap %{short_name}/guice-jmx.pom %{short_name}/guice-jmx.jar -a org.sonatype.sisu.inject:guice-jmx -f jmx +install -pm 0644 extensions/assistedinject/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-assistedinject.pom +%add_maven_depmap %{short_name}/guice-assistedinject.pom %{short_name}/guice-assistedinject.jar -a org.sonatype.sisu.inject:guice-assistedinject -f assistedinject +install -pm 0644 extensions/multibindings/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-multibindings.pom +%add_maven_depmap %{short_name}/guice-multibindings.pom %{short_name}/guice-multibindings.jar -a org.sonatype.sisu.inject:guice-multibindings -f multibindings +install -pm 0644 extensions/throwingproviders/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-throwingproviders.pom +%add_maven_depmap %{short_name}/guice-throwingproviders.pom %{short_name}/guice-throwingproviders.jar -a org.sonatype.sisu.inject:guice-throwingproviders -f throwingproviders +install -pm 0644 extensions/servlet/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-servlet.pom +%add_maven_depmap %{short_name}/guice-servlet.pom %{short_name}/guice-servlet.jar -a org.sonatype.sisu.inject:guice-servlet -f servlet +install -pm 0644 extensions/jndi/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-jndi.pom +%add_maven_depmap %{short_name}/guice-jndi.pom %{short_name}/guice-jndi.jar -a org.sonatype.sisu.inject:guice-jndi -f jndi +install -pm 0644 extensions/testlib/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-testlib.pom +%add_maven_depmap %{short_name}/guice-testlib.pom %{short_name}/guice-testlib.jar -a org.sonatype.sisu.inject:guice-testlib -f testlib +install -pm 0644 extensions/grapher/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-grapher.pom +%add_maven_depmap %{short_name}/guice-grapher.pom %{short_name}/guice-grapher.jar -a org.sonatype.sisu.inject:guice-grapher -f grapher + +# javadoc +install -dm 0755 %{buildroot}%{_javadocdir}/%{name} +cp -pr build/docs/javadoc/* %{buildroot}%{_javadocdir}/%{name}/ %fdupes -s %{buildroot}%{_javadocdir} -%files -f .mfiles-guice +%files -f .mfiles %dir %{_javadir}/%{short_name} +%{_javadir}/%{name}*.jar -%files -n %{short_name}-parent -f .mfiles-guice-parent +%files -n %{short_name}-parent -f .mfiles-parent %license COPYING -%files -n %{short_name}-assistedinject -f .mfiles-guice-assistedinject +%files -n %{short_name}-assistedinject -f .mfiles-assistedinject -%files -n %{short_name}-extensions -f .mfiles-extensions-parent +%files -n %{short_name}-extensions -f .mfiles-extensions -%files -n %{short_name}-grapher -f .mfiles-guice-grapher +%files -n %{short_name}-grapher -f .mfiles-grapher -%files -n %{short_name}-jmx -f .mfiles-guice-jmx +%files -n %{short_name}-jmx -f .mfiles-jmx -%files -n %{short_name}-jndi -f .mfiles-guice-jndi +%files -n %{short_name}-jndi -f .mfiles-jndi -%files -n %{short_name}-multibindings -f .mfiles-guice-multibindings -%if %{with jpa} -%files -n %{short_name}-persist -f .mfiles-guice-persist -%endif +%files -n %{short_name}-multibindings -f .mfiles-multibindings -%files -n %{short_name}-servlet -f .mfiles-guice-servlet -%if %{with spring} -%files -n %{short_name}-spring -f .mfiles-guice-spring -%endif +%files -n %{short_name}-servlet -f .mfiles-servlet -%files -n %{short_name}-testlib -f .mfiles-guice-testlib +%files -n %{short_name}-testlib -f .mfiles-testlib -%files -n %{short_name}-throwingproviders -f .mfiles-guice-throwingproviders +%files -n %{short_name}-throwingproviders -f .mfiles-throwingproviders -%files -n %{short_name}-bom -f .mfiles-guice-bom +%files -n %{short_name}-bom -f .mfiles-bom -%files javadoc -f .mfiles-javadoc +%files javadoc +%{_javadocdir}/%{name} %license COPYING %changelog From 3ddf7627649e502418dadf0a82b4967b6733dec5ed81c5cece1b4a9f636a9ef1 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 26 Apr 2022 08:59:57 +0000 Subject: [PATCH 04/13] OBS-URL: https://build.opensuse.org/package/show/Java:packages/google-guice?expand=0&rev=14 --- google-guice.spec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/google-guice.spec b/google-guice.spec index a14273e..ad6bf1c 100644 --- a/google-guice.spec +++ b/google-guice.spec @@ -255,6 +255,8 @@ install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-parent. %add_maven_depmap %{short_name}/guice-parent.pom -f parent install -pm 0644 bom/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-bom.pom %add_maven_depmap %{short_name}/guice-bom.pom -f bom +install -pm 0644 extensions/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/extensions-parent.pom +%add_maven_depmap %{short_name}/extensions-parent.pom -a org.sonatype.sisu.inject:extensions-parent -f extensions install -pm 0644 build/no_aop/core/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/%{name}-no_aop.pom %add_maven_depmap %{short_name}/%{name}-no_aop.pom %{short_name}/%{name}-no_aop.jar -a org.sonatype.sisu:sisu-guice::no_aop: @@ -263,9 +265,6 @@ perl -pi -e 's#guice#guice Date: Tue, 26 Apr 2022 09:08:09 +0000 Subject: [PATCH 05/13] OBS-URL: https://build.opensuse.org/package/show/Java:packages/google-guice?expand=0&rev=15 --- google-guice.spec | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/google-guice.spec b/google-guice.spec index ad6bf1c..a1b09c5 100644 --- a/google-guice.spec +++ b/google-guice.spec @@ -71,7 +71,7 @@ and above. This package provides parent POM for Guice modules. %package -n %{short_name}-assistedinject Summary: AssistedInject extension module for Guice Group: Development/Libraries/Java -Requires: mvn(com.google.inject:guice) = %{version} +Requires: mvn(com.google.inject:guice) %description -n %{short_name}-assistedinject Guice is a dependency injection framework for Java 5 @@ -80,7 +80,7 @@ and above. This package provides AssistedInject module for Guice. %package -n %{short_name}-extensions Summary: Extensions for Guice Group: Development/Libraries/Java -Requires: mvn(com.google.inject:guice-parent:pom:) = %{version} +Requires: mvn(com.google.inject:guice-parent:pom:) %description -n %{short_name}-extensions Guice is a dependency injection framework for Java 5 @@ -89,9 +89,9 @@ and above. This package provides extensions POM for Guice. %package -n %{short_name}-grapher Summary: Grapher extension module for Guice Group: Development/Libraries/Java -Requires: mvn(com.google.inject.extensions:guice-assistedinject) = %{version} -Requires: mvn(com.google.inject.extensions:guice-multibindings) = %{version} -Requires: mvn(com.google.inject:guice) = %{version} +Requires: mvn(com.google.inject.extensions:guice-assistedinject) +Requires: mvn(com.google.inject.extensions:guice-multibindings) +Requires: mvn(com.google.inject:guice) %description -n %{short_name}-grapher Guice is a dependency injection framework for Java 5 @@ -100,7 +100,7 @@ and above. This package provides Grapher module for Guice. %package -n %{short_name}-jmx Summary: JMX extension module for Guice Group: Development/Libraries/Java -Requires: mvn(com.google.inject:guice) = %{version} +Requires: mvn(com.google.inject:guice) %description -n %{short_name}-jmx Guice is a dependency injection framework for Java 5 @@ -109,7 +109,7 @@ and above. This package provides JMX module for Guice. %package -n %{short_name}-jndi Summary: JNDI extension module for Guice Group: Development/Libraries/Java -Requires: mvn(com.google.inject:guice) = %{version} +Requires: mvn(com.google.inject:guice) %description -n %{short_name}-jndi Guice is a dependency injection framework for Java 5 @@ -118,7 +118,7 @@ and above. This package provides JNDI module for Guice. %package -n %{short_name}-multibindings Summary: MultiBindings extension module for Guice Group: Development/Libraries/Java -Requires: mvn(com.google.inject:guice) = %{version} +Requires: mvn(com.google.inject:guice) %description -n %{short_name}-multibindings Guice is a dependency injection framework for Java 5 @@ -127,7 +127,7 @@ and above. This package provides MultiBindings module for Guice. %package -n %{short_name}-servlet Summary: Servlet extension module for Guice Group: Development/Libraries/Java -Requires: mvn(com.google.inject:guice) = %{version} +Requires: mvn(com.google.inject:guice) %description -n %{short_name}-servlet Guice is a dependency injection framework for Java 5 @@ -136,7 +136,7 @@ and above. This package provides Servlet module for Guice. %package -n %{short_name}-testlib Summary: TestLib extension module for Guice Group: Development/Libraries/Java -Requires: mvn(com.google.inject:guice) = %{version} +Requires: mvn(com.google.inject:guice) %description -n %{short_name}-testlib Guice is a dependency injection framework for Java 5 @@ -145,7 +145,7 @@ and above. This package provides TestLib module for Guice. %package -n %{short_name}-throwingproviders Summary: ThrowingProviders extension module for Guice Group: Development/Libraries/Java -Requires: mvn(com.google.inject:guice) = %{version} +Requires: mvn(com.google.inject:guice) %description -n %{short_name}-throwingproviders Guice is a dependency injection framework for Java 5 @@ -154,7 +154,7 @@ and above. This package provides ThrowingProviders module for Guice. %package -n %{short_name}-bom Summary: Bill of Materials for Guice Group: Development/Libraries/Java -Requires: mvn(com.google.inject:guice-parent:pom:) = %{version} +Requires: mvn(com.google.inject:guice-parent:pom:) %description -n %{short_name}-bom Guice is a dependency injection framework for Java 5 From 674c84101c20b99c6fba6e1be30e9b944cc1583864094974d28899503bb193d1 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 26 Apr 2022 10:47:06 +0000 Subject: [PATCH 06/13] OBS-URL: https://build.opensuse.org/package/show/Java:packages/google-guice?expand=0&rev=16 --- google-guice.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/google-guice.spec b/google-guice.spec index a1b09c5..369fd5f 100644 --- a/google-guice.spec +++ b/google-guice.spec @@ -202,6 +202,11 @@ find . -name "*.class" -delete %pom_remove_parent +%pom_remove_parent core +%pom_xpath_inject pom:project " + com.google.inject + 4.1.0" core + %pom_disable_module persist extensions %pom_disable_module spring extensions From 478f9df260b76fa99d57f390d50bf6c2d066b74b5dab4e14917ddabe181571c2 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 26 Apr 2022 12:27:43 +0000 Subject: [PATCH 07/13] OBS-URL: https://build.opensuse.org/package/show/Java:packages/google-guice?expand=0&rev=17 --- google-guice.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/google-guice.spec b/google-guice.spec index 369fd5f..371171b 100644 --- a/google-guice.spec +++ b/google-guice.spec @@ -176,7 +176,8 @@ This package provides %{summary}. find . -name "*.jar" -and ! -name "munge.jar" -delete find . -name "*.class" -delete -# We don't have struts2 in Fedora yet. +%pom_change_dep -r -f ::::: ::::: + %pom_disable_module struts2 extensions # Android-specific extension %pom_disable_module dagger-adapter extensions @@ -207,6 +208,13 @@ find . -name "*.class" -delete com.google.inject 4.1.0" core +for mdl in assistedinject dagger-adapter grapher jmx jndi multibindings persist servlet spring struts2 testlib throwingproviders; do + %pom_remove_parent extensions/${mdl} + %pom_xpath_inject pom:project " + com.google.inject.extensions + 4.1.0" extensions/${mdl} +done + %pom_disable_module persist extensions %pom_disable_module spring extensions From 85e3bdd672e2f1e7b80339f94893cd01b860847556ecdef0c785fd4ab4842720 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 26 Apr 2022 16:35:59 +0000 Subject: [PATCH 08/13] OBS-URL: https://build.opensuse.org/package/show/Java:packages/google-guice?expand=0&rev=18 --- create-tarball.sh | 2 +- google-guice.spec | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/create-tarball.sh b/create-tarball.sh index 8033931..fca9092 100644 --- a/create-tarball.sh +++ b/create-tarball.sh @@ -2,7 +2,7 @@ set -e -x test $# -eq 1 test ! -d guice -git clone git://github.com/google/guice.git +git clone https://github.com/google/guice.git cd ./guice git checkout ${1} git branch unbundled-${1} diff --git a/google-guice.spec b/google-guice.spec index 371171b..cb6d2e2 100644 --- a/google-guice.spec +++ b/google-guice.spec @@ -176,8 +176,6 @@ This package provides %{summary}. find . -name "*.jar" -and ! -name "munge.jar" -delete find . -name "*.class" -delete -%pom_change_dep -r -f ::::: ::::: - %pom_disable_module struts2 extensions # Android-specific extension %pom_disable_module dagger-adapter extensions From 59162fb8886e3c0d1833617be711287536693ad3aa69ce4c0c172e503a8ec860 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 27 Apr 2022 11:40:56 +0000 Subject: [PATCH 09/13] OBS-URL: https://build.opensuse.org/package/show/Java:packages/google-guice?expand=0&rev=19 --- google-guice.spec | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/google-guice.spec b/google-guice.spec index cb6d2e2..50cfcae 100644 --- a/google-guice.spec +++ b/google-guice.spec @@ -238,7 +238,6 @@ build-jar-repository -s -p lib/build \ guava javax.inject glassfish-servlet-api aopalliance cglib objectweb-asm aqute-bnd jarjar %{ant} clean.all no_aop pushd build/no_aop -%pom_xpath_inject "pom:project" "no_aop" core %{ant} -Dversion=%{version} jar popd %{ant} -Dversion=%{version} dist javadoc @@ -246,10 +245,11 @@ popd %install # jars install -dm 0755 %{buildroot}%{_javadir}/%{short_name} -install -pm 0644 build/no_aop/build/guice-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{name}-no_aop.jar -ln -sf %{short_name}/%{name}-no_aop.jar %{buildroot}%{_javadir}/%{name}-no_aop.jar -install -pm 0644 build/guice-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{name}.jar +install -pm 0644 build/no_aop/build/guice-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/%{name}.jar +# Provide symlinks for all jars that existed, no_aop and aop ln -sf %{short_name}/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar +ln -sf %{name}.jar %{buildroot}%{_javadir}/%{short_name}/%{name}-no_aop.jar +ln -sf %{short_name}/%{name}.jar %{buildroot}%{_javadir}/%{name}-no_aop.jar install -pm 0644 build/dist/guice-jmx-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/guice-jmx.jar install -pm 0644 build/dist/guice-assistedinject-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/guice-assistedinject.jar @@ -269,12 +269,8 @@ install -pm 0644 bom/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-bom install -pm 0644 extensions/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/extensions-parent.pom %add_maven_depmap %{short_name}/extensions-parent.pom -a org.sonatype.sisu.inject:extensions-parent -f extensions -install -pm 0644 build/no_aop/core/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/%{name}-no_aop.pom -%add_maven_depmap %{short_name}/%{name}-no_aop.pom %{short_name}/%{name}-no_aop.jar -a org.sonatype.sisu:sisu-guice::no_aop: -# a huge hack to force the no_aop classifier to the version 2.3.0 reactor -perl -pi -e 's#guice#guiceno_aop#g' %{buildroot}%{_datadir}/maven-metadata/%{name}.xml -install -pm 0644 core/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/%{name}.pom -%add_maven_depmap %{short_name}/%{name}.pom %{short_name}/%{name}.jar -a org.sonatype.sisu:sisu-guice +install -pm 0644 build/no_aop/core/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/%{name}.pom +%add_maven_depmap %{short_name}/%{name}.pom %{short_name}/%{name}.jar -a "org.sonatype.sisu:sisu-guice,com.google.inject:guice::no_aop:,org.sonatype.sisu:sisu-guice::no_aop:" install -pm 0644 extensions/jmx/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-jmx.pom %add_maven_depmap %{short_name}/guice-jmx.pom %{short_name}/guice-jmx.jar -a org.sonatype.sisu.inject:guice-jmx -f jmx @@ -301,6 +297,7 @@ cp -pr build/docs/javadoc/* %{buildroot}%{_javadocdir}/%{name}/ %files -f .mfiles %dir %{_javadir}/%{short_name} %{_javadir}/%{name}*.jar +%{_javadir}/%{short_name}/*-no_aop.jar %files -n %{short_name}-parent -f .mfiles-parent %license COPYING From a19e20371294058c9ac26049ad42d6000e634d1a3499f6f23401899cd4dfcd2d Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 27 Apr 2022 11:52:15 +0000 Subject: [PATCH 10/13] OBS-URL: https://build.opensuse.org/package/show/Java:packages/google-guice?expand=0&rev=20 --- google-guice.spec | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/google-guice.spec b/google-guice.spec index 50cfcae..16d7186 100644 --- a/google-guice.spec +++ b/google-guice.spec @@ -39,16 +39,12 @@ BuildRequires: cglib BuildRequires: fdupes BuildRequires: glassfish-servlet-api BuildRequires: guava -BuildRequires: jarjar BuildRequires: java-devel >= 1.7 BuildRequires: javapackages-local BuildRequires: objectweb-asm BuildRequires: slf4j -Requires: mvn(aopalliance:aopalliance) -Requires: mvn(cglib:cglib) Requires: mvn(com.google.guava:guava) Requires: mvn(javax.inject:javax.inject) -Requires: mvn(org.ow2.asm:asm) BuildArch: noarch %description @@ -235,9 +231,12 @@ done mkdir -p lib/build mkdir -p extensions/servlet/lib/build build-jar-repository -s -p lib/build \ - guava javax.inject glassfish-servlet-api aopalliance cglib objectweb-asm aqute-bnd jarjar + guava javax.inject glassfish-servlet-api aopalliance cglib objectweb-asm aqute-bnd %{ant} clean.all no_aop pushd build/no_aop +%pom_remove_dep :aopalliance core +%pom_remove_dep :asm core +%pom_remove_dep :cglib core %{ant} -Dversion=%{version} jar popd %{ant} -Dversion=%{version} dist javadoc From d20646de4d86a3cfdb87c075598188601347114684e48c87a20436872ee20f39 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 27 Apr 2022 11:56:43 +0000 Subject: [PATCH 11/13] OBS-URL: https://build.opensuse.org/package/show/Java:packages/google-guice?expand=0&rev=21 --- google-guice.changes | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/google-guice.changes b/google-guice.changes index 9a3f430..8938b41 100644 --- a/google-guice.changes +++ b/google-guice.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Apr 27 11:52:34 UTC 2022 - Fridrich Strba + +- Avoid using xmvn-resolve and xmvn-install in order to avoid + build cycles with new dependencies in dependent packages +- Build only the NO_AOP version of the guice.jar and alias + accordingly so that it provides both + ------------------------------------------------------------------- Thu Jun 10 10:16:03 UTC 2021 - Fridrich Strba From b7aea2a9e7dcb7f0912f917ea8519a9fdc7164fe22c3f2e3ee9af1907a8642d5 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 27 Apr 2022 12:32:00 +0000 Subject: [PATCH 12/13] OBS-URL: https://build.opensuse.org/package/show/Java:packages/google-guice?expand=0&rev=22 --- google-guice.spec | 61 +++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/google-guice.spec b/google-guice.spec index 16d7186..b528e0a 100644 --- a/google-guice.spec +++ b/google-guice.spec @@ -32,17 +32,13 @@ Patch1: guice-4.1-disabledextensions.patch Patch2: guice-4.1-javadoc.patch Patch3: google-guice-throwingproviderbinder.patch BuildRequires: ant -BuildRequires: aopalliance BuildRequires: aqute-bnd BuildRequires: atinject -BuildRequires: cglib BuildRequires: fdupes BuildRequires: glassfish-servlet-api BuildRequires: guava -BuildRequires: java-devel >= 1.7 +BuildRequires: java-devel >= 1.8 BuildRequires: javapackages-local -BuildRequires: objectweb-asm -BuildRequires: slf4j Requires: mvn(com.google.guava:guava) Requires: mvn(javax.inject:javax.inject) BuildArch: noarch @@ -229,17 +225,16 @@ done %build mkdir -p lib/build -mkdir -p extensions/servlet/lib/build build-jar-repository -s -p lib/build \ - guava javax.inject glassfish-servlet-api aopalliance cglib objectweb-asm aqute-bnd + guava javax.inject glassfish-servlet-api aqute-bnd %{ant} clean.all no_aop pushd build/no_aop +mkdir -p extensions/servlet/lib/build %pom_remove_dep :aopalliance core %pom_remove_dep :asm core %pom_remove_dep :cglib core -%{ant} -Dversion=%{version} jar -popd %{ant} -Dversion=%{version} dist javadoc +popd %install # jars @@ -250,47 +245,55 @@ ln -sf %{short_name}/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar ln -sf %{name}.jar %{buildroot}%{_javadir}/%{short_name}/%{name}-no_aop.jar ln -sf %{short_name}/%{name}.jar %{buildroot}%{_javadir}/%{name}-no_aop.jar -install -pm 0644 build/dist/guice-jmx-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/guice-jmx.jar -install -pm 0644 build/dist/guice-assistedinject-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/guice-assistedinject.jar -install -pm 0644 build/dist/guice-multibindings-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/guice-multibindings.jar -install -pm 0644 build/dist/guice-throwingproviders-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/guice-throwingproviders.jar -install -pm 0644 build/dist/guice-servlet-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/guice-servlet.jar -install -pm 0644 build/dist/guice-jndi-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/guice-jndi.jar -install -pm 0644 build/dist/guice-testlib-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/guice-testlib.jar -install -pm 0644 build/dist/guice-grapher-%{version}.jar %{buildroot}%{_javadir}/%{short_name}/guice-grapher.jar +install -pm 0644 build/no_aop/build/dist/guice-jmx-%{version}.jar \ + %{buildroot}%{_javadir}/%{short_name}/guice-jmx.jar +install -pm 0644 build/no_aop/build/dist/guice-assistedinject-%{version}.jar \ + %{buildroot}%{_javadir}/%{short_name}/guice-assistedinject.jar +install -pm 0644 build/no_aop/build/dist/guice-multibindings-%{version}.jar \ + %{buildroot}%{_javadir}/%{short_name}/guice-multibindings.jar +install -pm 0644 build/no_aop/build/dist/guice-throwingproviders-%{version}.jar \ + %{buildroot}%{_javadir}/%{short_name}/guice-throwingproviders.jar +install -pm 0644 build/no_aop/build/dist/guice-servlet-%{version}.jar \ + %{buildroot}%{_javadir}/%{short_name}/guice-servlet.jar +install -pm 0644 build/no_aop/build/dist/guice-jndi-%{version}.jar \ + %{buildroot}%{_javadir}/%{short_name}/guice-jndi.jar +install -pm 0644 build/no_aop/build/dist/guice-testlib-%{version}.jar \ + %{buildroot}%{_javadir}/%{short_name}/guice-testlib.jar +install -pm 0644 build/no_aop/build/dist/guice-grapher-%{version}.jar \ + %{buildroot}%{_javadir}/%{short_name}/guice-grapher.jar # poms install -dm 0755 %{buildroot}%{_mavenpomdir}/%{short_name} -install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-parent.pom +install -pm 0644 build/no_aop/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-parent.pom %add_maven_depmap %{short_name}/guice-parent.pom -f parent -install -pm 0644 bom/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-bom.pom +install -pm 0644 build/no_aop/bom/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-bom.pom %add_maven_depmap %{short_name}/guice-bom.pom -f bom -install -pm 0644 extensions/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/extensions-parent.pom +install -pm 0644 build/no_aop/extensions/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/extensions-parent.pom %add_maven_depmap %{short_name}/extensions-parent.pom -a org.sonatype.sisu.inject:extensions-parent -f extensions install -pm 0644 build/no_aop/core/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/%{name}.pom %add_maven_depmap %{short_name}/%{name}.pom %{short_name}/%{name}.jar -a "org.sonatype.sisu:sisu-guice,com.google.inject:guice::no_aop:,org.sonatype.sisu:sisu-guice::no_aop:" -install -pm 0644 extensions/jmx/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-jmx.pom +install -pm 0644 build/no_aop/extensions/jmx/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-jmx.pom %add_maven_depmap %{short_name}/guice-jmx.pom %{short_name}/guice-jmx.jar -a org.sonatype.sisu.inject:guice-jmx -f jmx -install -pm 0644 extensions/assistedinject/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-assistedinject.pom +install -pm 0644 build/no_aop/extensions/assistedinject/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-assistedinject.pom %add_maven_depmap %{short_name}/guice-assistedinject.pom %{short_name}/guice-assistedinject.jar -a org.sonatype.sisu.inject:guice-assistedinject -f assistedinject -install -pm 0644 extensions/multibindings/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-multibindings.pom +install -pm 0644 build/no_aop/extensions/multibindings/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-multibindings.pom %add_maven_depmap %{short_name}/guice-multibindings.pom %{short_name}/guice-multibindings.jar -a org.sonatype.sisu.inject:guice-multibindings -f multibindings -install -pm 0644 extensions/throwingproviders/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-throwingproviders.pom +install -pm 0644 build/no_aop/extensions/throwingproviders/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-throwingproviders.pom %add_maven_depmap %{short_name}/guice-throwingproviders.pom %{short_name}/guice-throwingproviders.jar -a org.sonatype.sisu.inject:guice-throwingproviders -f throwingproviders -install -pm 0644 extensions/servlet/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-servlet.pom +install -pm 0644 build/no_aop/extensions/servlet/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-servlet.pom %add_maven_depmap %{short_name}/guice-servlet.pom %{short_name}/guice-servlet.jar -a org.sonatype.sisu.inject:guice-servlet -f servlet -install -pm 0644 extensions/jndi/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-jndi.pom +install -pm 0644 build/no_aop/extensions/jndi/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-jndi.pom %add_maven_depmap %{short_name}/guice-jndi.pom %{short_name}/guice-jndi.jar -a org.sonatype.sisu.inject:guice-jndi -f jndi -install -pm 0644 extensions/testlib/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-testlib.pom +install -pm 0644 build/no_aop/extensions/testlib/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-testlib.pom %add_maven_depmap %{short_name}/guice-testlib.pom %{short_name}/guice-testlib.jar -a org.sonatype.sisu.inject:guice-testlib -f testlib -install -pm 0644 extensions/grapher/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-grapher.pom +install -pm 0644 build/no_aop/extensions/grapher/pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}/guice-grapher.pom %add_maven_depmap %{short_name}/guice-grapher.pom %{short_name}/guice-grapher.jar -a org.sonatype.sisu.inject:guice-grapher -f grapher # javadoc install -dm 0755 %{buildroot}%{_javadocdir}/%{name} -cp -pr build/docs/javadoc/* %{buildroot}%{_javadocdir}/%{name}/ +cp -pr build/no_aop/build/docs/javadoc/* %{buildroot}%{_javadocdir}/%{name}/ %fdupes -s %{buildroot}%{_javadocdir} %files -f .mfiles From f54ea9d9cd8595abc0353d5127cad10f83cf195cf59a27f3c311c0ad154fdbbd Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 27 Apr 2022 19:19:27 +0000 Subject: [PATCH 13/13] OBS-URL: https://build.opensuse.org/package/show/Java:packages/google-guice?expand=0&rev=23 --- google-guice.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/google-guice.spec b/google-guice.spec index b528e0a..619b826 100644 --- a/google-guice.spec +++ b/google-guice.spec @@ -191,6 +191,7 @@ find . -name "*.class" -delete %pom_remove_dep :guava-testlib extensions %pom_xpath_remove "pom:dependency[pom:classifier[text()='tests']]" extensions +%pom_change_dep -r -f ::::: ::::: %pom_remove_parent %pom_remove_parent core