diff --git a/.gitignore b/.gitignore
index 3877c89..65ad8fb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,4 @@ apache-ant-1.8.4-src.tar.bz2
/apache-ant-1.10.0-src.tar.bz2
/apache-ant-1.10.1-src.tar.bz2
/apache-ant-1.10.2-src.tar.bz2
+/apache-ant-1.10.3-src.tar.bz2
diff --git a/ant.spec b/ant.spec
index 9651a58..098d891 100644
--- a/ant.spec
+++ b/ant.spec
@@ -31,10 +31,13 @@
%bcond_without tests
%bcond_without javadoc
+# Disabled for now, asi it doesn't work (tests fail) and nobody needs it
+%bcond_with junit5
+
%global ant_home %{_datadir}/ant
Name: ant
-Version: 1.10.2
+Version: 1.10.3
Release: 1%{?dist}
Epoch: 0
Summary: Java build tool
@@ -45,9 +48,6 @@ URL: https://ant.apache.org/
Source0: https://www.apache.org/dist/ant/source/apache-ant-%{version}-src.tar.bz2
Source2: apache-ant-1.8.ant.conf
-# Fix some places where copies of classes are included in the wrong jarfiles
-Patch4: apache-ant-class-path-in-manifest.patch
-
BuildRequires: javapackages-local
BuildRequires: java-devel >= 1:1.8.0
BuildRequires: ant >= 1.10.2
@@ -69,6 +69,10 @@ BuildRequires: mvn(regexp:regexp)
BuildRequires: mvn(xalan:xalan)
BuildRequires: mvn(xml-resolver:xml-resolver)
+%if %{with junit5}
+BuildRequires: junit5
+%endif
+
# Theoretically Ant might be usable with just JRE, but typical Ant
# workflow requires full JDK, so we recommend it here.
%{?fedora:Recommends}%{!?fedora:Requires}: java-devel >= 1:1.8.0
@@ -280,6 +284,18 @@ Optional junit tasks for %{name}.
%description junit -l fr
Taches junit optionelles pour %{name}.
+%if %{with junit5}
+%package junit5
+Summary: Optional junit5 tasks for %{name}
+Requires: %{name} = %{epoch}:%{version}-%{release}
+
+%description junit5
+Optional junit5 tasks for %{name}.
+
+%description junit5 -l fr
+Taches junit5 optionelles pour %{name}.
+%endif
+
%package testutil
Summary: Test utility classes for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release}
@@ -319,11 +335,9 @@ Javadoc pour %{name}.
%prep
%setup -q -n apache-ant-%{version}
-#Fixup version
-find -name build.xml -o -name pom.xml | xargs sed -i -e s/-SNAPSHOT//
# Fix class-path-in-manifest rpmlint warning
-%patch4
+%pom_xpath_remove 'attribute[@name="Class-Path"]' build.xml
# clean jar files
find . -name "*.jar" | xargs -t rm
@@ -337,6 +351,9 @@ rm src/tests/junit/org/apache/tools/ant/types/selectors/SignedSelectorTest.java
#install jars
build-jar-repository -s -p lib/optional antlr bcel javamail/mailapi jdepend junit log4j-1 oro regexp bsf commons-logging commons-net jsch xalan-j2 xml-commons-resolver xalan-j2-serializer hamcrest/core xz-java
+%if %{with junit5}
+build-jar-repository -s -p lib/optional junit5 opentest4j
+%endif
# fix hardcoded paths in ant script and conf
cp -p %{SOURCE2} %{name}.conf
@@ -359,6 +376,10 @@ mv LICENSE.utf8 LICENSE
# We want a hard dep on antlr
%pom_xpath_remove pom:optional src/etc/poms/ant-antlr/pom.xml
+%if %{without junit5}
+%pom_xpath_inject 'target[@name="javadocs"]/javadoc/packageset' '' build.xml
+%endif
+
%build
%{ant} jars test-jar
@@ -368,6 +389,9 @@ mv LICENSE.utf8 LICENSE
#remove empty jai and netrexx jars. Due to missing dependencies they contain only manifests.
rm -fr build/lib/ant-jai.jar build/lib/ant-netrexx.jar
+%if %{without junit5}
+rm -f build/lib/ant-junitlauncher.jar
+%endif
# -----------------------------------------------------------------------------
%install
@@ -450,6 +474,10 @@ echo "junit hamcrest/core ant/ant-junit4" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name
echo "testutil ant/ant-testutil" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/testutil
echo "xz-java ant/ant-xz" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/xz
+%if %{with junit5}
+echo "junit5 hamcrest/core junit opentest4j ant/ant-junitlauncher" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/junitlauncher
+%endif
+
%if %with javadoc
# javadoc
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
@@ -480,7 +508,6 @@ LC_ALL=en_US.utf8 %{ant} test
%{ant_home}/etc/mmetrics-frames.xsl
%{ant_home}/etc/log.xsl
%{ant_home}/etc/tagdiff.xsl
-%{ant_home}/etc/junit-frames-xalan1.xsl
%{ant_home}/etc/common2master.xsl
%{ant_home}/etc/printFailingTests.xsl
%dir %{_sysconfdir}/%{name}.d
@@ -570,6 +597,15 @@ LC_ALL=en_US.utf8 %{ant} test
%config(noreplace) %{_sysconfdir}/%{name}.d/junit4
%{ant_home}/etc/junit-frames.xsl
%{ant_home}/etc/junit-noframes.xsl
+%{ant_home}/etc/junit-frames-xalan1.xsl
+%{ant_home}/etc/junit-frames-saxon.xsl
+%{ant_home}/etc/junit-noframes-saxon.xsl
+
+%if %{with junit5}
+%files junit5 -f .mfiles-junitlauncher
+%{ant_home}/lib/%{name}-junitlauncher.jar
+%config(noreplace) %{_sysconfdir}/%{name}.d/junitlauncher
+%endif
%files testutil -f .mfiles-testutil
%{ant_home}/lib/%{name}-testutil.jar
@@ -592,6 +628,9 @@ LC_ALL=en_US.utf8 %{ant} test
# -----------------------------------------------------------------------------
%changelog
+* Wed Mar 28 2018 Michael Simacek - 0:1.10.3-1
+- Update to upstream version 1.10.3
+
* Wed Feb 7 2018 Mikolaj Izdebski - 0:1.10.2-1
- Update to upstream version 1.10.2
diff --git a/apache-ant-class-path-in-manifest.patch b/apache-ant-class-path-in-manifest.patch
deleted file mode 100644
index dbf1272..0000000
--- a/apache-ant-class-path-in-manifest.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- build.xml~ 2018-02-03 17:52:24.000000000 +0100
-+++ build.xml 2018-02-07 11:46:39.208543741 +0100
-@@ -713,10 +713,6 @@
-
-
-
--
--
--
-
-
-
diff --git a/sources b/sources
index ca18433..6564ac1 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (apache-ant-1.10.2-src.tar.bz2) = ad183d94e1a284719c3c83b8ae4049be0ee7867fd777017f0de8b887d03089925d198d5002a0526d781917ef32a37264018cf90ed8e8a60399f3b64aa87419bb
+SHA512 (apache-ant-1.10.3-src.tar.bz2) = 0d1b3c72ee34e1ccddd02ad48fa13440618fa76c85166bbbca517b77d61e86b247b82bad819f32cf68d46c5133d98629dc423dfaaf1dd3f1654671eb913b01a5