e911da
%bcond_without jpa
e911da
%bcond_without spring
e911da
e911da
%global short_name guice
e911da
e911da
Name:           google-%{short_name}
e911da
Version:        4.1
e911da
Release:        11%{?dist}
e911da
Summary:        Lightweight dependency injection framework for Java 5 and above
e911da
License:        ASL 2.0
e911da
URL:            https://github.com/google/%{short_name}
e911da
BuildArch:      noarch
e911da
e911da
# ./create-tarball.sh %%{version}
e911da
Source0:        %{name}-%{version}.tar.xz
e911da
Source1:        create-tarball.sh
e911da
e911da
BuildRequires:  maven-local
e911da
BuildRequires:  mvn(aopalliance:aopalliance)
e911da
BuildRequires:  mvn(cglib:cglib)
e911da
BuildRequires:  mvn(com.google.guava:guava:19.0)
e911da
BuildRequires:  mvn(javax.inject:javax.inject)
e911da
BuildRequires:  mvn(javax.servlet:servlet-api)
e911da
BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
e911da
BuildRequires:  mvn(org.apache.maven.plugins:maven-remote-resources-plugin)
e911da
BuildRequires:  mvn(org.apache.maven.plugins:maven-source-plugin)
e911da
BuildRequires:  mvn(org.ow2.asm:asm)
e911da
BuildRequires:  mvn(org.slf4j:slf4j-api)
e911da
BuildRequires:  mvn(org.sonatype.plugins:munge-maven-plugin)
e911da
# xmvn-builddep misses this:
e911da
BuildRequires:  mvn(org.apache:apache-jar-resource-bundle)
e911da
e911da
%if %{with jpa}
e911da
BuildRequires:  hibernate-jpa-2.0-api
e911da
%endif
e911da
%if %{with spring}
e911da
BuildRequires:  springframework-beans
e911da
%endif
e911da
e911da
# Test dependencies:
e911da
%if 0
e911da
BuildRequires:  maven-surefire-provider-testng
e911da
BuildRequires:  aqute-bnd
e911da
BuildRequires:  atinject-tck
e911da
BuildRequires:  easymock2
e911da
BuildRequires:  felix-framework
e911da
BuildRequires:  hibernate3-entitymanager
e911da
BuildRequires:  mvn(org.hsqldb:hsqldb-j5)
e911da
BuildRequires:  testng
e911da
%endif
e911da
e911da
%description
e911da
Put simply, Guice alleviates the need for factories and the use of new
e911da
in your Java code. Think of Guice's @Inject as the new new. You will
e911da
still need to write factories in some cases, but your code will not
e911da
depend directly on them. Your code will be easier to change, unit test
e911da
and reuse in other contexts.
e911da
e911da
Guice embraces Java's type safe nature, especially when it comes to
e911da
features introduced in Java 5 such as generics and annotations. You
e911da
might think of Guice as filling in missing features for core
e911da
Java. Ideally, the language itself would provide most of the same
e911da
features, but until such a language comes along, we have Guice.
e911da
e911da
Guice helps you design better APIs, and the Guice API itself sets a
e911da
good example. Guice is not a kitchen sink. We justify each feature
e911da
with at least three use cases. When in doubt, we leave it out. We
e911da
build general functionality which enables you to extend Guice rather
e911da
than adding every feature to the core framework.
e911da
e911da
%package -n %{short_name}-parent
e911da
Summary:        Guice parent POM
e911da
e911da
%description -n %{short_name}-parent
e911da
Guice is a lightweight dependency injection framework for Java 5
e911da
and above. This package provides parent POM for Guice modules.
e911da
e911da
%package -n %{short_name}-assistedinject
e911da
Summary:        AssistedInject extension module for Guice
e911da
e911da
%description -n %{short_name}-assistedinject
e911da
Guice is a lightweight dependency injection framework for Java 5
e911da
and above. This package provides AssistedInject module for Guice.
e911da
e911da
%package -n %{short_name}-extensions
e911da
Summary:        Extensions for Guice
e911da
e911da
%description -n %{short_name}-extensions
e911da
Guice is a lightweight dependency injection framework for Java 5
e911da
and above. This package provides extensions POM for Guice.
e911da
e911da
%package -n %{short_name}-grapher
e911da
Summary:        Grapher extension module for Guice
e911da
e911da
%description -n %{short_name}-grapher
e911da
Guice is a lightweight dependency injection framework for Java 5
e911da
and above. This package provides Grapher module for Guice.
e911da
e911da
%package -n %{short_name}-jmx
e911da
Summary:        JMX extension module for Guice
e911da
e911da
%description -n %{short_name}-jmx
e911da
Guice is a lightweight dependency injection framework for Java 5
e911da
and above. This package provides JMX module for Guice.
e911da
e911da
%package -n %{short_name}-jndi
e911da
Summary:        JNDI extension module for Guice
e911da
e911da
%description -n %{short_name}-jndi
e911da
Guice is a lightweight dependency injection framework for Java 5
e911da
and above. This package provides JNDI module for Guice.
e911da
e911da
%package -n %{short_name}-multibindings
e911da
Summary:        MultiBindings extension module for Guice
e911da
e911da
%description -n %{short_name}-multibindings
e911da
Guice is a lightweight dependency injection framework for Java 5
e911da
and above. This package provides MultiBindings module for Guice.
e911da
e911da
%if %{with jpa}
e911da
%package -n %{short_name}-persist
e911da
Summary:        Persist extension module for Guice
e911da
e911da
%description -n %{short_name}-persist
e911da
Guice is a lightweight dependency injection framework for Java 5
e911da
and above. This package provides Persist module for Guice.
e911da
%endif
e911da
e911da
%package -n %{short_name}-servlet
e911da
Summary:        Servlet extension module for Guice
e911da
e911da
%description -n %{short_name}-servlet
e911da
Guice is a lightweight dependency injection framework for Java 5
e911da
and above. This package provides Servlet module for Guice.
e911da
e911da
%if %{with spring}
e911da
%package -n %{short_name}-spring
e911da
Summary:        Spring extension module for Guice
e911da
e911da
%description -n %{short_name}-spring
e911da
Guice is a lightweight dependency injection framework for Java 5
e911da
and above. This package provides Spring module for Guice.
e911da
%endif
e911da
e911da
%package -n %{short_name}-testlib
e911da
Summary:        TestLib extension module for Guice
e911da
e911da
%description -n %{short_name}-testlib
e911da
Guice is a lightweight dependency injection framework for Java 5
e911da
and above. This package provides TestLib module for Guice.
e911da
e911da
%package -n %{short_name}-throwingproviders
e911da
Summary:        ThrowingProviders extension module for Guice
e911da
e911da
%description -n %{short_name}-throwingproviders
e911da
Guice is a lightweight dependency injection framework for Java 5
e911da
and above. This package provides ThrowingProviders module for Guice.
e911da
e911da
%package -n %{short_name}-bom
e911da
Summary:        Bill of Materials for Guice
e911da
e911da
%description -n %{short_name}-bom
e911da
Guice is a lightweight dependency injection framework for Java 5
e911da
and above. This package provides Bill of Materials module for Guice.
e911da
e911da
%package javadoc
e911da
Summary:        API documentation for Guice
e911da
e911da
%description javadoc
e911da
This package provides %{summary}.
e911da
e911da
e911da
%prep
e911da
%setup -q -n %{name}-%{version}
e911da
e911da
# We don't have struts2 in Fedora yet.
e911da
%pom_disable_module struts2 extensions
e911da
# Android-specific extension
e911da
%pom_disable_module dagger-adapter extensions
e911da
e911da
# Remove additional build profiles, which we don't use anyways
e911da
# and which are only pulling additional dependencies.
e911da
%pom_xpath_remove "pom:profile[pom:id='guice.with.jarjar']" core
e911da
e911da
# Fix OSGi metadata due to not using jarjar
e911da
%pom_xpath_set "pom:instructions/pom:Import-Package" \
e911da
  "!com.google.inject.*,*" core
