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