952c07
%bcond_with bootstrap
952c07
952c07
Name:           easymock
952c07
Version:        4.2
952c07
Release:        6%{?dist}
952c07
Summary:        Easy mock objects
952c07
License:        ASL 2.0
952c07
URL:            http://www.easymock.org
952c07
952c07
# ./generate-tarball.sh
952c07
Source0:        %{name}-%{version}.tar.gz
952c07
# Remove bundled binaries which cannot be easily verified for licensing
952c07
Source1:        generate-tarball.sh
952c07
952c07
Patch1:         0001-Disable-android-support.patch
952c07
Patch2:         0002-Unshade-cglib-and-asm.patch
952c07
Patch3:         0003-Fix-OSGi-manifest.patch
952c07
Patch4:         0004-Port-to-hamcrest-2.1.patch
952c07
952c07
BuildArch:      noarch
952c07
952c07
BuildRequires:  maven-local
952c07
%if %{with bootstrap}
952c07
BuildRequires:  javapackages-bootstrap
952c07
%else
952c07
BuildRequires:  mvn(cglib:cglib)
952c07
BuildRequires:  mvn(junit:junit)
952c07
BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
952c07
BuildRequires:  mvn(org.apache.maven.plugins:maven-remote-resources-plugin)
952c07
BuildRequires:  mvn(org.apache.maven.surefire:surefire-junit-platform)
952c07
BuildRequires:  mvn(org.apache.maven.surefire:surefire-testng)
952c07
BuildRequires:  mvn(org.codehaus.mojo:build-helper-maven-plugin)
952c07
BuildRequires:  mvn(org.junit.jupiter:junit-jupiter)
952c07
BuildRequires:  mvn(org.junit.vintage:junit-vintage-engine)
952c07
BuildRequires:  mvn(org.objenesis:objenesis)
952c07
BuildRequires:  mvn(org.ow2.asm:asm)
952c07
BuildRequires:  mvn(org.testng:testng)
952c07
%endif
952c07
# xmvn-builddep misses this:
952c07
%if %{without bootstrap}
952c07
BuildRequires:  mvn(org.apache:apache-jar-resource-bundle)
952c07
%endif
952c07
952c07
952c07
Provides:       %{name}3 = %{version}-%{release}
952c07
952c07
%description
952c07
EasyMock provides Mock Objects for interfaces in JUnit tests by generating
952c07
them on the fly using Java's proxy mechanism. Due to EasyMock's unique style
952c07
of recording expectations, most refactorings will not affect the Mock Objects.
952c07
So EasyMock is a perfect fit for Test-Driven Development.
952c07
952c07
%package javadoc
952c07
Summary:        Javadoc for %{name}
952c07
952c07
%description javadoc
952c07
Javadoc for %{name}.
952c07
952c07
%prep
952c07
%setup -q -n %{name}-%{name}-%{version}
952c07
952c07
%patch1 -p1
952c07
%patch2 -p1
952c07
%patch3 -p1
952c07
%patch4 -p1
952c07
952c07
%pom_remove_plugin :license-maven-plugin
952c07
%pom_remove_plugin :maven-enforcer-plugin
952c07
%pom_remove_plugin :animal-sniffer-maven-plugin
952c07
%pom_remove_plugin :animal-sniffer-maven-plugin core
952c07
952c07
%pom_remove_plugin :maven-gpg-plugin test-testng
952c07
%pom_remove_plugin :maven-gpg-plugin test-java8
952c07
%pom_remove_plugin :maven-gpg-plugin test-junit5
952c07
952c07
# remove android support
952c07
rm core/src/main/java/org/easymock/internal/Android*.java
952c07
rm core/src/test/java/org/easymock/tests2/ClassExtensionHelperTest.java
952c07
%pom_disable_module test-android
952c07
%pom_remove_dep :dexmaker core
952c07
952c07
# unbundle asm and cglib
952c07
%pom_disable_module test-nodeps
952c07
%pom_remove_plugin :maven-shade-plugin core
952c07
952c07
# missing test deps
952c07
%pom_disable_module test-integration
952c07
%pom_disable_module test-osgi
952c07
952c07
# remove some warning caused by unavailable plugin
952c07
%pom_remove_plugin org.codehaus.mojo:versions-maven-plugin
952c07
952c07
# retired
952c07
%pom_remove_plugin :maven-timestamp-plugin
952c07
952c07
# For compatibility reasons
952c07
%mvn_file ":easymock{*}" easymock@1 easymock3@1
952c07
952c07
# ssh not needed during our builds
952c07
%pom_xpath_remove pom:extensions
952c07
952c07
# Force Surefire to run tests with JUnit, not with TestNG
952c07
%pom_xpath_inject "pom:plugin[pom:artifactId='maven-surefire-plugin']" \
952c07
    "<configuration><testNGArtifactName>none:none</testNGArtifactName></configuration>" core