e911da
e911da
# Animal sniffer is only causing problems. Disable it for now.
e911da
%pom_remove_plugin :animal-sniffer-maven-plugin core
e911da
%pom_remove_plugin :animal-sniffer-maven-plugin extensions
e911da
e911da
%pom_remove_plugin :maven-gpg-plugin
e911da
e911da
# We don't have the custom doclet used by upstream. Remove
e911da
# maven-javadoc-plugin to generate javadocs with default style.
e911da
%pom_remove_plugin -r :maven-javadoc-plugin
e911da
e911da
# remove test dependency to make sure we don't produce requires
e911da
# see #1007498
e911da
%pom_remove_dep :guava-testlib extensions
e911da
%pom_xpath_remove "pom:dependency[pom:classifier[text()='tests']]" extensions
e911da
e911da
%pom_remove_parent
e911da
%pom_set_parent com.google.inject:guice-parent:%{version} jdk8-tests
e911da
e911da
%if %{without jpa}
e911da
%pom_disable_module persist extensions
e911da
%endif
e911da
%if %{without spring}
e911da
%pom_disable_module spring extensions
e911da
%endif
e911da
e911da
%pom_disable_module jdk8-tests
e911da
e911da
%build
e911da
%mvn_alias "com.google.inject.extensions:" "org.sonatype.sisu.inject:"
e911da
e911da
%mvn_package :::no_aop: guice
e911da
e911da
%mvn_file  ":guice-{*}"  %{short_name}/guice-@1
e911da
%mvn_file  ":guice" %{short_name}/%{name} %{name}
e911da
%mvn_alias ":guice" "org.sonatype.sisu:sisu-guice"
e911da
# Skip tests because of missing dependency guice-testlib
e911da
%mvn_build -f -s
e911da
e911da
%install
e911da
%mvn_install
e911da
e911da
%files -f .mfiles-guice
e911da
%dir %{_javadir}/%{short_name}
e911da
e911da
%files -n %{short_name}-parent -f .mfiles-guice-parent
e911da
%doc COPYING
e911da
e911da
%files -n %{short_name}-assistedinject -f .mfiles-guice-assistedinject
e911da
%files -n %{short_name}-extensions -f .mfiles-extensions-parent
e911da
%files -n %{short_name}-grapher -f .mfiles-guice-grapher
e911da
%files -n %{short_name}-jmx -f .mfiles-guice-jmx
e911da
%files -n %{short_name}-jndi -f .mfiles-guice-jndi
e911da
%files -n %{short_name}-multibindings -f .mfiles-guice-multibindings
e911da
%if %{with jpa}
e911da
%files -n %{short_name}-persist -f .mfiles-guice-persist
e911da
%endif
e911da
%files -n %{short_name}-servlet -f .mfiles-guice-servlet
e911da
%if %{with spring}
e911da
%files -n %{short_name}-spring -f .mfiles-guice-spring
e911da
%endif
e911da
%files -n %{short_name}-testlib -f .mfiles-guice-testlib
e911da
%files -n %{short_name}-throwingproviders -f .mfiles-guice-throwingproviders
e911da
e911da
%files -n %{short_name}-bom -f .mfiles-guice-bom
e911da
e911da
%files javadoc -f .mfiles-javadoc
e911da
%doc COPYING
e911da
e911da
e911da
%changelog
e911da
* Wed Apr 18 2018 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.1-11
e911da
- Remove legacy Provides
e911da
e911da
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-10
e911da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
e911da
e911da
* Mon Feb 05 2018 Michael Simacek <msimacek@redhat.com> - 4.1-9
e911da
- Use guava20
e911da
e911da
* Mon Oct 02 2017 Mat Booth <mat.booth@redhat.com> - 4.1-8
e911da
- Fix OSGi metadata to import cglib and asm, since we are not bundling them with
e911da
  jarjar
