7f0bec7
%global namedreltag %{nil}
7f0bec7
%global namedversion %{version}%{?namedreltag}
7f0bec7
7f0bec7
Name:          jmock
cf3d99c
Version:       2.8.2
930c33f
Release:       7%{?dist}
7f0bec7
Summary:       Java library for testing code with mock objects
7f0bec7
License:       BSD
7f0bec7
Url:           http://www.jmock.org/
1dd265f
Source0:       https://github.com/jmock-developers/jmock-library/archive/%{namedversion}.tar.gz
1dd265f
1dd265f
BuildRequires: maven-local
1dd265f
BuildRequires: mvn(cglib:cglib)
1dd265f
BuildRequires: mvn(junit:junit)
1dd265f
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin)
1dd265f
BuildRequires: mvn(org.beanshell:bsh)
1dd265f
BuildRequires: mvn(org.codehaus.mojo:exec-maven-plugin)
1dd265f
BuildRequires: mvn(org.hamcrest:hamcrest-library)
1dd265f
BuildRequires: mvn(org.objenesis:objenesis)
1dd265f
BuildRequires: mvn(org.ow2.asm:asm)
1dd265f
BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:)
1dd265f
7f0bec7
BuildArch:     noarch
7f0bec7
7f0bec7
%description
7f0bec7
Mock objects help you design and test the interactions between the objects in
7f0bec7
your programs.
7f0bec7
The jMock library:
7f0bec7
  * makes it quick and easy to define mock objects, so you don't break the
7f0bec7
    rhythm of programming.
7f0bec7
  * lets you precisely specify the interactions between your objects, reducing
7f0bec7
    the brittleness of your tests.
7f0bec7
  * works well with the auto-completion and re-factoring features of your IDE
7f0bec7
  * plugs into your favorite test framework
7f0bec7
  * is easy to extend.
7f0bec7
cf3d99c
%package example
cf3d99c
Summary:       jMock Examples
cf3d99c
cf3d99c
%description example
cf3d99c
jMock Examples.
cf3d99c
cf3d99c
%package junit3
cf3d99c
Summary:       jMock JUnit 3 Integration
cf3d99c
cf3d99c
%description junit3
cf3d99c
jMock JUnit 3 Integration.
cf3d99c
cf3d99c
%package junit4
cf3d99c
Summary:       jMock JUnit 4 Integration
cf3d99c
cf3d99c
%description junit4
cf3d99c
jMock JUnit 4 Integration.
cf3d99c
cf3d99c
%package legacy
cf3d99c
Summary:       jMock Legacy Plugins
cf3d99c
cf3d99c
%description legacy
cf3d99c
Plugins that make it easier to use jMock with legacy code.
cf3d99c
cf3d99c
%package parent
cf3d99c
Summary:       jMock Parent POM
cf3d99c
cf3d99c
%description parent
cf3d99c
jMock Parent POM.
cf3d99c
cf3d99c
%package testjar
cf3d99c
Summary:       jMock Test Jar
cf3d99c
cf3d99c
%description testjar
cf3d99c
Source for JAR files used in jMock Core tests.
cf3d99c
7f0bec7
%package javadoc
7f0bec7
Summary:       Javadoc for %{name}
7f0bec7
7f0bec7
%description javadoc
7f0bec7
This package contains javadoc for %{name}.
7f0bec7
7f0bec7
%prep
1dd265f
%setup -q -n %{name}-library-%{namedversion}
1dd265f
1dd265f
%pom_remove_plugin :nexus-staging-maven-plugin
1dd265f
%pom_remove_plugin :maven-javadoc-plugin
1dd265f
%pom_remove_plugin :maven-source-plugin
1dd265f
1dd265f
%pom_remove_plugin :maven-gpg-plugin testjar
1dd265f
cf3d99c
%pom_change_dep cglib: :cglib
cf3d99c
%pom_change_dep cglib: :cglib %{name}
1dd265f
1dd265f
sed -i "s|%classpath|$(build-classpath objectweb-asm/asm)|" %{name}/pom.xml
1dd265f
1dd265f
%pom_xpath_remove pom:build %{name}-example
1dd265f
%pom_xpath_inject "pom:project" "
1dd265f
<build>
1dd265f
  <sourceDirectory>src/main</sourceDirectory>