952c07
952c07
%build
952c07
%mvn_build
952c07
952c07
%install
952c07
%mvn_install
952c07
952c07
%files -f .mfiles
952c07
%license core/LICENSE.txt
952c07
952c07
%files javadoc -f .mfiles-javadoc
952c07
%license core/LICENSE.txt
952c07
952c07
%changelog
952c07
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 4.2-6
952c07
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
952c07
  Related: rhbz#1991688
952c07
952c07
* Wed Jun 09 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2-5
952c07
- Rebuild to workaround DistroBaker issue
952c07
952c07
* Tue Jun 08 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2-4
952c07
- Bootstrap Maven for CentOS Stream 9
952c07
952c07
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2-3
952c07
- Bootstrap build
952c07
- Non-bootstrap build
952c07
952c07
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.2-2
952c07
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
952c07
952c07
* Mon Aug 31 2020 Fabio Valentini <decathorpe@gmail.com> - 4.2-1
952c07
- Update to version 4.2.
952c07
952c07
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.6-7
952c07
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
952c07
952c07
* Fri Jul 10 2020 Jiri Vanek <jvanek@redhat.com> - 3.6-6
952c07
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
952c07
952c07
* Wed Mar 04 2020 Marian Koncek <mkoncek@redhat.com> - 4.2-1
952c07
- Update to upstream version 4.2
952c07
952c07
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.6-5
952c07
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
952c07
952c07
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.0.2-2
952c07
- Mass rebuild for javapackages-tools 201902
952c07
952c07
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.6-4
952c07
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
952c07
952c07
* Thu Jul 18 2019 Marian Koncek <mkoncek@redhat.com> - 4.0.2-1
952c07
- Update to upstream version 4.0.2
952c07
952c07
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.5-5
952c07
- Mass rebuild for javapackages-tools 201901
952c07
952c07
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.6-3
952c07
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
952c07
952c07
* Fri Nov 30 2018 Mat Booth <mat.booth@redhat.com> - 3.6-2
952c07
- Rebuild to fix OSGi dependency on ASM 7
952c07
952c07
* Mon Oct  8 2018 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.6-1
952c07
- Update to upstream version 3.6
952c07
952c07
* Tue Jul 31 2018 Michael Simacek <msimacek@redhat.com> - 3.5-4
952c07
- Repack the tarball without binaries
952c07
952c07
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.5-3
952c07
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
952c07
952c07
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.5-2
952c07
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
952c07
952c07
* Mon Sep 18 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.5-1
952c07
- Update to upstream version 3.5
952c07
952c07
* Fri Sep 15 2017 Mat Booth <mat.booth@redhat.com> - 3.4-6
952c07
- Regenerate OSGi metadata due to Objectweb ASM upgrade
952c07
952c07
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.4-5
952c07
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
952c07
952c07
* Thu Feb 23 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.4-4
952c07
- Add missing BR on apache-resource-bundles
952c07
952c07
* Tue Feb 07 2017 Michael Simacek <msimacek@redhat.com> - 3.4-3
952c07
- Remove useless license-plugin
952c07
952c07
* Wed Jun  1 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.4-2
952c07
- Fix OSGi manifest
952c07
- Resolves: rhbz#1341052
952c07
952c07
* Mon May 30 2016 Michael Simacek <msimacek@redhat.com> - 3.4-1
952c07
- Update to upstream version 3.4
952c07
952c07
* Mon May 30 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.3.1-5
952c07
- Port to maven-jar-plugin 3.0.0
952c07
952c07
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.1-4
952c07
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
952c07
952c07
* Mon Jul 13 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.3.1-3
952c07
- Obsolete easymock2
952c07
- Resolves: rhbz#1172958
952c07
952c07
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.1-2
952c07
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
952c07
952c07
* Tue May 5 2015 Alexander Kurtakov <akurtako@redhat.com> 3.3.1-1
952c07
- Update to upstream 3.3.1 release.
952c07
952c07
* Sat Mar 07 2015 Michael Simacek <msimacek@redhat.com> - 3.3-2
952c07
- Remove retired maven-timestamp-plugin
952c07
952c07
* Tue Nov 25 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.3-1
952c07
- Update to upstream version 3.3
952c07
952c07
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2-3
952c07
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
952c07
952c07
* Tue Mar 04 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.2-2
952c07
- Use Requires: java-headless rebuild (#1067528)
952c07
952c07
* Fri Aug 30 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:3.2-1
952c07
- Update to upstream version 3.2
952c07
952c07
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.2-21
952c07
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
952c07
952c07
* Mon Feb 18 2013 Tomas Radej <tradej@redhat.com> - 0:1.2-20
952c07
- Fixed sources (bz #905973)
952c07
952c07
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.2-19
952c07
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
952c07
952c07
* Tue Nov 27 2012 Tomas Radej <tradej@redhat.com> - 0:1.2-18
952c07
- Removed ownership of _mavenpomdir
952c07
952c07
* Thu Aug 16 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.2-17
952c07
- Add LICENSE file
952c07
- Remove rpm bug workaround
952c07
- Update to current packaging guidelines
952c07
952c07
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.2-16
952c07
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
952c07
952c07
* Tue Feb 21 2012 Tomas Radej <tradej@redhat.com> - 0:1.2-15
952c07
- Removed test
952c07
952c07
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.2-14
952c07
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
952c07
952c07
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.2-13
952c07
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
952c07
952c07
* Fri Nov 26 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.2-12
952c07
- Fix pom filename (Resolves rhbz#655795)
952c07
- Remove clean section and buildroot declaration
952c07
- Remove versioned jars and pom files
952c07
952c07
* Thu Aug 20 2009 Alexander Kurtakov <akurtako@redhat.com> 0:1.2-11
952c07
- Bump release for rebuild.
952c07
952c07
* Thu Aug 20 2009 Alexander Kurtakov <akurtako@redhat.com> 0:1.2-10
952c07
- Disable tests.
952c07
952c07
* Mon May 18 2009 Fernando Nasser <fnasser@redhat.com> 0:1.2-9
952c07
- Update instructions for obtaining source tar ball
952c07
952c07
* Mon May 04 2009 Yong Yang <yyang@redhat.com> 0:1.2-8
952c07
- Rebuild with maven2-2.0.8 built in non-bootstrap mode
952c07
952c07
* Wed Mar 18 2009 Yong Yang <yyang@redhat.com>  0:1.2-7
952c07
- merge from JPP-6
952c07
- rebuild with new maven2 2.0.8 built in bootstrap mode
952c07
952c07
* Mon Feb 02 2009 David Walluck <dwalluck@redhat.com> 0:1.2-6
952c07
- fix component-info.xml
952c07
952c07
* Mon Feb 02 2009 David Walluck <dwalluck@redhat.com> 0:1.2-5
952c07
- remove unneeded maven flag
952c07
952c07
* Mon Feb 02 2009 David Walluck <dwalluck@redhat.com> 0:1.2-4
952c07
- add repolib
952c07
952c07
* Fri Jan 30 2009 Will Tatam <will.tatam@red61.com> 1.2-3.jpp5
952c07
- Inital JPP-5 Build
952c07
952c07
* Fri Jan 09 2009 Yong Yang <yyang@redhat.com> 1.2-2jpp.1
952c07
- Imported from dbhole's maven 2.0.8 packages, initial building on jpp6
952c07
952c07
* Fri Apr 11 2008 Deepak Bhole <dbhole@redhat.com> 1.2-1jpp.1
952c07
- Import from JPackage
952c07
- Add pom file
952c07
952c07
* Fri Feb 24 2006 Ralph Apel <r.apel at r-apel.de> - 0:1.2-1jpp
952c07
- Update to 1.2 keeping only java 1.4 requirement
952c07
952c07
* Fri Feb 24 2006 Ralph Apel <r.apel at r-apel.de> - 0:1.1-3jpp
952c07
- drop java-1.3.1 requirement
952c07
952c07
* Mon Oct 04 2004 Ralph Apel <r.apel at r-apel.de> - 0:1.1-2jpp
952c07
- Fixed Url, Summary, Description and License
952c07
952c07
* Mon Oct 04 2004 Ralph Apel <r.apel at r-apel.de> - 0:1.1-1jpp
952c07
- First JPackage release