From a7c42863279275ec55bd0f18a3212c20caf1e55f61236bac1c872e785f4275a4 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Fri, 15 Sep 2017 09:20:52 +0000 Subject: [PATCH] Fix build with jdk9 OBS-URL: https://build.opensuse.org/package/show/Java:packages/avalon-logkit?expand=0&rev=23 --- avalon-logkit.changes | 6 ++++++ avalon-logkit.spec | 15 +++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/avalon-logkit.changes b/avalon-logkit.changes index f276ff3..f7990a7 100644 --- a/avalon-logkit.changes +++ b/avalon-logkit.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Sep 15 09:20:19 UTC 2017 - fstrba@suse.com + +- Fix build with jdk9 by specifying java source and target 1.6 +- Clean spec file + ------------------------------------------------------------------- Sun May 21 08:08:29 UTC 2017 - tchvatal@suse.com diff --git a/avalon-logkit.spec b/avalon-logkit.spec index 73807d5..170a10f 100644 --- a/avalon-logkit.spec +++ b/avalon-logkit.spec @@ -37,6 +37,7 @@ Patch3: fix-java7-compile.patch BuildRequires: ant BuildRequires: ant-junit BuildRequires: avalon-framework >= 4.1.4 +BuildRequires: java-devel >= 1.6 BuildRequires: javamail BuildRequires: javapackages-local BuildRequires: javapackages-tools @@ -74,19 +75,19 @@ cp %{SOURCE1} pom.xml find . -name "*.jar" -exec rm -f {} \; %build -export CLASSPATH=%(build-classpath \ +ant clean +mkdir -p target/lib +build-jar-repository -s -p target/lib \ log4j \ javamail/mailapi \ jms_api \ tomcat-servlet-api \ - jdbc-stdext \ avalon-framework \ junit \ - ):$PWD/build/classes -ant -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 \ - -Dencoding=ISO-8859-1 -Dnoget=true clean jar javadoc \ - -lib %{_datadir}/java +ant -Dant.build.javac.source=1.6 -Dant.build.javac.target=1.6 \ + -Dencoding=ISO-8859-1 -Dnoget=true -lib %{_datadir}/java \ + jar javadoc %install # jars @@ -103,14 +104,12 @@ install -d -m 755 %{buildroot}%{_javadocdir}/%{name} cp -pr dist/docs/api/* %{buildroot}%{_javadocdir}/%{name} %files -%defattr(0644,root,root,0755) %doc LICENSE.txt NOTICE.txt %{_javadir}/* %{_datadir}/maven-metadata/%{name}.xml %{_mavenpomdir}/JPP-%{name}.pom %files javadoc -%defattr(0644,root,root,0755) %doc LICENSE.txt %{_javadocdir}/*