gnu: java-hamcrest-all: Build with icedtea-8.

* gnu/packages/java.scm (java-hamcrest-all)[arguments]: Build with icedtea-8;
do not disable tests.
[inputs]: Remove java-hamcrest-core.
This commit is contained in:
Ricardo Wurmus 2018-03-11 20:02:10 +01:00
parent fb94174fc3
commit bfc007e13e
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -3886,39 +3886,30 @@ (define-public java-hamcrest-all
(package (inherit java-hamcrest-core) (package (inherit java-hamcrest-core)
(name "java-hamcrest-all") (name "java-hamcrest-all")
(arguments (arguments
(substitute-keyword-arguments (package-arguments java-hamcrest-core) `(#:jdk ,icedtea-8
;; FIXME: a unit test fails because org.hamcrest.SelfDescribing is not ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
;; found, although it is part of the hamcrest-core library that has ((#:build-target _) "bigjar")
;; just been built. ((#:phases phases)
;; `(modify-phases ,phases
;; Fixing this one test is insufficient, though, and upstream confirmed ;; Some build targets override the classpath, so we need to patch
;; that the latest hamcrest release fails its unit tests when built ;; the build.xml to ensure that required dependencies are on the
;; with Java 7. See https://github.com/hamcrest/JavaHamcrest/issues/30 ;; classpath.
((#:tests? _) #f) (add-after 'unpack 'patch-classpath-for-integration
((#:build-target _) "bigjar") (lambda* (#:key inputs #:allow-other-keys)
((#:phases phases) (substitute* "build.xml"
`(modify-phases ,phases ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
;; Some build targets override the classpath, so we need to patch (string-join
;; the build.xml to ensure that required dependencies are on the (cons line
;; classpath. (append
(add-after 'unpack 'patch-classpath-for-integration (find-files (assoc-ref inputs "java-junit") "\\.jar$")
(lambda* (#:key inputs #:allow-other-keys) (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
(substitute* "build.xml" (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
((" build/hamcrest-library-\\$\\{version\\}.jar" line) ";")))
(string-join #t)))))))
(cons line
(append
(find-files (assoc-ref inputs "java-hamcrest-core") "\\.jar$")
(find-files (assoc-ref inputs "java-junit") "\\.jar$")
(find-files (assoc-ref inputs "java-jmock") "\\.jar$")
(find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
";")))
#t))))))
(inputs (inputs
`(("java-junit" ,java-junit) `(("java-junit" ,java-junit)
("java-jmock" ,java-jmock-1) ("java-jmock" ,java-jmock-1)
("java-easymock" ,java-easymock) ("java-easymock" ,java-easymock)
("java-hamcrest-core" ,java-hamcrest-core)
,@(package-inputs java-hamcrest-core))))) ,@(package-inputs java-hamcrest-core)))))
(define-public java-jopt-simple (define-public java-jopt-simple