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