1
0
2018-12-21 13:57:14 +00:00
committed by Git OBS Bridge
parent 5dc104cbd0
commit 5b3516fbb9
3 changed files with 84 additions and 6 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Dec 21 13:56:05 UTC 2018 - Fridrich Strba <fstrba@suse.com>
- Update to 1.5.0
- Install the maven pom file
-------------------------------------------------------------------
Tue May 15 13:22:32 UTC 2018 - fstrba@suse.com

View File

@@ -23,10 +23,11 @@ Release: 0
Summary: Apache Commons Validator
License: Apache-2.0
Group: Development/Libraries/Java
Url: http://commons.apache.org/commons/
URL: http://commons.apache.org/commons/
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
Patch2: commons-validator-1.5.0-locale.patch
BuildRequires: ant
BuildRequires: ant-junit
BuildRequires: apache-commons-beanutils
@@ -35,6 +36,7 @@ BuildRequires: apache-commons-logging
BuildRequires: fdupes
BuildRequires: jakarta-commons-digester
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local
BuildRequires: junit
BuildRequires: oro
Requires: apache-commons-beanutils >= 1.5
@@ -82,6 +84,7 @@ 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
@@ -104,7 +107,6 @@ ant \
-Dskip.download=true -Dbuild.sysclasspath=first \
dist
%if 0
%check
export CLASSPATH=$(build-classpath \
commons-collections \
@@ -118,7 +120,6 @@ ant -v \
-Dant.build.javac.source=8 -Dant.build.javac.target=8 \
-Dskip.download=true -Dbuild.sysclasspath=first \
test
%endif
%install
# jars
@@ -135,11 +136,12 @@ cp -pr dist/docs/api*/* %{buildroot}%{_javadocdir}/%{name}/
%fdupes -s %{buildroot}%{_javadocdir}/%{name}/
%files -f .mfiles
%doc LICENSE.txt NOTICE.txt RELEASE-NOTES.txt
%license LICENSE.txt
%doc NOTICE.txt RELEASE-NOTES.txt
%{_javadir}/%{short_name}.jar
%files javadoc
%doc LICENSE.txt
%{_javadocdir}/%{name}
%license LICENSE.txt
%doc %{_javadocdir}/%{name}
%changelog

View File

@@ -0,0 +1,70 @@
--- 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 14:54:10.838397098 +0100
@@ -109,6 +109,23 @@
<!-- Download lib dir -->
<property name="download.lib.dir" value="lib"/>
+<!-- ========== Test Java Version ========================================= -->
+
+ <condition property="isJava9">
+ <not>
+ <or>
+ <equals arg1="${ant.java.version}" arg2="1.1"/>
+ <equals arg1="${ant.java.version}" arg2="1.2"/>
+ <equals arg1="${ant.java.version}" arg2="1.3"/>
+ <equals arg1="${ant.java.version}" arg2="1.4"/>
+ <equals arg1="${ant.java.version}" arg2="1.5"/>
+ <equals arg1="${ant.java.version}" arg2="1.6"/>
+ <equals arg1="${ant.java.version}" arg2="1.7"/>
+ <equals arg1="${ant.java.version}" arg2="1.8"/>
+ </or>
+ </not>
+ </condition>
+
<!-- ========== Compiler Defaults ========================================= -->
@@ -323,7 +340,7 @@
</target>
- <target name="test" depends="compile.tests,test.main,test.checkdigit,test.routines"
+ <target name="test" depends="compile.tests,test.main,test.checkdigit,test.routines,test.routines.java9"
description="Run all unit test cases">
</target>
@@ -364,7 +381,25 @@
</target>
<target name="test.routines" depends="compile.tests"
- description="Run routines unit test cases">
+ description="Run routines unit test cases" unless="isJava9">
+ <echo message="Running routines tests ..."/>
+
+ <junit fork="yes" forkmode="once" printsummary="yes"
+ haltonfailure="${test.failonerror}"
+ failureproperty="main.test.failed" showoutput="true">
+ <classpath refid="test.classpath"/>
+ <formatter type="plain"/>
+ <batchtest todir="${test.results.dir}">
+ <fileset dir="${test.home}/java">
+ <include name="org/apache/commons/validator/routines/*Test.java" />
+ <exclude name="**/Abstract*Test.java" />
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+ <target name="test.routines.java9" depends="compile.tests"
+ description="Run routines unit test cases with Java 9+" if="isJava9">
<echo message="Running routines tests ..."/>
<junit fork="yes" forkmode="once" printsummary="yes"
@@ -372,6 +407,7 @@
failureproperty="main.test.failed" showoutput="true">
<classpath refid="test.classpath"/>
<formatter type="plain"/>
+ <sysproperty key="java.locale.providers" value="COMPAT,SPI"/>
<batchtest todir="${test.results.dir}">
<fileset dir="${test.home}/java">
<include name="org/apache/commons/validator/routines/*Test.java" />