Update to upstream version 2.3.0

This commit is contained in:
Mikolaj Izdebski 2012-12-03 19:18:26 +01:00
parent 7eb2582841
commit 0d825cfa6e
4 changed files with 48 additions and 182 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
/sisu-1.4.3.2.tar.gz
/sisu-2.1.1.tar.bz2
/sisu-2.2.3.tar.xz
/sisu-2.3.0.tar.xz

View File

@ -1,49 +0,0 @@
<dependencies>
<dependency>
<maven>
<groupId>aopalliance</groupId>
<artifactId>aopalliance</artifactId>
</maven>
</dependency>
<dependency>
<maven>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
</maven>
<jpp>
<groupId>JPP/felix</groupId>
<artifactId>org.osgi.compendium</artifactId>
</jpp>
</dependency>
<dependency>
<maven>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
</maven>
<jpp>
<groupId>JPP/felix</groupId>
<artifactId>org.osgi.core</artifactId>
</jpp>
</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>
<!-- for snakeyaml -->
<dependency>
<maven>
<groupId>com.google.gdata</groupId>
<artifactId>gdata-core</artifactId>
</maven>
<jpp>
<groupId>JPP</groupId>
<artifactId>gdata/gdata-core</artifactId>
</jpp>
</dependency>
</dependencies>

178
sisu.spec
View File

@ -1,47 +1,47 @@
Name: sisu
Version: 2.2.3
Release: 6%{?dist}
Version: 2.3.0
Release: 1%{?dist}
Summary: Sonatype dependency injection framework
Group: Development/Tools
Group: Development/Libraries
License: ASL 2.0 and EPL and MIT
URL: http://github.com/sonatype/sisu
# git clone git://github.com/sonatype/sisu
# git archive --prefix="sisu-2.2.3/" --format=tar sisu-2.1.1 | xz > sisu-2.2.3.tar.xz
# git clone git://github.com/sonatype/%{name}
# git archive --prefix=%{name}-%{version}/ --format=tar %{name}-%{version} | xz >%{name}-%{version}.tar.xz
Source0: %{name}-%{version}.tar.xz
Source1: %{name}-depmap.xml
BuildArch: noarch
BuildRequires: google-guice
BuildRequires: maven
BuildRequires: maven-install-plugin
BuildRequires: maven-enforcer-plugin
BuildRequires: maven-invoker-plugin
BuildRequires: maven-site-plugin
BuildRequires: maven-plugin-bundle
BuildRequires: maven-shade-plugin
BuildRequires: maven-dependency-plugin
BuildRequires: maven-clean-plugin
BuildRequires: maven-resources-plugin
BuildRequires: maven-surefire-plugin
BuildRequires: maven-javadoc-plugin
BuildRequires: maven-jar-plugin
BuildRequires: maven-compiler-plugin
BuildRequires: java-devel
BuildRequires: jpackage-utils
BuildRequires: xmvn
BuildRequires: aopalliance
BuildRequires: atinject
BuildRequires: cdi-api
BuildRequires: felix-framework
BuildRequires: forge-parent
BuildRequires: maven-surefire-provider-testng
BuildRequires: maven-surefire-provider-junit4
BuildRequires: google-guice
BuildRequires: junit
BuildRequires: plexus-classworlds
BuildRequires: plexus-containers-component-annotations
BuildRequires: plexus-utils
BuildRequires: sisu
BuildRequires: testng
BuildRequires: weld-parent
Requires: forge-parent
Requires: java
Requires: jpackage-utils
Requires: aopalliance
Requires: atinject
Requires: cdi-api
Requires: felix-framework
Requires: google-guice
Requires: java >= 1:1.6.0
Requires(post): jpackage-utils
Requires(postun): jpackage-utils
Requires: junit
Requires: plexus-classworlds
Requires: plexus-containers-component-annotations
Requires: plexus-utils
Requires: sisu
Requires: testng
%description
Java dependency injection framework with backward support for plexus and bean
@ -58,18 +58,10 @@ Requires: jpackage-utils
%prep
%setup -q
for module in . sisu-inject/containers/guice-bean/guice-bean-containers; do
%pom_xpath_remove "pom:dependency[pom:scope[text()='test']]" $module; done
# Fix plexus bundling
sed -i -e '/provide these APIs as a convenience/,+2d' \
sisu-inject/containers/guice-bean/sisu-inject-bean/pom.xml
%pom_xpath_inject "pom:project/pom:dependencies" "
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>latest</version>
</dependency>" sisu-inject/containers/guice-plexus/sisu-inject-plexus
%pom_add_dep javax.inject:javax.inject sisu-inject/containers/guice-plexus/sisu-inject-plexus
# add backward compatible location
cp sisu-inject/containers/guice-plexus/guice-plexus-lifecycles/src/main/java/org/sonatype/guice/plexus/lifecycles/*java \
@ -77,109 +69,31 @@ cp sisu-inject/containers/guice-plexus/guice-plexus-lifecycles/src/main/java/org
sed -i 's/org.sonatype.guice.plexus.lifecycles/org.codehaus.plexus/' \
sisu-inject/containers/guice-plexus/guice-plexus-lifecycles/src/main/java/org/codehaus/plexus/*java
# 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
# Dependency not available
%pom_disable_module sisu-eclipse-registry sisu-inject/registries
%pom_remove_plugin :maven-surefire-plugin sisu-inject/containers/guice-bean/guice-bean-containers
%pom_remove_plugin :maven-clean-plugin sisu-inject/containers/guice-plexus/guice-plexus-binders
%pom_remove_plugin :maven-dependency-plugin sisu-inject/containers/guice-plexus/guice-plexus-binders
%build
mvn-rpmbuild -X \
-Dmaven.local.depmap.file=%{SOURCE1} \
-Dmaven.test.skip=true \
install javadoc:aggregate
%mvn_build -f
%install
install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}/%{name}
install -d -m 0755 $RPM_BUILD_ROOT%{_mavenpomdir}
%mvn_install
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_maven_depmap JPP.%{name}-$module.pom %{name}/$module.jar
done
# $dir is sisu-inject/XX so we strip the first part
install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-$submod.pom
%add_maven_depmap JPP.%{name}-$submod.pom
popd
done
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_maven_depmap JPP.%{name}-$module.pom %{name}/$module.jar
popd # guice-bean
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_maven_depmap JPP.%{name}-$module.pom %{name}/$module.jar
popd # guice-plexus
popd # containers
pushd registries
# main poms
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_maven_depmap JPP.%{name}-parent.pom
# javadoc
install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
%pre javadoc
# workaround for rpm bug, can be removed in F-17
[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
%post
%update_maven_depmap
%postun
%update_maven_depmap
%files
%files -f .mfiles
%doc LICENSE-ASL.txt LICENSE-EPL.txt
%{_javadir}/%{name}
%{_mavenpomdir}/*
%{_mavendepmapfragdir}/*
%dir %{_javadir}/%{name}
%files javadoc
%files javadoc -f .mfiles-javadoc
%doc LICENSE-ASL.txt LICENSE-EPL.txt
%doc %{_javadocdir}/%{name}
%changelog
* Mon Dec 3 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.3.0-1
- Update to upstream version 2.3.0
* Tue Jul 24 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.2.3-6
- Convert patches to POM macros

View File

@ -1 +1 @@
3ddebee3360667dcebc18a2df7365a8a sisu-2.2.3.tar.xz
7f7bc06ae6f0083b00e4fd8024eeb0bb sisu-2.3.0.tar.xz