Hello community,

here is the log from the commit of package apache-commons-validator for 
openSUSE:Factory checked in at 2017-10-09 19:47:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/apache-commons-validator (Old)
 and      /work/SRC/openSUSE:Factory/.apache-commons-validator.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "apache-commons-validator"

Mon Oct  9 19:47:28 2017 rev:5 rq:532716 version:1.3.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/apache-commons-validator/apache-commons-validator.changes
        2017-09-23 21:34:57.856097461 +0200
+++ 
/work/SRC/openSUSE:Factory/.apache-commons-validator.new/apache-commons-validator.changes
   2017-10-09 19:48:50.973926764 +0200
@@ -1,0 +2,12 @@
+Mon Oct  9 10:31:46 UTC 2017 - [email protected]
+
+- Fix build and running of junit tests with Java 9+
+- Added patch:
+  * commons-validator-1.3.1-locale.patch
+    + Made two different test.routines target, one with java <= 1.8
+      and one with java 9+, since the locale providers changed
+      between java 1.8 and 9. Moreover, the options that Java 9
+      needs to run in compatibility mode break build with lower
+      versions of Java.
+
+-------------------------------------------------------------------

New:
----
  commons-validator-1.3.1-locale.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ apache-commons-validator.spec ++++++
--- /var/tmp/diff_new_pack.bBCVfL/_old  2017-10-09 19:48:51.725893715 +0200
+++ /var/tmp/diff_new_pack.bBCVfL/_new  2017-10-09 19:48:51.733893363 +0200
@@ -28,10 +28,12 @@
 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
 BuildRequires:  ant
 BuildRequires:  apache-commons-beanutils
 BuildRequires:  apache-commons-collections
 BuildRequires:  apache-commons-logging
+BuildRequires:  fdupes
 BuildRequires:  jakarta-commons-digester
 BuildRequires:  java-devel
 BuildRequires:  junit
@@ -46,7 +48,6 @@
 Provides:       jakarta-%{short_name} = %{version}-%{release}
 Obsoletes:      jakarta-%{short_name} < %{version}-%{release}
 BuildArch:      noarch
-BuildConflicts: java-devel >= 1.9
 %if 0%{?suse_version} == 1110
 BuildRequires:  ant-apache-oro
 Requires:       ant-apache-oro
@@ -82,6 +83,7 @@
 %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
@@ -99,7 +101,6 @@
                    commons-beanutils \
                    junit \
                    jakarta-oro )
-
 ant \
     -Dcompile.source=1.6 -Dcompile.target=1.6 \
     -Dskip.download=true -Dbuild.sysclasspath=first \
@@ -115,6 +116,7 @@
                    jakarta-oro )
 ant \
     -Dcompile.source=1.6 -Dcompile.target=1.6 \
+    -Dant.build.javac.source=1.6 -Dant.build.javac.target=1.6 \
     -Dskip.download=true -Dbuild.sysclasspath=first \
     test
 
@@ -128,6 +130,7 @@
 # javadoc
 install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
 cp -pr dist/docs/api*/* %{buildroot}%{_javadocdir}/%{name}/
+%fdupes -s %{buildroot}%{_javadocdir}/%{name}/
 
 %files
 %doc LICENSE.txt NOTICE.txt RELEASE-NOTES.txt

++++++ commons-validator-1.3.1-locale.patch ++++++
--- 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 @@
   <!-- 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 ========================================= -->
 
 
@@ -421,7 +438,7 @@
   </target>
 
 
-  <target name="test"  depends="compile.tests,test.main,test.routines"
+  <target name="test"  
depends="compile.tests,test.main,test.routines,test.routines.java9"
    description="Run all unit test cases">
   </target>
 
@@ -436,11 +453,22 @@
   </target>
 
   <target name="test.routines"  depends="compile.tests"
-   description="Run routines unit test cases">
-    <echo message="Running routines tests ..."/>
+   description="Run routines unit test cases"  unless="isJava9">
+    <echo message="Running routines tests ..."/>
+    <java classname="${test.runner}" fork="yes"
+        failonerror="${test.failonerror}">
+      <arg value="org.apache.commons.validator.routines.RoutinesTestSuite"/>
+      <classpath refid="test.classpath"/>
+    </java>
+  </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 with Java 9+ ..."/>
     <java classname="${test.runner}" fork="yes"
         failonerror="${test.failonerror}">
       <arg value="org.apache.commons.validator.routines.RoutinesTestSuite"/>
+      <sysproperty key="java.locale.providers" value="COMPAT,SPI"/>
       <classpath refid="test.classpath"/>
     </java>
   </target>

Reply via email to