!5 [sync] PR-4: Upgrade to version 1.4.1
From: @openeuler-sync-bot Reviewed-by: @caodongxia Signed-off-by: @caodongxia
This commit is contained in:
commit
008dcfcc67
@ -1,13 +1,13 @@
|
||||
%global base_name antunit
|
||||
Name: ant-%{base_name}
|
||||
Version: 1.3
|
||||
Release: 2
|
||||
Version: 1.4.1
|
||||
Release: 1
|
||||
Summary: Provide antunit ant task
|
||||
License: ASL 2.0
|
||||
License: Apache-2.0
|
||||
URL: http://ant.apache.org/antlibs/antunit/
|
||||
Source0: https://archive.apache.org/dist/ant/antlibs/%{base_name}/source/apache-%{name}-%{version}-src.tar.bz2
|
||||
BuildArch: noarch
|
||||
BuildRequires: javapackages-local ant ant-junit ant-testutil
|
||||
BuildRequires: maven-local ant ant-junit ant-testutil
|
||||
|
||||
%description
|
||||
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
|
||||
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
|
||||
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
|
||||
%mvn_artifact %{name}-%{version}.pom build/lib/%{name}-%{version}.jar
|
||||
%mvn_file ":ant-antunit" ant/ant-antunit
|
||||
%mvn_install -J docs/
|
||||
%mvn_install
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/ant.d
|
||||
echo "ant/%{name}" > %{buildroot}%{_sysconfdir}/ant.d/%{base_name}
|
||||
|
||||
%files -f .mfiles
|
||||
%license LICENSE NOTICE
|
||||
%license NOTICE
|
||||
%doc CONTRIBUTORS README README.html WHATSNEW
|
||||
%config(noreplace) %{_sysconfdir}/ant.d/%{base_name}
|
||||
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
%license LICENSE NOTICE
|
||||
%license NOTICE
|
||||
|
||||
%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
|
||||
- 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