Update to latest upstream 2.2.3 (#683795)

- Add forge-parent to Requires
- Rework spec to be more simple, update patches
This commit is contained in:
Stanislav Ochotnicky 2011-06-23 16:16:32 +02:00
parent cd8058f9a4
commit 0669aa6325
4 changed files with 138 additions and 68 deletions

View File

@ -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 <sochotnicky@redhat.com> From: Stanislav Ochotnicky <sochotnicky@redhat.com>
Date: Mon, 28 Feb 2011 13:52:40 +0100 Date: Mon, 28 Feb 2011 13:52:40 +0100
Subject: [PATCH 1/2] Remove test deps Subject: [PATCH 1/2] Remove test deps
--- ---
pom.xml | 15 --------------- pom.xml | 13 -------------
1 files changed, 0 insertions(+), 15 deletions(-) .../guice-bean/guice-bean-containers/pom.xml | 6 ------
2 files changed, 0 insertions(+), 19 deletions(-)
diff --git a/pom.xml b/pom.xml diff --git a/pom.xml b/pom.xml
index 35ecf55..5f4ac89 100644 index 80e1d17..fbb4b73 100644
--- a/pom.xml --- a/pom.xml
+++ b/pom.xml +++ b/pom.xml
@@ -98,21 +98,6 @@ @@ -98,19 +98,6 @@
<forgeReleaseUrl>https://repository.sonatype.org/service/local/staging/deploy/maven2</forgeReleaseUrl> <forgeReleaseUrl>https://repository.sonatype.org/service/local/staging/deploy/maven2</forgeReleaseUrl>
</properties> </properties>
@ -19,13 +20,11 @@ index 35ecf55..5f4ac89 100644
- <dependency> - <dependency>
- <groupId>ch.qos.logback</groupId> - <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId> - <artifactId>logback-classic</artifactId>
- <version>0.9.28</version>
- <scope>test</scope> - <scope>test</scope>
- </dependency> - </dependency>
- <dependency> - <dependency>
- <groupId>org.testng</groupId> - <groupId>junit</groupId>
- <artifactId>testng</artifactId> - <artifactId>junit</artifactId>
- <version>5.14.9</version>
- <scope>test</scope> - <scope>test</scope>
- </dependency> - </dependency>
- </dependencies> - </dependencies>
@ -33,6 +32,23 @@ index 35ecf55..5f4ac89 100644
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
-- diff --git a/sisu-inject/containers/guice-bean/guice-bean-containers/pom.xml b/sisu-inject/containers/guice-bean/guice-bean-containers/pom.xml
1.7.4 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 @@
<artifactId>testng</artifactId>
<optional>true</optional>
</dependency>
- <dependency>
- <groupId>org.sonatype.sisu.inject</groupId>
- <artifactId>guice-assistedinject</artifactId>
- <version>${sisu.guice.version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
--
1.7.5.4

View File

@ -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 <sochotnicky@redhat.com> From: Stanislav Ochotnicky <sochotnicky@redhat.com>
Date: Mon, 28 Feb 2011 16:41:30 +0100 Date: Mon, 28 Feb 2011 16:41:30 +0100
Subject: [PATCH 2/2] Fix plexus bundling Subject: [PATCH 2/2] Fix plexus bundling
--- ---
sisu-inject/guice-bean/sisu-inject-bean/pom.xml | 1 - .../containers/guice-bean/sisu-inject-bean/pom.xml | 3 ---
.../guice-plexus/sisu-inject-plexus/pom.xml | 8 +++++--- .../guice-plexus/sisu-inject-plexus/pom.xml | 5 +++++
2 files changed, 5 insertions(+), 4 deletions(-) 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 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 44f53bd..adbccd0 100644 index 255740d..3b07992 100644
--- a/sisu-inject/guice-bean/sisu-inject-bean/pom.xml --- a/sisu-inject/containers/guice-bean/sisu-inject-bean/pom.xml
+++ b/sisu-inject/guice-bean/sisu-inject-bean/pom.xml +++ b/sisu-inject/containers/guice-bean/sisu-inject-bean/pom.xml
@@ -74,7 +74,6 @@ @@ -100,9 +100,6 @@
org.slf4j
</DynamicImport-Package> </DynamicImport-Package>
<Export-Package> <Export-Package>
org.sonatype.inject;-noimport:=true;-split-package:=merge-first;version=${project.version}, - <!-- provide these APIs as a convenience -->
- javax.*|org.aopalliance.*;version=1 - javax.inject|javax.enterprise.inject;version=1,
</Export-Package> - org.aopalliance.aop|org.aopalliance.intercept;version=1,
<Private-Package> <!-- our JRS330 extension API -->
org.sonatype.guice.bean.* org.sonatype.inject;-split-package:=merge-first;version=${project.version},
diff --git a/sisu-inject/guice-plexus/sisu-inject-plexus/pom.xml b/sisu-inject/guice-plexus/sisu-inject-plexus/pom.xml <!-- our implementation APIs -->
index c49291f..4552450 100644 diff --git a/sisu-inject/containers/guice-plexus/sisu-inject-plexus/pom.xml b/sisu-inject/containers/guice-plexus/sisu-inject-plexus/pom.xml
--- a/sisu-inject/guice-plexus/sisu-inject-plexus/pom.xml index 1cdf9b9..fc2d578 100644
+++ b/sisu-inject/guice-plexus/sisu-inject-plexus/pom.xml --- a/sisu-inject/containers/guice-plexus/sisu-inject-plexus/pom.xml
@@ -51,6 +51,11 @@ +++ b/sisu-inject/containers/guice-plexus/sisu-inject-plexus/pom.xml
<artifactId>guice-plexus-shim</artifactId> @@ -58,6 +58,11 @@
<artifactId>junit</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
+ <dependency> + <dependency>
@ -36,16 +38,6 @@ index c49291f..4552450 100644
</dependencies> </dependencies>
<build> <build>
@@ -74,9 +79,6 @@
<DynamicImport-Package>
org.slf4j,junit.framework
</DynamicImport-Package>
- <Export-Package>
- org.codehaus.plexus.*;-noimport:=true;-split-package:=merge-first
- </Export-Package>
<Private-Package>
META-INF.plexus,org.sonatype.guice.plexus.*
</Private-Package>
-- --
1.7.4 1.7.5.4

View File

@ -25,5 +25,14 @@
<artifactId>org.osgi.core</artifactId> <artifactId>org.osgi.core</artifactId>
</jpp> </jpp>
</dependency> </dependency>
<dependency>
<maven>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-api</artifactId>
</maven>
<jpp>
<groupId>JPP/maven-shared</groupId>
<artifactId>reporting-api</artifactId>
</jpp>
</dependency>
</dependencies> </dependencies>

105
sisu.spec
View File

@ -1,16 +1,16 @@
Name: sisu Name: sisu
Version: 2.1.1 Version: 2.2.3
Release: 2%{?dist} Release: 1%{?dist}
Summary: Sonatype dependency injection framework Summary: Sonatype dependency injection framework
Group: Development/Tools Group: Development/Tools
License: ASL 2.0 License: ASL 2.0 and EPL
URL: http://github.com/sonatype/sisu URL: http://github.com/sonatype/sisu
# git clone git://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 # git archive --prefix="sisu-2.2.3/" --format=tar sisu-2.1.1 | xz > sisu-2.2.3.tar.xz
Source0: %{name}-%{version}.tar.bz2 Source0: %{name}-%{version}.tar.xz
Source1: %{name}-depmap.xml Source1: %{name}-depmap.xml
Patch0: 0001-Remove-test-deps.patch Patch0: 0001-Remove-test-deps.patch
Patch1: 0002-Fix-plexus-bundling.patch Patch1: 0002-Fix-plexus-bundling.patch
@ -35,7 +35,30 @@ BuildRequires: maven-jar-plugin
BuildRequires: maven-compiler-plugin BuildRequires: maven-compiler-plugin
BuildRequires: atinject BuildRequires: atinject
BuildRequires: felix-framework 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: google-guice
Requires: java >= 1:1.6.0 Requires: java >= 1:1.6.0
Requires(post): jpackage-utils Requires(post): jpackage-utils
@ -55,6 +78,7 @@ Requires: jpackage-utils
%prep %prep
%setup -q %setup -q
%patch0 -p1 %patch0 -p1
%patch1 -p1 %patch1 -p1
@ -62,9 +86,11 @@ Requires: jpackage-utils
# TODO enable guice-eclipse # TODO enable guice-eclipse
sed -i 's:.*guice-eclipse.*::g' sisu-inject/pom.xml sed -i 's:.*guice-eclipse.*::g' sisu-inject/pom.xml
rm -rf sisu-inject/guice-eclipse 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 %build
mvn-rpmbuild \ mvn-rpmbuild -X \
-Dmaven.local.depmap.file=%{SOURCE1} \ -Dmaven.local.depmap.file=%{SOURCE1} \
-Dmaven.test.skip=true \ -Dmaven.test.skip=true \
install javadoc:aggregate 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%{_javadir}/%{name}
install -d -m 0755 $RPM_BUILD_ROOT%{_mavenpomdir} install -d -m 0755 $RPM_BUILD_ROOT%{_mavenpomdir}
for dir1 in sisu-inject/guice-*;do pushd sisu-inject
pushd $dir1 # 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 for module in guice-*;do
install -pm 644 $module/target/$module-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/$module.jar 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 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 done
popd
# $dir is sisu-inject/XX so we strip the first part # $dir is sisu-inject/XX so we strip the first part
submod=`echo $dir1 | sed -s 's:.*/::'` install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-$submod.pom
install -pm 644 sisu-inject/$submod/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-$submod.pom %add_maven_depmap JPP.%{name}-$submod.pom
%add_to_maven_depmap org.sonatype.sisu.inject $submod %{version} JPP/%{name} $submod popd
done done
pushd sisu-inject/guice-bean pushd guice-bean
module="sisu-inject-bean" module="sisu-inject-bean"
install -pm 644 $module/target/$module-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/$module.jar 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 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 %add_maven_depmap JPP.%{name}-$module.pom %{name}/$module.jar
popd popd # guice-bean
pushd sisu-inject/guice-plexus pushd guice-plexus
module="sisu-inject-plexus" module="sisu-inject-plexus"
install -pm 644 $module/target/$module-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/$module.jar 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 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 %add_maven_depmap JPP.%{name}-$module.pom %{name}/$module.jar
popd popd # guice-plexus
popd # containers
pushd registries
# main poms # main poms
install -pm 644 sisu-inject/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-inject.pom install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-registries.pom
%add_to_maven_depmap org.sonatype.sisu sisu-inject %{version} JPP/%{name} inject %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 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 # javadoc
install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name} install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
@ -125,19 +174,23 @@ rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
%files %files
%defattr(-,root,root,-) %doc LICENSE-ASL.txt LICENSE-EPL.txt
%{_javadir}/%{name} %{_javadir}/%{name}
%{_mavenpomdir}/* %{_mavenpomdir}/*
%{_mavendepmapfragdir}/* %{_mavendepmapfragdir}/*
%files javadoc %files javadoc
%defattr(-,root,root,-) %doc LICENSE-ASL.txt LICENSE-EPL.txt
%doc %{_javadocdir}/%{name}* %doc %{_javadocdir}/%{name}
%changelog %changelog
* Thu Jun 23 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 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 <sochotnicky@redhat.com> - 2.1.1-2 * Tue Mar 1 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 2.1.1-2
- Add atinject into poms as dependency - Add atinject into poms as dependency