upgrade to version 1.4.1
(cherry picked from commit 8479021e9d8b1ed488395783c76b23515b7060e9)
This commit is contained in:
parent
d7bc42e7d7
commit
65f425a3ff
@ -1,13 +1,13 @@
|
|||||||
%global base_name antunit
|
%global base_name antunit
|
||||||
Name: ant-%{base_name}
|
Name: ant-%{base_name}
|
||||||
Version: 1.3
|
Version: 1.4.1
|
||||||
Release: 2
|
Release: 1
|
||||||
Summary: Provide antunit ant task
|
Summary: Provide antunit ant task
|
||||||
License: ASL 2.0
|
License: Apache-2.0
|
||||||
URL: http://ant.apache.org/antlibs/antunit/
|
URL: http://ant.apache.org/antlibs/antunit/
|
||||||
Source0: https://archive.apache.org/dist/ant/antlibs/%{base_name}/source/apache-%{name}-%{version}-src.tar.bz2
|
Source0: https://archive.apache.org/dist/ant/antlibs/%{base_name}/source/apache-%{name}-%{version}-src.tar.bz2
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: javapackages-local ant ant-junit ant-testutil
|
BuildRequires: maven-local ant ant-junit ant-testutil
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The <antunit> task drives the tests much like <junit> does for JUnit tests.
|
The <antunit> task drives the tests much like <junit> does for JUnit tests.
|
||||||
@ -31,25 +31,57 @@ mv CONTRIBUTORS CONTRIBUTORS.orig
|
|||||||
iconv -f ISO-8859-1 -t UTF-8 CONTRIBUTORS.orig > CONTRIBUTORS
|
iconv -f ISO-8859-1 -t UTF-8 CONTRIBUTORS.orig > CONTRIBUTORS
|
||||||
touch -r CONTRIBUTORS.orig CONTRIBUTORS
|
touch -r CONTRIBUTORS.orig CONTRIBUTORS
|
||||||
|
|
||||||
|
mv %{name}-%{version}.pom pom.xml
|
||||||
|
|
||||||
|
%pom_xpath_inject pom:project/pom:build '
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>${project.basedir}/src/main</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**/antlib.xml</include>
|
||||||
|
</includes>
|
||||||
|
</resource>
|
||||||
|
</resources>'
|
||||||
|
|
||||||
|
# EatYourOwnDogFoodTest
|
||||||
|
sed -i 's|build/test-classes|target/test-classes|g' src/etc/testcases/antunit/java-io.xml
|
||||||
|
|
||||||
|
# AssertTest
|
||||||
|
sed -i 's|build/classes|target/classes|g' src/etc/testcases/assert.xml src/tests/junit/org/apache/ant/antunit/AssertTest.java
|
||||||
|
|
||||||
%build
|
%build
|
||||||
ant package
|
%mvn_build -- -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8
|
||||||
|
|
||||||
|
%check
|
||||||
|
# enable tests
|
||||||
|
%pom_xpath_set pom:maven.test.skip false
|
||||||
|
|
||||||
|
# compile tests
|
||||||
|
xmvn test-compile -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8
|
||||||
|
|
||||||
|
# run tests
|
||||||
|
java -cp target/classes:target/test-classes:$(build-classpath junit hamcrest ant/ant-testutil ant ant/ant-launcher) \
|
||||||
|
org.junit.runner.JUnitCore \
|
||||||
|
$(find src/tests/junit/ -name '*.java' -printf '%%P\n' | cut -f 1 -d '.' | tr / .)
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%mvn_artifact %{name}-%{version}.pom build/lib/%{name}-%{version}.jar
|
|
||||||
%mvn_file ":ant-antunit" ant/ant-antunit
|
%mvn_file ":ant-antunit" ant/ant-antunit
|
||||||
%mvn_install -J docs/
|
%mvn_install
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/ant.d
|
mkdir -p %{buildroot}%{_sysconfdir}/ant.d
|
||||||
echo "ant/%{name}" > %{buildroot}%{_sysconfdir}/ant.d/%{base_name}
|
echo "ant/%{name}" > %{buildroot}%{_sysconfdir}/ant.d/%{base_name}
|
||||||
|
|
||||||
%files -f .mfiles
|
%files -f .mfiles
|
||||||
%license LICENSE NOTICE
|
%license NOTICE
|
||||||
%doc CONTRIBUTORS README README.html WHATSNEW
|
%doc CONTRIBUTORS README README.html WHATSNEW
|
||||||
%config(noreplace) %{_sysconfdir}/ant.d/%{base_name}
|
%config(noreplace) %{_sysconfdir}/ant.d/%{base_name}
|
||||||
|
|
||||||
%files javadoc -f .mfiles-javadoc
|
%files javadoc -f .mfiles-javadoc
|
||||||
%license LICENSE NOTICE
|
%license NOTICE
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed May 18 2022 Ge Wang <wangge20@h-parters.com> - 1.4.1-1
|
||||||
|
- Upgrade to version 1.4.1
|
||||||
|
|
||||||
* Mon Sep 14 2020 chengzihan <chengzihan2@huawei.com> - 1.3-2
|
* Mon Sep 14 2020 chengzihan <chengzihan2@huawei.com> - 1.3-2
|
||||||
- Replace invalid url of Source0
|
- Replace invalid url of Source0
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
BIN
apache-ant-antunit-1.4.1-src.tar.bz2
Normal file
BIN
apache-ant-antunit-1.4.1-src.tar.bz2
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user