9cb1eb
%if 0%{?fedora}
9cb1eb
%bcond_without extensions
9cb1eb
%endif
9cb1eb
9cb1eb
%global short_name guice
9cb1eb
9cb1eb
Name:           google-%{short_name}
9cb1eb
Version:        3.1.3
8b698e
Release:        9%{?dist}
9cb1eb
Summary:        Lightweight dependency injection framework for Java 5 and above
9cb1eb
Group:          Development/Libraries
9cb1eb
License:        ASL 2.0
9cb1eb
URL:            https://github.com/sonatype/sisu-%{short_name}
9cb1eb
# ./create-tarball.sh %%{version}
9cb1eb
Source0:        %{name}-%{version}.tar.xz
9cb1eb
Source1:        create-tarball.sh
9cb1eb
BuildArch:      noarch
9cb1eb
9cb1eb
BuildRequires:  maven-local >= 3.2.4-2
9cb1eb
BuildRequires:  maven-remote-resources-plugin
9cb1eb
BuildRequires:  munge-maven-plugin
9cb1eb
BuildRequires:  apache-resource-bundles
9cb1eb
BuildRequires:  aopalliance
9cb1eb
BuildRequires:  atinject
9cb1eb
BuildRequires:  cglib
9cb1eb
BuildRequires:  guava
9cb1eb
BuildRequires:  slf4j
9cb1eb
9cb1eb
%if %{with extensions}
9cb1eb
BuildRequires:  hibernate-jpa-2.0-api
9cb1eb
BuildRequires:  springframework-beans
9cb1eb
BuildRequires:  tomcat-servlet-3.0-api
9cb1eb
%endif
9cb1eb
9cb1eb
# Test dependencies:
9cb1eb
%if 0
9cb1eb
BuildRequires:  maven-surefire-provider-testng
9cb1eb
BuildRequires:  aqute-bnd
9cb1eb
BuildRequires:  atinject-tck
9cb1eb
BuildRequires:  easymock2
9cb1eb
BuildRequires:  felix-framework
9cb1eb
BuildRequires:  hibernate3-entitymanager
9cb1eb
BuildRequires:  mvn(org.hsqldb:hsqldb-j5)
9cb1eb
BuildRequires:  testng
9cb1eb
%endif
9cb1eb
9cb1eb
Provides:       %{short_name} = %{version}-%{release}
9cb1eb
9cb1eb
%description
9cb1eb
Put simply, Guice alleviates the need for factories and the use of new
9cb1eb
in your Java code. Think of Guice's @Inject as the new new. You will
9cb1eb
still need to write factories in some cases, but your code will not
9cb1eb
depend directly on them. Your code will be easier to change, unit test
9cb1eb
and reuse in other contexts.
9cb1eb
9cb1eb
Guice embraces Java's type safe nature, especially when it comes to
9cb1eb
features introduced in Java 5 such as generics and annotations. You
9cb1eb
might think of Guice as filling in missing features for core
9cb1eb
Java. Ideally, the language itself would provide most of the same
9cb1eb
features, but until such a language comes along, we have Guice.
9cb1eb
9cb1eb
Guice helps you design better APIs, and the Guice API itself sets a
9cb1eb
good example. Guice is not a kitchen sink. We justify each feature
9cb1eb
with at least three use cases. When in doubt, we leave it out. We
9cb1eb
build general functionality which enables you to extend Guice rather
9cb1eb
than adding every feature to the core framework.
9cb1eb
9cb1eb
%package -n %{short_name}-parent
9cb1eb
Summary:        Guice parent POM
9cb1eb
9cb1eb
%description -n %{short_name}-parent
9cb1eb
Guice is a lightweight dependency injection framework for Java 5
9cb1eb
and above. This package provides parent POM for Guice modules.
9cb1eb
9cb1eb
%if %{with extensions}
9cb1eb
9cb1eb
%package -n %{short_name}-assistedinject
9cb1eb
Summary:        AssistedInject extension module for Guice
9cb1eb
9cb1eb
%description -n %{short_name}-assistedinject
9cb1eb
Guice is a lightweight dependency injection framework for Java 5
9cb1eb
and above. This package provides AssistedInject module for Guice.
9cb1eb
9cb1eb
%package -n %{short_name}-extensions
9cb1eb
Summary:        Extensions for Guice
9cb1eb
9cb1eb
%description -n %{short_name}-extensions
9cb1eb
Guice is a lightweight dependency injection framework for Java 5
9cb1eb
and above. This package provides extensions POM for Guice.
9cb1eb
9cb1eb
%package -n %{short_name}-grapher
9cb1eb
Summary:        Grapher extension module for Guice
9cb1eb
9cb1eb
%description -n %{short_name}-grapher
9cb1eb
Guice is a lightweight dependency injection framework for Java 5
9cb1eb
and above. This package provides Grapher module for Guice.
9cb1eb
9cb1eb
%package -n %{short_name}-jmx
9cb1eb
Summary:        JMX extension module for Guice
9cb1eb
9cb1eb
%description -n %{short_name}-jmx
9cb1eb
Guice is a lightweight dependency injection framework for Java 5
9cb1eb
and above. This package provides JMX module for Guice.
9cb1eb
9cb1eb
%package -n %{short_name}-jndi
9cb1eb
Summary:        JNDI extension module for Guice
9cb1eb
9cb1eb
%description -n %{short_name}-jndi
9cb1eb
Guice is a lightweight dependency injection framework for Java 5
9cb1eb
and above. This package provides JNDI module for Guice.
9cb1eb
9cb1eb
%package -n %{short_name}-multibindings
9cb1eb
Summary:        MultiBindings extension module for Guice
9cb1eb
9cb1eb
%description -n %{short_name}-multibindings
9cb1eb
Guice is a lightweight dependency injection framework for Java 5
9cb1eb
and above. This package provides MultiBindings module for Guice.
9cb1eb
9cb1eb
%package -n %{short_name}-persist
9cb1eb
Summary:        Persist extension module for Guice
9cb1eb
9cb1eb
%description -n %{short_name}-persist
9cb1eb
Guice is a lightweight dependency injection framework for Java 5
9cb1eb
and above. This package provides Persist module for Guice.
9cb1eb
9cb1eb
%package -n %{short_name}-servlet
9cb1eb
Summary:        Servlet extension module for Guice
9cb1eb
9cb1eb
%description -n %{short_name}-servlet
9cb1eb
Guice is a lightweight dependency injection framework for Java 5
9cb1eb
and above. This package provides Servlet module for Guice.
9cb1eb
9cb1eb
%package -n %{short_name}-spring
9cb1eb
Summary:        Spring extension module for Guice
9cb1eb
9cb1eb
%description -n %{short_name}-spring
9cb1eb
Guice is a lightweight dependency injection framework for Java 5
9cb1eb
and above. This package provides Spring module for Guice.
9cb1eb
9cb1eb
%package -n %{short_name}-throwingproviders
9cb1eb
Summary:        ThrowingProviders extension module for Guice
9cb1eb
9cb1eb
%description -n %{short_name}-throwingproviders
9cb1eb
Guice is a lightweight dependency injection framework for Java 5
9cb1eb
and above. This package provides ThrowingProviders module for Guice.
9cb1eb
9cb1eb
%endif # with extensions
9cb1eb
9cb1eb
%package javadoc
9cb1eb
Summary:        API documentation for Guice
9cb1eb
Group:          Documentation
9cb1eb
Provides:       %{short_name}-javadoc = %{version}-%{release}
9cb1eb
9cb1eb
%description javadoc
9cb1eb
This package provides %{summary}.
9cb1eb
9cb1eb
9cb1eb
%prep
9cb1eb
%setup -q -n %{name}-%{version}
9cb1eb
9cb1eb
# We don't have struts2 in Fedora yet.
9cb1eb
%pom_disable_module struts2 extensions
9cb1eb
9cb1eb
# Remove additional build profiles, which we don't use anyways
9cb1eb
# and which are only pulling additional dependencies.
9cb1eb
%pom_xpath_remove "pom:profile[pom:id='guice.with.jarjar']" core
9cb1eb
9cb1eb
# Animal sniffer is only causing problems. Disable it for now.
9cb1eb
%pom_remove_plugin :animal-sniffer-maven-plugin core
9cb1eb
%pom_remove_plugin :animal-sniffer-maven-plugin extensions
9cb1eb
9cb1eb
# We don't have the custom doclet used by upstream. Remove
9cb1eb
# maven-javadoc-plugin to generate javadocs with default style.
9cb1eb
%pom_remove_plugin :maven-javadoc-plugin
9cb1eb
9cb1eb
%pom_remove_dep javax.persistence:persistence-api extensions/persist
9cb1eb
%pom_add_dep org.hibernate.javax.persistence:hibernate-jpa-2.0-api extensions/persist
9cb1eb
9cb1eb
# remove test dependency to make sure we don't produce requires
9cb1eb
# see #1007498
9cb1eb
%pom_xpath_remove "pom:dependency[pom:classifier[text()='tests']]" extensions
9cb1eb
9cb1eb
# Don't try to build extension modules unless they are needed
9cb1eb
%if %{without extensions}
9cb1eb
%pom_disable_module extensions
9cb1eb
%endif
9cb1eb
9cb1eb
# Upstream doesn't generate pom.properties, but we need it.
9cb1eb
sed -i "/<addMavenDescriptor>/d" pom.xml
9cb1eb
9cb1eb
9cb1eb
%build
9cb1eb
%if %{with extensions}
9cb1eb
%mvn_alias ":guice-{assistedinject,grapher,jmx,jndi,multibindings,persist,\
9cb1eb
servlet,spring,throwingproviders}" "com.google.inject.extensions:guice-@1"
9cb1eb
%endif # with extensions
9cb1eb
9cb1eb
%mvn_package :::no_aop: sisu-guice
9cb1eb
9cb1eb
%mvn_file  ":guice-{*}"  %{short_name}/guice-@1
9cb1eb
%mvn_file  ":sisu-guice" %{short_name}/%{name} %{name}
9cb1eb
%mvn_alias ":sisu-guice" "com.google.inject:guice"
9cb1eb
# Skip tests because of missing dependency (hsqldb-j5).
9cb1eb
%mvn_build -f -s
9cb1eb
9cb1eb
%install
9cb1eb
%mvn_install
9cb1eb
9cb1eb
%files -f .mfiles-sisu-guice
9cb1eb
9cb1eb
%files -n %{short_name}-parent -f .mfiles-guice-parent
9cb1eb
%doc COPYING
9cb1eb
9cb1eb
%if %{with extensions}
9cb1eb
%files -n %{short_name}-assistedinject -f .mfiles-guice-assistedinject
9cb1eb
%files -n %{short_name}-extensions -f .mfiles-guice-extensions
9cb1eb
%files -n %{short_name}-grapher -f .mfiles-guice-grapher
9cb1eb
%files -n %{short_name}-jmx -f .mfiles-guice-jmx
9cb1eb
%files -n %{short_name}-jndi -f .mfiles-guice-jndi
9cb1eb
%files -n %{short_name}-multibindings -f .mfiles-guice-multibindings
9cb1eb
%files -n %{short_name}-persist -f .mfiles-guice-persist
9cb1eb
%files -n %{short_name}-servlet -f .mfiles-guice-servlet
9cb1eb
%files -n %{short_name}-spring -f .mfiles-guice-spring
9cb1eb
%files -n %{short_name}-throwingproviders -f .mfiles-guice-throwingproviders
9cb1eb
%endif # with extensions
9cb1eb
9cb1eb
%files javadoc -f .mfiles-javadoc
9cb1eb
%doc COPYING
9cb1eb
9cb1eb
9cb1eb
%changelog
8b698e
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 3.1.3-9
8b698e
- Mass rebuild 2013-12-27
8b698e
9cb1eb
* Wed Sep 25 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.3-8
9cb1eb
- Install no_aop artifact after javapackages update
9cb1eb
9cb1eb
* Thu Sep 12 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.1.3-7
9cb1eb
- Remove dependency on tests from runtime
9cb1eb
- Rel: rhbz#1007498
9cb1eb
9cb1eb
* Tue Sep 10 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.3-6
9cb1eb
- Install no_aop artifact
9cb1eb
- Res: rhbz#1006491
9cb1eb
9cb1eb
* Wed Sep  4 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.3-5
9cb1eb
- Enable pom.properties
9cb1eb
- Res: rhbz#1004360
9cb1eb
9cb1eb
* Wed Aug 07 2013 Michal Srb <msrb@redhat.com> - 3.1.3-4
9cb1eb
- Add create-tarball.sh script to SRPM
9cb1eb
9cb1eb
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.3-3
9cb1eb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
9cb1eb
9cb1eb
* Fri Aug 02 2013 Michal Srb <msrb@redhat.com> - 3.1.3-4
9cb1eb
- Add create-tarball.sh script to SRPM
9cb1eb
9cb1eb
* Fri Jun 28 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.3-3
9cb1eb
- Rebuild to regenerate API documentation
9cb1eb
- Resolves: CVE-2013-1571
9cb1eb
9cb1eb
* Wed Apr 24 2013 Michal Srb <msrb@redhat.com> - 3.1.3-2
9cb1eb
- Revert update to 3.1.4 (uses asm4)
9cb1eb
9cb1eb
* Thu Mar 14 2013 Michal Srb <msrb@redhat.com> - 3.1.3-1
9cb1eb
- Update to upstream version 3.1.3
9cb1eb
- Remove bundled JARs from tarball
9cb1eb
9cb1eb
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 3.1.2-11
9cb1eb
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
9cb1eb
- Replace maven BuildRequires with maven-local
9cb1eb
9cb1eb
* Thu Jan 31 2013 Michal Srb <msrb@redhat.com> - 3.1.2-10
9cb1eb
- Remove all requires
9cb1eb
- Correct usage of xmvn's macros
9cb1eb
9cb1eb
* Mon Jan 28 2013 Michal Srb <msrb@redhat.com> - 3.1.2-9
9cb1eb
- Build with xmvn
9cb1eb
9cb1eb
* Fri Nov 16 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.2-8
9cb1eb
- Remove README
9cb1eb
9cb1eb
* Fri Nov 16 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.2-7
9cb1eb
- Repackage tarball
9cb1eb
9cb1eb
* Fri Nov  9 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.2-6
9cb1eb
- Don't try to build extension modules unless they are needed
9cb1eb
9cb1eb
* Fri Nov  9 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.2-5
9cb1eb
- Conditionalize %%install section too
9cb1eb
9cb1eb
* Fri Nov  9 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.2-4
9cb1eb
- Conditionally disable extensions
9cb1eb
9cb1eb
* Thu Nov  1 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.2-3
9cb1eb
- Update to new add_maven_depmap macro
9cb1eb
9cb1eb
* Wed Oct 31 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.1.2-2
9cb1eb
- Use new generated maven filelist feature from javapackages-tools
9cb1eb
9cb1eb
* Fri Oct  5 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.2-1
9cb1eb
- Complete rewrite of the spec file
9cb1eb
- New upstream, to ease future maintenance
9cb1eb
- Build with maven instead of ant
9cb1eb
- Split into multiple subpackages
9cb1eb
9cb1eb
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-0.7.rc2
9cb1eb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
9cb1eb
9cb1eb
* Thu Feb  9 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.0-0.6.rc2
9cb1eb
- Temporary fix for maven buildroots
9cb1eb
9cb1eb
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-0.5.rc2
9cb1eb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
9cb1eb
9cb1eb
* Wed Oct 12 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.0-0.4.rc2
9cb1eb
- Build with aqute-bnd (#745176)
9cb1eb
- Use new maven macros
9cb1eb
- Few packaging tweaks
9cb1eb
9cb1eb
* Tue May 24 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.0-0.3.rc2
9cb1eb
- Add cglib and atinject to R
9cb1eb
9cb1eb
* Thu May 12 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.0-0.2.rc2
9cb1eb
- Remove test and missing deps from pom.xml
9cb1eb
9cb1eb
* Tue Mar  1 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.0-0.1.rc2
9cb1eb
- Update to 3.0rc2
9cb1eb
- Changes according to new guidelines (versionless jars & javadocs)
9cb1eb
9cb1eb
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-4.1219svn
9cb1eb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
9cb1eb
9cb1eb
* Thu Oct 14 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 2.0-3.1219svn
9cb1eb
- Add java-devel >= 1:1.6.0 to BR
9cb1eb
9cb1eb
* Wed Oct 13 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 2.0-2.1219svn
9cb1eb
- Moved munge repacking to prep
9cb1eb
- Added -Dversion to change generated manifest version
9cb1eb
- Removed http part of URL
9cb1eb
9cb1eb
* Thu Oct  7 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 2.0-1.1219svn
9cb1eb
- Initial version of the package