From ff975ea3c3e26a57bd97e13f20e7b8aa380b91e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= Date: Fri, 29 Dec 2017 20:17:00 +0100 Subject: [PATCH] gnu: java-aqute-libg: Explicitly build for Java 7. * gnu/packages/java.scm (java-aqute-libg)[arguments]: Add keyword make-flags to use source and target 1.7. Co-authored-by: Chris Marusich --- gnu/packages/java.scm | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 2724f0f20..ae7e98977 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -6003,7 +6003,28 @@ it manages project dependencies, gives diffs jars, and much more.") (arguments `(#:jar-name "java-aqute-libg.jar" #:source-dir "aQute.libg/src" - #:tests? #f)); FIXME: tests are in "aQute.libg/test", not in a java directory + ;; The build fails when source/target are more recent than 1.7. This + ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327 + ;; + ;; It is closed as won't fix. There is no way to change the source so + ;; that is works on 1.8, and it still works on 1.6, the upstream + ;; target. It works fine on 1.7, however, so we use 1.7. + #:make-flags (list "-Dant.build.javac.source=1.7" + "-Dant.build.javac.target=1.7") + #:phases + (modify-phases %standard-phases + (add-before 'check 'create-java-test-dir + ;; Move the test directory into test/java, since that's where + ;; ant-build-system's default project in build.xml expects to find + ;; the test classes. + (lambda _ + (rename-file "aQute.libg/test" "aQute.libg/test.tmp") + (mkdir "aQute.libg/test") + (rename-file "aQute.libg/test.tmp" "aQute.libg/test/java")))) + #:test-dir "aQute.libg/test")) + (native-inputs + `(("hamcrest" ,java-hamcrest-core) + ("java-junit" ,java-junit))) (inputs `(("slf4j" ,java-slf4j-api) ("osgi-annot" ,java-osgi-annotation) -- 2.15.1