1dd265f
</build>" %{name}-example
1dd265f
# package org.jmock.integration.junit{3,4} do not exist
1dd265f
%pom_add_dep org.%{name}:%{name}-junit3:'${project.version}' %{name}-example
1dd265f
%pom_add_dep org.%{name}:%{name}-junit4:'${project.version}' %{name}-example
1dd265f
1dd265f
%mvn_alias org.%{name}:%{name} :%{name}-script
cf3d99c
%mvn_package org.%{name}:%{name}::tests: %{name}
cf3d99c
%mvn_package org.%{name}:%{name}-junit3::tests: %{name}-junit3
5e399fe
# AssertionError: Expected: (null or an empty string) but: was "the Mockery is not thread-safe: use a Synchroniser to ensure thread safety"
5e399fe
rm jmock-legacy/src/test/java/org/jmock/test/acceptance/MockeryFinalizationAcceptanceTests.java
7f0bec7
7f0bec7
%build
7f0bec7
cf3d99c
%mvn_build -s
7f0bec7
7f0bec7
%install
1dd265f
%mvn_install
7f0bec7
cf3d99c
%files -f .mfiles-%{name}
631b0eb
%doc README*
631b0eb
%license LICENSE.txt
7f0bec7
cf3d99c
%files example -f .mfiles-%{name}-example
cf3d99c
%files junit3 -f .mfiles-%{name}-junit3
cf3d99c
%files junit4 -f .mfiles-%{name}-junit4
cf3d99c
%files legacy -f .mfiles-%{name}-legacy
cf3d99c
cf3d99c
%files parent -f .mfiles-%{name}-parent
cf3d99c
%license LICENSE.txt
cf3d99c
cf3d99c
%files testjar -f .mfiles-%{name}-testjar
cf3d99c
%license LICENSE.txt
cf3d99c
1dd265f
%files javadoc -f .mfiles-javadoc
631b0eb
%license LICENSE.txt
7f0bec7
7f0bec7
%changelog
930c33f
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.2-7
930c33f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
930c33f
e54f6b7
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.2-6
e54f6b7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
e54f6b7
48aac95
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.2-5
48aac95
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
48aac95
ebcf94d
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.2-4
ebcf94d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
ebcf94d
b786860
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.2-3
b786860
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
b786860
5e399fe
* Fri Jul 08 2016 gil cattaneo <puntogil@libero.it> 2.8.2-2
5e399fe
- disable test failure
5e399fe
cf3d99c
* Sun Mar 06 2016 gil cattaneo <puntogil@libero.it> 2.8.2-1
cf3d99c
- updated to 2.8.2
cf3d99c
19a7546
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.1-3
19a7546
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
19a7546
0ff53c3
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.1-2
0ff53c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
0ff53c3
1dd265f
* Wed Jun 03 2015 gil cattaneo <puntogil@libero.it> 2.8.1-1
1dd265f
- updated to 2.8.1
1dd265f
631b0eb
* Fri Feb 06 2015 gil cattaneo <puntogil@libero.it> 2.5.1-8
631b0eb
- introduce license macro
631b0eb
6d63b79
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.1-7
6d63b79
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
6d63b79
6cc46b0
* Thu May 22 2014 gil cattaneo <puntogil@libero.it> 2.5.1-6
6cc46b0
- Use .mfiles generated during build
6cc46b0
- Fix junit dep
6cc46b0
0be142d
* Fri Mar 28 2014 Michael Simacek <msimacek@redhat.com> - 2.5.1-5
0be142d
- Use Requires: java-headless rebuild (#1067528)
0be142d
ba6c291
* Fri Nov 15 2013 gil cattaneo <puntogil@libero.it> 2.5.1-4
ba6c291
- use objectweb-asm3
ba6c291
4b4a8cf
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.1-3
4b4a8cf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
4b4a8cf
e072fc5
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.1-2
e072fc5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
e072fc5
7f0bec7
* Thu Apr 19 2012 gil cattaneo <puntogil@libero.it> 2.5.1-1
cf3d99c
- initial rpm