e911da
e911da
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-7
e911da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
e911da
e911da
* Fri Jun 23 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.1-6
e911da
- Remove unused patches
e911da
e911da
* Fri Feb 24 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.1-5
e911da
- Remove maven-javadoc-plugin from all POMs
e911da
e911da
* Thu Feb 23 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.1-4
e911da
- Add missing BR on apache-resource-bundles
e911da
e911da
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-3
e911da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
e911da
e911da
* Wed Feb  1 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.1-2
e911da
- Introduce build-conditionals for jpa and spring
e911da
e911da
* Thu Aug  4 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.1-1
e911da
- Update to upstream version 4.1
e911da
e911da
* Wed Jun 29 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.0-6
e911da
- Make aopalliance dependency optional
e911da
e911da
* Wed Jun 15 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.0-5
e911da
- Regenerate build-requires
e911da
e911da
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-4
e911da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
e911da
e911da
* Tue Jan 12 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.0-3
e911da
- Install BOM even when without extensions
e911da
e911da
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-2
e911da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
e911da
e911da
* Thu May 14 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.0-1
e911da
- Update to upstream version 4.0
e911da
e911da
* Mon Apr 27 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.2.6-1
e911da
- Update to upstream version 3.2.6
e911da
e911da
* Fri Mar 6 2015 Alexander Kurtakov <akurtako@redhat.com> 3.2.5-2
e911da
- Drop gone tomcat-servlet-3.0-api BR, builds fine without it.
e911da
e911da
* Fri Jan 23 2015 Michael Simacek <msimacek@redhat.com> - 3.2.5-1
e911da
- Update to upstream version 3.2.5
e911da
e911da
* Mon Sep 29 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.2.4-1
e911da
- Update to upstream version 3.2.4
e911da
e911da
* Fri Jun  6 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.2.2-1
e911da
- Update to upstream version 3.2.2
e911da
e911da
* Wed May 28 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.2.1-2
e911da
- Rebuild to regenerate Maven auto-requires
e911da
e911da
* Wed Apr 16 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.2.1-1
e911da
- Update to upstream version 3.2.1
e911da
- Add testlib subpackage
e911da
e911da
* Tue Mar  4 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.10-3
e911da
- Fix directory ownership
e911da
e911da
* Tue Mar 04 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.1.10-3
e911da
- Use Requires: java-headless rebuild (#1067528)
e911da
e911da
* Wed Feb 19 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.10-2
e911da
- Fix unowned directory
e911da
e911da
* Tue Feb 18 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.10-1
e911da
- Update to upstream version 3.1.10
e911da
e911da
* Mon Jan 20 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.9-1
e911da
- Update to upstream version 3.1.9
e911da
e911da
* Mon Nov 11 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.8-1
e911da
- Update to upstream version 3.1.8
e911da
e911da
* Wed Oct 23 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.3-10
e911da
- Rebuild to regenerate broken POMs
e911da
- Related: rhbz#1021484
e911da
e911da
* Fri Oct 18 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.3-9
e911da
- Don't force generation of pom.properties
e911da
e911da
* Wed Sep 25 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.3-8
e911da
- Install no_aop artifact after javapackages update
e911da
e911da
* Thu Sep 12 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.1.3-7
e911da
- Remove dependency on tests from runtime
e911da
- Related: rhbz#1007498
e911da
e911da
* Tue Sep 10 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.3-6
e911da
- Install no_aop artifact
e911da
- Resolves: rhbz#1006491
e911da
e911da
* Wed Sep  4 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.3-5
e911da
- Enable pom.properties
e911da
- Resolves: rhbz#1004360
e911da
e911da
* Wed Aug 07 2013 Michal Srb <msrb@redhat.com> - 3.1.3-4
e911da
- Add create-tarball.sh script to SRPM
e911da
e911da
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.3-3
e911da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
e911da
e911da
* Wed Apr 24 2013 Michal Srb <msrb@redhat.com> - 3.1.3-2
e911da
- Revert update to 3.1.4 (uses asm4)
e911da
e911da
* Thu Mar 14 2013 Michal Srb <msrb@redhat.com> - 3.1.3-1
e911da
- Update to upstream version 3.1.3
e911da
- Remove bundled JARs from tarball
e911da
e911da
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 3.1.2-11
e911da
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
e911da
- Replace maven BuildRequires with maven-local
e911da
e911da
* Thu Jan 31 2013 Michal Srb <msrb@redhat.com> - 3.1.2-10
e911da
- Remove all requires
e911da
- Correct usage of xmvn's macros
e911da
e911da
* Mon Jan 28 2013 Michal Srb <msrb@redhat.com> - 3.1.2-9
e911da
- Build with xmvn
e911da
e911da
* Fri Nov 16 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.2-8
e911da
- Remove README
e911da
e911da
* Fri Nov 16 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.2-7
e911da
- Repackage tarball
e911da
e911da
* Fri Nov  9 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.2-6
e911da
- Don't try to build extension modules unless they are needed
e911da
e911da
* Fri Nov  9 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.2-5
e911da
- Conditionalize %%install section too
e911da
e911da
* Fri Nov  9 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.2-4
e911da
- Conditionally disable extensions
e911da
e911da
* Thu Nov  1 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.2-3
e911da
- Update to new add_maven_depmap macro
e911da
e911da
* Wed Oct 31 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.1.2-2
e911da
- Use new generated maven filelist feature from javapackages-tools
e911da
e911da
* Fri Oct  5 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.2-1
e911da
- Complete rewrite of the spec file
e911da
- New upstream, to ease future maintenance
e911da
- Build with maven instead of ant
e911da
- Split into multiple subpackages
e911da
e911da
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-0.7.rc2
e911da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
e911da
e911da
* Thu Feb  9 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.0-0.6.rc2
e911da
- Temporary fix for maven buildroots
e911da
e911da
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-0.5.rc2
e911da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
e911da
e911da
* Wed Oct 12 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.0-0.4.rc2
e911da
- Build with aqute-bnd (#745176)
e911da
- Use new maven macros
e911da
- Few packaging tweaks
e911da
e911da
* Tue May 24 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.0-0.3.rc2
e911da
- Add cglib and atinject to R
e911da
e911da
* Thu May 12 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.0-0.2.rc2
e911da
- Remove test and missing deps from pom.xml
e911da
e911da
* Tue Mar  1 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.0-0.1.rc2
e911da
- Update to 3.0rc2
e911da
- Changes according to new guidelines (versionless jars & javadocs)
e911da
e911da
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-4.1219svn
e911da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
e911da
e911da
* Thu Oct 14 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 2.0-3.1219svn
e911da
- Add java-devel >= 1:1.6.0 to BR
e911da
e911da
* Wed Oct 13 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 2.0-2.1219svn
e911da
- Moved munge repacking to prep
e911da
- Added -Dversion to change generated manifest version
e911da
- Removed http part of URL
e911da
e911da
* Thu Oct  7 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 2.0-1.1219svn
e911da
- Initial version of the package