update to version 2.12.0

This commit is contained in:
wang--ge 2024-02-02 11:31:36 +08:00
parent 9b2120518a
commit 04c11646ef
4 changed files with 35 additions and 36 deletions

Binary file not shown.

View File

@ -1,24 +0,0 @@
diff -Nur a/jmock/src/main/java/org/jmock/lib/CurrentStateMatcher.java b/jmock/src/main/java/org/jmock/lib/CurrentStateMatcher.java
--- a/jmock/src/main/java/org/jmock/lib/CurrentStateMatcher.java 2023-08-04 10:31:56.313040574 +0800
+++ b/jmock/src/main/java/org/jmock/lib/CurrentStateMatcher.java 2023-08-04 10:43:51.867413243 +0800
@@ -1,7 +1,6 @@
package org.jmock.lib;
import org.hamcrest.Description;
-import org.hamcrest.Factory;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;
import org.jmock.States;
@@ -35,12 +34,10 @@
.appendText(stateName);
}
- @Factory
public static Matcher<States> isCurrently(String stateName) {
return new CurrentStateMatcher(stateName, true);
}
- @Factory
public static Matcher<States> isNotCurrently(String stateName) {
return new CurrentStateMatcher(stateName, false);
}

BIN
jmock-library-2.12.0.tar.gz Normal file

Binary file not shown.

View File

@ -2,19 +2,23 @@
%global namedversion %{version}%{?namedreltag}
Name: jmock
Version: 2.8.2
Release: 2
Version: 2.12.0
Release: 1
Summary: Java library for testing code with mock objects
License: BSD
Url: http://www.jmock.org/
Source0: https://github.com/jmock-developers/jmock-library/archive/%{version}.tar.gz
Patch0: fix-org-hamcrest-Factory-cannot-find.patch
Source0: https://github.com/jmock-developers/jmock-library/archive/2.12.0/jmock-library-%{version}.tar.gz
BuildRequires: maven-local mvn(cglib:cglib) mvn(junit:junit)
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin) mvn(org.beanshell:bsh)
BuildRequires: mvn(org.codehaus.mojo:exec-maven-plugin) mvn(org.hamcrest:hamcrest-library)
BuildRequires: mvn(org.objenesis:objenesis) mvn(org.ow2.asm:asm)
BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:)
BuildRequires: mvn(com.google.code.findbugs:annotations)
BuildRequires: mvn(org.junit.jupiter:junit-jupiter-api)
BuildRequires: mvn(net.bytebuddy:byte-buddy)
BuildRequires: mvn(com.google.auto.service:auto-service)
BuildRequires: mvn(org.apache.maven.surefire:surefire-junit-platform)
BuildArch: noarch
%description
@ -44,6 +48,11 @@ Summary: jMock JUnit 4 Integration
%description junit4
jMock JUnit 4 Integration.
%package junit5
Summary: jMock JUnit 5 Integration
%description junit5
Jmock JUnit 5 Integration
%package legacy
Summary: jMock Legacy Plugins
%description legacy
@ -64,29 +73,34 @@ Summary: Javadoc for %{name}
%description javadoc
This package contains javadoc for %{name}.
%package imposters
Summary: JMock imposters plugin
%description imposters
Class mocks are more numerous than interface mocks, so drop the legacy name
%package imposters-tests
Summary: tests for imposters
%description imposters-tests
tests for imposters
%prep
%setup -q -n %{name}-library-%{namedversion}
%patch0 -p1
%pom_remove_plugin :nexus-staging-maven-plugin
%pom_remove_plugin :maven-javadoc-plugin
%pom_remove_plugin :maven-source-plugin
%pom_remove_plugin :maven-gpg-plugin testjar
%pom_change_dep cglib: :cglib
%pom_change_dep cglib: :cglib %{name}
%pom_remove_plugin :versions-maven-plugin
%pom_remove_dep javax.xml.ws:jaxws-api %{name}
sed -i "s|%classpath|$(build-classpath objectweb-asm/asm)|" %{name}/pom.xml
%pom_xpath_remove pom:build %{name}-example
%pom_xpath_inject "pom:project" "
<build>
<sourceDirectory>src/main</sourceDirectory>
</build>" %{name}-example
# package org.jmock.integration.junit{3,4} do not exist
%pom_add_dep org.%{name}:%{name}-junit3:'${project.version}' %{name}-example
%pom_add_dep org.%{name}:%{name}-junit4:'${project.version}' %{name}-example
%mvn_alias org.%{name}:%{name} :%{name}-script
%mvn_package org.%{name}:%{name}::tests: %{name}
%mvn_package org.%{name}:%{name}-junit3::tests: %{name}-junit3
# AssertionError: Expected: (null or an empty string) but: was "the Mockery is not thread-safe: use a Synchroniser to ensure thread safety"
rm jmock-legacy/src/test/java/org/jmock/test/acceptance/MockeryFinalizationAcceptanceTests.java
sed -i '/Nullable/d' testjar/src/main/java/org/jmock/testjar/InterfaceFromOtherClassLoader.java
%build
%mvn_build -s -- -Dmaven.test.failure.ignore=true
@ -104,6 +118,12 @@ rm jmock-legacy/src/test/java/org/jmock/test/acceptance/MockeryFinalizationAccep
%files junit4 -f .mfiles-%{name}-junit4
%files junit5 -f .mfiles-%{name}-junit5
%files imposters -f .mfiles-%{name}-imposters
%files imposters-tests -f .mfiles-%{name}-imposters-tests
%files legacy -f .mfiles-%{name}-legacy
%files parent -f .mfiles-%{name}-parent
@ -116,6 +136,9 @@ rm jmock-legacy/src/test/java/org/jmock/test/acceptance/MockeryFinalizationAccep
%license LICENSE.txt
%changelog
* Thu Feb 01 2024 Ge Wang <wang__ge@126.com> - 2.12.0-1
- Update to version 2.12.0
* Wed Sep 27 2023 wangkai <13474090681@163.com> - 2.8.2-2
- Fix build error for hamcrest-2.2 and junit-4.13