From 0669aa63258119211bf509ff5709805fbf55526f Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Thu, 23 Jun 2011 16:16:32 +0200 Subject: [PATCH] Update to latest upstream 2.2.3 (#683795) - Add forge-parent to Requires - Rework spec to be more simple, update patches --- 0001-Remove-test-deps.patch | 36 +++++++---- 0002-Fix-plexus-bundling.patch | 54 ++++++++--------- sisu-depmap.xml | 11 +++- sisu.spec | 105 +++++++++++++++++++++++++-------- 4 files changed, 138 insertions(+), 68 deletions(-) diff --git a/0001-Remove-test-deps.patch b/0001-Remove-test-deps.patch index f0f7d46..c65620a 100644 --- a/0001-Remove-test-deps.patch +++ b/0001-Remove-test-deps.patch @@ -1,17 +1,18 @@ -From 3851989abd3be705ed6e2bdeed733192e795c654 Mon Sep 17 00:00:00 2001 +From 9291bbba398b0ca8e4c72cd7e26ea031cfc87843 Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Mon, 28 Feb 2011 13:52:40 +0100 Subject: [PATCH 1/2] Remove test deps --- - pom.xml | 15 --------------- - 1 files changed, 0 insertions(+), 15 deletions(-) + pom.xml | 13 ------------- + .../guice-bean/guice-bean-containers/pom.xml | 6 ------ + 2 files changed, 0 insertions(+), 19 deletions(-) diff --git a/pom.xml b/pom.xml -index 35ecf55..5f4ac89 100644 +index 80e1d17..fbb4b73 100644 --- a/pom.xml +++ b/pom.xml -@@ -98,21 +98,6 @@ +@@ -98,19 +98,6 @@ https://repository.sonatype.org/service/local/staging/deploy/maven2 @@ -19,13 +20,11 @@ index 35ecf55..5f4ac89 100644 - - ch.qos.logback - logback-classic -- 0.9.28 - test - - -- org.testng -- testng -- 5.14.9 +- junit +- junit - test - - @@ -33,6 +32,23 @@ index 35ecf55..5f4ac89 100644 +diff --git a/sisu-inject/containers/guice-bean/guice-bean-containers/pom.xml b/sisu-inject/containers/guice-bean/guice-bean-containers/pom.xml +index 5e4fe00..e62de33 100644 +--- a/sisu-inject/containers/guice-bean/guice-bean-containers/pom.xml ++++ b/sisu-inject/containers/guice-bean/guice-bean-containers/pom.xml +@@ -71,12 +71,6 @@ + testng + true + +- +- org.sonatype.sisu.inject +- guice-assistedinject +- ${sisu.guice.version} +- test +- + + + -- -1.7.4 +1.7.5.4 diff --git a/0002-Fix-plexus-bundling.patch b/0002-Fix-plexus-bundling.patch index b3d2496..18c9ccd 100644 --- a/0002-Fix-plexus-bundling.patch +++ b/0002-Fix-plexus-bundling.patch @@ -1,31 +1,33 @@ -From 41cd3cd04bff79d15d2e4eebdc33a429f0aa41f2 Mon Sep 17 00:00:00 2001 +From 21a050cb2cd0e175a27191bd84a89167a63a0a5b Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Mon, 28 Feb 2011 16:41:30 +0100 Subject: [PATCH 2/2] Fix plexus bundling --- - sisu-inject/guice-bean/sisu-inject-bean/pom.xml | 1 - - .../guice-plexus/sisu-inject-plexus/pom.xml | 8 +++++--- - 2 files changed, 5 insertions(+), 4 deletions(-) + .../containers/guice-bean/sisu-inject-bean/pom.xml | 3 --- + .../guice-plexus/sisu-inject-plexus/pom.xml | 5 +++++ + 2 files changed, 5 insertions(+), 3 deletions(-) -diff --git a/sisu-inject/guice-bean/sisu-inject-bean/pom.xml b/sisu-inject/guice-bean/sisu-inject-bean/pom.xml -index 44f53bd..adbccd0 100644 ---- a/sisu-inject/guice-bean/sisu-inject-bean/pom.xml -+++ b/sisu-inject/guice-bean/sisu-inject-bean/pom.xml -@@ -74,7 +74,6 @@ +diff --git a/sisu-inject/containers/guice-bean/sisu-inject-bean/pom.xml b/sisu-inject/containers/guice-bean/sisu-inject-bean/pom.xml +index 255740d..3b07992 100644 +--- a/sisu-inject/containers/guice-bean/sisu-inject-bean/pom.xml ++++ b/sisu-inject/containers/guice-bean/sisu-inject-bean/pom.xml +@@ -100,9 +100,6 @@ + org.slf4j - org.sonatype.inject;-noimport:=true;-split-package:=merge-first;version=${project.version}, -- javax.*|org.aopalliance.*;version=1 - - - org.sonatype.guice.bean.* -diff --git a/sisu-inject/guice-plexus/sisu-inject-plexus/pom.xml b/sisu-inject/guice-plexus/sisu-inject-plexus/pom.xml -index c49291f..4552450 100644 ---- a/sisu-inject/guice-plexus/sisu-inject-plexus/pom.xml -+++ b/sisu-inject/guice-plexus/sisu-inject-plexus/pom.xml -@@ -51,6 +51,11 @@ - guice-plexus-shim +- +- javax.inject|javax.enterprise.inject;version=1, +- org.aopalliance.aop|org.aopalliance.intercept;version=1, + + org.sonatype.inject;-split-package:=merge-first;version=${project.version}, + +diff --git a/sisu-inject/containers/guice-plexus/sisu-inject-plexus/pom.xml b/sisu-inject/containers/guice-plexus/sisu-inject-plexus/pom.xml +index 1cdf9b9..fc2d578 100644 +--- a/sisu-inject/containers/guice-plexus/sisu-inject-plexus/pom.xml ++++ b/sisu-inject/containers/guice-plexus/sisu-inject-plexus/pom.xml +@@ -58,6 +58,11 @@ + junit true + @@ -36,16 +38,6 @@ index c49291f..4552450 100644 -@@ -74,9 +79,6 @@ - - org.slf4j,junit.framework - -- -- org.codehaus.plexus.*;-noimport:=true;-split-package:=merge-first -- - - META-INF.plexus,org.sonatype.guice.plexus.* - -- -1.7.4 +1.7.5.4 diff --git a/sisu-depmap.xml b/sisu-depmap.xml index 23bb44a..4b86523 100644 --- a/sisu-depmap.xml +++ b/sisu-depmap.xml @@ -25,5 +25,14 @@ org.osgi.core - + + + org.apache.maven.reporting + maven-reporting-api + + + JPP/maven-shared + reporting-api + + diff --git a/sisu.spec b/sisu.spec index 76f2ee9..b9aa70b 100644 --- a/sisu.spec +++ b/sisu.spec @@ -1,16 +1,16 @@ Name: sisu -Version: 2.1.1 -Release: 2%{?dist} +Version: 2.2.3 +Release: 1%{?dist} Summary: Sonatype dependency injection framework Group: Development/Tools -License: ASL 2.0 +License: ASL 2.0 and EPL URL: http://github.com/sonatype/sisu # git clone git://github.com/sonatype/sisu -# git archive --prefix="sisu-2.1.1/" --format=tar sisu-2.1.1 | bzip2 > sisu-2.1.1.tar.bz2 -Source0: %{name}-%{version}.tar.bz2 +# git archive --prefix="sisu-2.2.3/" --format=tar sisu-2.1.1 | xz > sisu-2.2.3.tar.xz +Source0: %{name}-%{version}.tar.xz Source1: %{name}-depmap.xml Patch0: 0001-Remove-test-deps.patch Patch1: 0002-Fix-plexus-bundling.patch @@ -35,7 +35,30 @@ BuildRequires: maven-jar-plugin BuildRequires: maven-compiler-plugin BuildRequires: atinject BuildRequires: felix-framework +BuildRequires: forge-parent +BuildRequires: maven-surefire-provider-testng +# to get out of cyclic build failures, should be removed in next release +# maven-resources-plugin +BuildRequires: plexus-build-api +Requires: plexus-build-api + +# maven-compiler-plugin +BuildRequires: plexus-compiler +Requires: plexus-compiler + +# maven-site-plugin and maven-dependency-plugin +BuildRequires: maven-shared-reporting-api +Requires: maven-shared-reporting-api + +# maven-surefire providers (various) +BuildRequires: maven-surefire-provider-junit4 +BuildRequires: maven-surefire-provider-junit + +# maven-dependency-plugin +BuildRequires: maven-shared-file-management + +Requires: forge-parent Requires: google-guice Requires: java >= 1:1.6.0 Requires(post): jpackage-utils @@ -55,6 +78,7 @@ Requires: jpackage-utils %prep %setup -q + %patch0 -p1 %patch1 -p1 @@ -62,9 +86,11 @@ Requires: jpackage-utils # TODO enable guice-eclipse sed -i 's:.*guice-eclipse.*::g' sisu-inject/pom.xml rm -rf sisu-inject/guice-eclipse +sed -i 's:.*sisu-eclipse-registry.*::g' sisu-inject/registries/pom.xml +rm -rf sisu-inject/registries/sisu-eclipse-registry %build -mvn-rpmbuild \ +mvn-rpmbuild -X \ -Dmaven.local.depmap.file=%{SOURCE1} \ -Dmaven.test.skip=true \ install javadoc:aggregate @@ -73,40 +99,63 @@ mvn-rpmbuild \ install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}/%{name} install -d -m 0755 $RPM_BUILD_ROOT%{_mavenpomdir} -for dir1 in sisu-inject/guice-*;do - pushd $dir1 +pushd sisu-inject +# main pom +install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-inject.pom +%add_maven_depmap JPP.%{name}-inject.pom + + +pushd containers +# main poms +install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-containers.pom +%add_maven_depmap JPP.%{name}-containers.pom + +for submod in guice-*;do + pushd $submod for module in guice-*;do install -pm 644 $module/target/$module-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/$module.jar install -pm 644 $module/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-$module.pom - %add_to_maven_depmap org.sonatype.sisu.inject $module %{version} JPP/%{name} $module + %add_maven_depmap JPP.%{name}-$module.pom %{name}/$module.jar done - popd # $dir is sisu-inject/XX so we strip the first part - submod=`echo $dir1 | sed -s 's:.*/::'` - install -pm 644 sisu-inject/$submod/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-$submod.pom - %add_to_maven_depmap org.sonatype.sisu.inject $submod %{version} JPP/%{name} $submod + install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-$submod.pom + %add_maven_depmap JPP.%{name}-$submod.pom + popd done -pushd sisu-inject/guice-bean +pushd guice-bean module="sisu-inject-bean" install -pm 644 $module/target/$module-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/$module.jar install -pm 644 $module/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-$module.pom -%add_to_maven_depmap org.sonatype.sisu $module %{version} JPP/%{name} $module -popd +%add_maven_depmap JPP.%{name}-$module.pom %{name}/$module.jar +popd # guice-bean -pushd sisu-inject/guice-plexus +pushd guice-plexus module="sisu-inject-plexus" install -pm 644 $module/target/$module-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/$module.jar install -pm 644 $module/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-$module.pom -%add_to_maven_depmap org.sonatype.sisu $module %{version} JPP/%{name} $module -popd +%add_maven_depmap JPP.%{name}-$module.pom %{name}/$module.jar +popd # guice-plexus +popd # containers + +pushd registries # main poms -install -pm 644 sisu-inject/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-inject.pom -%add_to_maven_depmap org.sonatype.sisu sisu-inject %{version} JPP/%{name} inject +install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-registries.pom +%add_maven_depmap JPP.%{name}-containers.pom + +for module in *registry*;do + install -pm 644 $module/target/$module-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/$module.jar + install -pm 644 $module/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-$module.pom + %add_maven_depmap JPP.%{name}-$module.pom %{name}/$module.jar +done +popd # registries + +popd # sisu-inject + install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-parent.pom -%add_to_maven_depmap org.sonatype.sisu sisu-parent %{version} JPP/%{name} parent +%add_maven_depmap JPP.%{name}-parent.pom # javadoc install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name} @@ -125,19 +174,23 @@ rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || : %files -%defattr(-,root,root,-) +%doc LICENSE-ASL.txt LICENSE-EPL.txt %{_javadir}/%{name} %{_mavenpomdir}/* %{_mavendepmapfragdir}/* %files javadoc -%defattr(-,root,root,-) -%doc %{_javadocdir}/%{name}* - +%doc LICENSE-ASL.txt LICENSE-EPL.txt +%doc %{_javadocdir}/%{name} %changelog +* Thu Jun 23 2011 Stanislav Ochotnicky - 2.2.3-1 +- Update to latest upstream 2.2.3 (#683795) +- Add forge-parent to Requires +- Rework spec to be more simple, update patches + * Tue Mar 1 2011 Stanislav Ochotnicky - 2.1.1-2 - Add atinject into poms as dependency