147 lines
4.4 KiB
RPMSpec
147 lines
4.4 KiB
RPMSpec
%global namedreltag %{nil}
|
|
%global namedversion %{version}%{?namedreltag}
|
|
|
|
Name: jmock
|
|
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/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
|
|
Mock objects help you design and test the interactions between the objects in
|
|
your programs.
|
|
The jMock library:
|
|
* makes it quick and easy to define mock objects, so you don't break the
|
|
rhythm of programming.
|
|
* lets you precisely specify the interactions between your objects, reducing
|
|
the brittleness of your tests.
|
|
* works well with the auto-completion and re-factoring features of your IDE
|
|
* plugs into your favorite test framework
|
|
* is easy to extend.
|
|
|
|
%package example
|
|
Summary: jMock Examples
|
|
%description example
|
|
jMock Examples.
|
|
|
|
%package junit3
|
|
Summary: jMock JUnit 3 Integration
|
|
%description junit3
|
|
jMock JUnit 3 Integration.
|
|
|
|
%package junit4
|
|
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
|
|
Plugins that make it easier to use jMock with legacy code.
|
|
|
|
%package parent
|
|
Summary: jMock Parent POM
|
|
%description parent
|
|
jMock Parent POM.
|
|
|
|
%package testjar
|
|
Summary: jMock Test Jar
|
|
%description testjar
|
|
Source for JAR files used in jMock Core tests.
|
|
|
|
%package javadoc
|
|
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}
|
|
%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_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
|
|
%mvn_alias org.%{name}:%{name} :%{name}-script
|
|
%mvn_package org.%{name}:%{name}::tests: %{name}
|
|
%mvn_package org.%{name}:%{name}-junit3::tests: %{name}-junit3
|
|
sed -i '/Nullable/d' testjar/src/main/java/org/jmock/testjar/InterfaceFromOtherClassLoader.java
|
|
|
|
%build
|
|
%mvn_build -s -- -Dmaven.test.failure.ignore=true
|
|
|
|
%install
|
|
%mvn_install
|
|
|
|
%files -f .mfiles-%{name}
|
|
%doc README*
|
|
%license LICENSE.txt
|
|
|
|
%files example -f .mfiles-%{name}-example
|
|
|
|
%files junit3 -f .mfiles-%{name}-junit3
|
|
|
|
%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
|
|
%license LICENSE.txt
|
|
|
|
%files testjar -f .mfiles-%{name}-testjar
|
|
%license LICENSE.txt
|
|
|
|
%files javadoc -f .mfiles-javadoc
|
|
%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
|
|
|
|
* Wed Aug 12 2020 maminjie <maminjie1@huawei.com> - 2.8.2-1
|
|
- package init
|