Fix build with jdk9
OBS-URL: https://build.opensuse.org/package/show/Java:packages/jdom?expand=0&rev=23
This commit is contained in:
parent
7cfcad0982
commit
8babe3baa6
@ -6,8 +6,8 @@
|
||||
<property name="compile.optimize" value="true" />
|
||||
- <property name="compile.target" value="1.2" />
|
||||
- <property name="compile.source" value="1.2" />
|
||||
+ <property name="compile.target" value="1.5" />
|
||||
+ <property name="compile.source" value="1.5" />
|
||||
+ <property name="compile.target" value="1.6" />
|
||||
+ <property name="compile.source" value="1.6" />
|
||||
<property name="compile.deprecation" value="true" />
|
||||
|
||||
<property name="src.dir" value="./src/java"/>
|
||||
@ -19,3 +19,60 @@
|
||||
|
||||
<fileset dir="${jaxen.lib.dir}">
|
||||
<include name="jaxen-*.jar"/>
|
||||
--- XOM/build.xml
|
||||
+++ XOM/build.xml
|
||||
@@ -201,8 +201,8 @@
|
||||
debug="${debug}"
|
||||
optimize="${optimize}"
|
||||
deprecation="${deprecation}"
|
||||
- target="1.2"
|
||||
- source="1.3"
|
||||
+ target="1.6"
|
||||
+ source="1.6"
|
||||
encoding="UTF-8"
|
||||
excludes="nu/xom/pantry/* nu/xom/tools/* nu/xom/samples/*Servlet.java">
|
||||
<classpath refid="compile.class.path"/>
|
||||
@@ -228,8 +228,8 @@
|
||||
debug="${debug}"
|
||||
optimize="${optimize}"
|
||||
deprecation="${deprecation}"
|
||||
- target="1.2"
|
||||
- source="1.3"
|
||||
+ target="1.6"
|
||||
+ source="1.6"
|
||||
encoding="UTF-8">
|
||||
<classpath refid="compile.class.path"/>
|
||||
<include name="nu/xom/samples/*Servlet.java" />
|
||||
@@ -244,8 +244,8 @@
|
||||
debug="${debug}"
|
||||
optimize="${optimize}"
|
||||
deprecation="${deprecation}"
|
||||
- target="1.2"
|
||||
- source="1.3"
|
||||
+ target="1.6"
|
||||
+ source="1.6"
|
||||
encoding="UTF-8"
|
||||
failonerror="false">
|
||||
<classpath refid="compile.class.path"/>
|
||||
@@ -462,8 +462,8 @@
|
||||
debug="${debug}"
|
||||
optimize="${optimize}"
|
||||
deprecation="${deprecation}"
|
||||
- target="1.2"
|
||||
- source="1.3"
|
||||
+ target="1.6"
|
||||
+ source="1.6"
|
||||
encoding="UTF-8"
|
||||
includes="nu/xom/tools/*">
|
||||
<classpath>
|
||||
@@ -705,8 +705,8 @@
|
||||
debug="${debug}"
|
||||
optimize="${optimize}"
|
||||
deprecation="${deprecation}"
|
||||
- target="1.2"
|
||||
- source="1.3"
|
||||
+ target="1.6"
|
||||
+ source="1.6"
|
||||
encoding="UTF-8"
|
||||
includeAntRuntime="no"
|
||||
excludes="org/jaxen/dom/**
|
||||
|
21
jdom.spec
21
jdom.spec
@ -56,22 +56,17 @@ Patch1: include-glibj.jar.patch
|
||||
Patch2: jdom-1.1-xom-get-jaxen.patch
|
||||
BuildRequires: ant
|
||||
BuildRequires: ant-junit
|
||||
BuildRequires: java-1_5_0-gcj-compat-devel
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: junit
|
||||
BuildRequires: relaxngDatatype
|
||||
BuildRequires: servletapi5
|
||||
BuildRequires: tagsoup
|
||||
BuildRequires: unzip
|
||||
BuildRequires: xalan-j2
|
||||
BuildRequires: xerces-j2
|
||||
#!BuildIgnore: java-1_6_0-openjdk
|
||||
#!BuildIgnore: java-1_6_0-openjdk-devel
|
||||
#!BuildIgnore: java-1_7_0-openjdk
|
||||
#!BuildIgnore: java-1_7_0-openjdk-devel
|
||||
#!BuildIgnore: java-1_8_0-openjdk
|
||||
#!BuildIgnore: java-1_8_0-openjdk-devel
|
||||
#!BuildIgnore: java-9-openjdk
|
||||
#!BuildIgnore: java-9-openjdk-devel
|
||||
BuildRequires: xpp2
|
||||
BuildRequires: xpp3
|
||||
BuildArch: noarch
|
||||
BuildConflicts: java-devel >= 1.9
|
||||
|
||||
%description
|
||||
JDOM is, quite simply, a Java representation of an XML document. JDOM
|
||||
@ -162,11 +157,11 @@ find . -name "*.jar" -delete -name "*.class" -delete
|
||||
%patch2
|
||||
|
||||
%build
|
||||
export JAVA_OPTS="-source 1.5 -target 1.5 -J-Xss4m"
|
||||
export JAVA_OPTS="-source 1.6 -target 1.6 -encoding UTF-8 -J-Xss4m"
|
||||
export JAVAC="javac ${JAVA_OPTS} "
|
||||
export ANT_OPTS="-Xss4m"
|
||||
i=0
|
||||
export CLASSPATH="%{stage1_build_dir}:$(build-classpath $LIBGCJ xerces-j2 xalan-j2 xalan-j2-serializer junit servletapi5):%{jaxen_dir}/src/java/main/:%{jdom_dir}/src/java/:%{saxpath_dir}/src/java/main/:%{xom_dir}/src/:%{dom4j_dir}/src/java"
|
||||
export CLASSPATH="%{stage1_build_dir}:$(build-classpath $LIBGCJ xerces-j2 xalan-j2 xalan-j2-serializer junit relaxngDatatype servletapi5 tagsoup xpp2 xpp3):%{jaxen_dir}/src/java/main/:%{jdom_dir}/src/java/:%{saxpath_dir}/src/java/main/:%{xom_dir}/src/:%{dom4j_dir}/src/java"
|
||||
SOURCE_DIRS="%{jaxen_dir}/src/java/main/ %{jdom_dir}/src/java/ %{saxpath_dir}/src/java/main/ %{xom_dir}/src/ %{dom4j_dir}/src/java"
|
||||
MAX=$(find ${SOURCE_DIRS} -iname "*.java" | wc -l)
|
||||
for file in $(find ${SOURCE_DIRS} -name "*.java")
|
||||
@ -182,7 +177,7 @@ ant -Dparser.jar=$(build-classpath xerces-j2) \
|
||||
-Dxml-apis.jar=$(build-classpath xml-commons-apis) \
|
||||
-Dglibj.jar=$(build-classpath glibj) \
|
||||
-Djaxen.lib.dir=%{stage1_build_dir} \
|
||||
-Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 \
|
||||
-Dant.build.javac.source=1.6 -Dant.build.javac.target=1.6 \
|
||||
package
|
||||
mv build/jdom.jar %{_builddir}/jdom-%{jdom_version}.jar
|
||||
popd
|
||||
|
Loading…
x
Reference in New Issue
Block a user