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