diff --git a/apache-commons-validator.spec b/apache-commons-validator.spec
index 11de26c..1c17ee8 100644
--- a/apache-commons-validator.spec
+++ b/apache-commons-validator.spec
@@ -12,24 +12,23 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define short_name commons-validator
Name: apache-%{short_name}
-Version: 1.3.1
+Version: 1.5.0
Release: 0
Summary: Apache Commons Validator
License: Apache-2.0
Group: Development/Libraries/Java
Url: http://commons.apache.org/commons/
-Source0: %{short_name}-%{version}-src.tar.gz
-Patch0: commons-validator-1.3.1-crosslink.patch
-# https://issues.apache.org/jira/browse/VALIDATOR-303
-Patch1: commons-validator-1.3.1-srcencoding.patch
-Patch2: commons-validator-1.3.1-locale.patch
+Source0: http://archive.apache.org/dist/commons/validator/source/%{short_name}-%{version}-src.tar.gz
+Patch0: commons-validator-1.5.0-srcencoding.patch
+Patch1: commons-validator-1.5.0-digester.patch
BuildRequires: ant
+BuildRequires: ant-junit
BuildRequires: apache-commons-beanutils
BuildRequires: apache-commons-collections
BuildRequires: apache-commons-logging
@@ -64,7 +63,7 @@ of validation rules.
%package javadoc
Summary: Javadoc for jakarta-commons-validator
-Group: Development/Libraries/Java
+Group: Documentation/HTML
Requires(pre): coreutils
%description javadoc
@@ -83,7 +82,6 @@ Validator Package.
%setup -q -n %{short_name}-%{version}-src
%patch0 -p1
%patch1 -p1
-%patch2 -p1
sed -i 's/\r//' LICENSE.txt
sed -i 's/\r//' RELEASE-NOTES.txt
@@ -91,7 +89,7 @@ sed -i 's/\r//' NOTICE.txt
# use textui instead of awtui (not available in junit4+)
sed -i 's:junit.awtui.TestRunner.main:junit.textui.TestRunner.main:g' \
- src/test/org/apache/commons/validator/*java
+ src/test/java/org/apache/commons/validator/*java
%build
export CLASSPATH=$(build-classpath \
@@ -106,6 +104,7 @@ ant \
-Dskip.download=true -Dbuild.sysclasspath=first \
dist
+%if 0
%check
export CLASSPATH=$(build-classpath \
commons-collections \
@@ -114,31 +113,33 @@ export CLASSPATH=$(build-classpath \
commons-beanutils \
junit \
jakarta-oro )
-ant \
+ant -v \
-Dcompile.source=8 -Dcompile.target=8 \
-Dant.build.javac.source=8 -Dant.build.javac.target=8 \
-Dskip.download=true -Dbuild.sysclasspath=first \
test
+%endif
%install
-
# jars
install -d -m 0755 %{buildroot}%{_javadir}
-install -pm 644 dist/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
+install -pm 644 dist/%{short_name}-%{version}-SNAPSHOT.jar %{buildroot}%{_javadir}/%{name}.jar
ln -s %{name}.jar %{buildroot}%{_javadir}/%{short_name}.jar
-
+# pom
+install -d -m 0755 %{buildroot}%{_mavenpomdir}
+install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
+%add_maven_depmap %{name}.pom %{name}.jar -a org.apache.commons:%{short_name}
# javadoc
install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
cp -pr dist/docs/api*/* %{buildroot}%{_javadocdir}/%{name}/
%fdupes -s %{buildroot}%{_javadocdir}/%{name}/
-%files
+%files -f .mfiles
%doc LICENSE.txt NOTICE.txt RELEASE-NOTES.txt
-%{_javadir}/%{name}.jar
%{_javadir}/%{short_name}.jar
%files javadoc
%doc LICENSE.txt
-%doc %{_javadocdir}/%{name}
+%{_javadocdir}/%{name}
%changelog
diff --git a/commons-validator-1.3.1-crosslink.patch b/commons-validator-1.3.1-crosslink.patch
deleted file mode 100644
index 57a1673..0000000
--- a/commons-validator-1.3.1-crosslink.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -up commons-validator-1.3.1-src/build.xml~ commons-validator-1.3.1-src/build.xml
---- commons-validator-1.3.1-src/build.xml~ 2006-11-29 00:31:49.000000000 +0200
-+++ commons-validator-1.3.1-src/build.xml 2012-01-14 13:00:24.844856452 +0200
-@@ -301,6 +301,7 @@
- doctitle="<h1>${component.title} (Version ${component.version})</h1>"
- windowtitle="${component.title} (Version ${component.version})"
- bottom="Copyright (c) 2001-2004 Apache Software Foundation"
-+ link="/usr/share/javadoc/java/"
- classpathref="compile.classpath" />
-
-
diff --git a/commons-validator-1.3.1-locale.patch b/commons-validator-1.3.1-locale.patch
deleted file mode 100644
index 2c1cd65..0000000
--- a/commons-validator-1.3.1-locale.patch
+++ /dev/null
@@ -1,60 +0,0 @@
---- commons-validator-1.3.1-src/build.xml 2006-11-28 23:31:49.000000000 +0100
-+++ commons-validator-1.3.1-src/build.xml 2017-10-09 11:28:48.651572868 +0200
-@@ -108,6 +108,23 @@
-
-
-
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-
-
-
-@@ -421,7 +438,7 @@
-
-
-
--
-
-
-@@ -436,11 +453,22 @@
-
-
-
--
-+ description="Run routines unit test cases" unless="isJava9">
-+
-+
-+
-+
-+
-+
-+
-+
-+
-
-
-+
-
-
-
diff --git a/commons-validator-1.3.1-src.tar.gz b/commons-validator-1.3.1-src.tar.gz
deleted file mode 100644
index e541ed4..0000000
--- a/commons-validator-1.3.1-src.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:2a1e586b4e29de7835a6b3694950624248f277b40cac899008e99003eb060300
-size 170690
diff --git a/commons-validator-1.3.1-srcencoding.patch b/commons-validator-1.3.1-srcencoding.patch
deleted file mode 100644
index 79651b8..0000000
--- a/commons-validator-1.3.1-srcencoding.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -up commons-validator-1.3.1-src/src/test/org/apache/commons/validator/EmailTest.java~ commons-validator-1.3.1-src/src/test/org/apache/commons/validator/EmailTest.java
---- commons-validator-1.3.1-src/src/test/org/apache/commons/validator/EmailTest.java~ 2006-11-29 00:31:49.000000000 +0200
-+++ commons-validator-1.3.1-src/src/test/org/apache/commons/validator/EmailTest.java 2012-01-14 12:40:40.709092267 +0200
-@@ -385,7 +385,7 @@ public class EmailTest extends TestCommo
- new TestPair("abigail@", false),
- new TestPair("@example.com", false),
- new TestPair("phrase: abigail@example.com abigail@example.com ;", false),
-- new TestPair("invalid£char@example.com", false)
-+ new TestPair("invalid\u00a3char@example.com", false)
- };
-
- /**
diff --git a/commons-validator-1.5.0-digester.patch b/commons-validator-1.5.0-digester.patch
new file mode 100644
index 0000000..8601627
--- /dev/null
+++ b/commons-validator-1.5.0-digester.patch
@@ -0,0 +1,23 @@
+--- commons-validator-1.5.0-src/src/main/java/org/apache/commons/validator/ValidatorResources.java 2015-11-19 00:52:35.000000000 +0100
++++ commons-validator-1.5.0-src/src/main/java/org/apache/commons/validator/ValidatorResources.java 2018-12-21 11:08:21.128060468 +0100
+@@ -19,6 +19,7 @@
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.io.Serializable;
++import java.net.URISyntaxException;
+ import java.net.URL;
+ import java.util.Collections;
+ import java.util.Iterator;
+@@ -235,7 +236,11 @@
+ Digester digester = initDigester();
+ for (int i = 0; i < urls.length; i++) {
+ digester.push(this);
+- digester.parse(urls[i]);
++ try {
++ digester.parse(urls[i].toURI().toString());
++ } catch (URISyntaxException e) {
++ throw new IOException(e);
++ }
+ }
+
+ this.process();
diff --git a/commons-validator-1.5.0-src.tar.gz b/commons-validator-1.5.0-src.tar.gz
new file mode 100644
index 0000000..864ad9a
--- /dev/null
+++ b/commons-validator-1.5.0-src.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:be3f7c43f7d4ca9c9db19ae964994ec565c640bf946977730e509395ed0310e1
+size 261413
diff --git a/commons-validator-1.5.0-srcencoding.patch b/commons-validator-1.5.0-srcencoding.patch
new file mode 100644
index 0000000..2a1ac11
--- /dev/null
+++ b/commons-validator-1.5.0-srcencoding.patch
@@ -0,0 +1,51 @@
+--- commons-validator-1.5.0-src/build.xml 2015-11-19 00:52:34.000000000 +0100
++++ commons-validator-1.5.0-src/build.xml 2018-12-21 10:48:58.650031637 +0100
+@@ -209,6 +209,7 @@
+ description="Compile shareable components">
+
+-
++ classpathref="compile.classpath"/>
+
+
+
+@@ -312,6 +315,9 @@
+ description="Compile unit test cases">
+
+@@ -394,6 +400,9 @@
+ description="Compile example application">
+