aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2017-03-03 16:14:06 +0100
committerRicardo Wurmus <rekado@elephly.net>2017-05-10 21:39:52 +0200
commit439c59da525cb3d52a52dfc02ee12d072a43a4f4 (patch)
tree8444603c1d65e432e2c56cd332fba5a139d5752b /gnu
parent91a9c65c7bae73d999ccc2288833e909ce4a0871 (diff)
downloadpatches-439c59da525cb3d52a52dfc02ee12d072a43a4f4.tar
patches-439c59da525cb3d52a52dfc02ee12d072a43a4f4.tar.gz
gnu: Add java-hamcrest-all.
* gnu/packages/java.scm (java-hamcrest-all): New variable.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/java.scm39
1 files changed, 39 insertions, 0 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index d0f552931c..c2b81556fe 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -1484,6 +1484,45 @@ The jMock library
@end itemize\n")
(license license:bsd-3)))
+(define-public java-hamcrest-all
+ (package (inherit java-hamcrest-core)
+ (name "java-hamcrest-all")
+ (arguments
+ (substitute-keyword-arguments (package-arguments java-hamcrest-core)
+ ;; FIXME: a unit test fails because org.hamcrest.SelfDescribing is not
+ ;; found, although it is part of the hamcrest-core library that has
+ ;; just been built.
+ ;;
+ ;; Fixing this one test is insufficient, though, and upstream confirmed
+ ;; that the latest hamcrest release fails its unit tests when built
+ ;; with Java 7. See https://github.com/hamcrest/JavaHamcrest/issues/30
+ ((#:tests? _) #f)
+ ((#:build-target _) "bigjar")
+ ((#:phases phases)
+ `(modify-phases ,phases
+ ;; Some build targets override the classpath, so we need to patch
+ ;; the build.xml to ensure that required dependencies are on the
+ ;; classpath.
+ (add-after 'unpack 'patch-classpath-for-integration
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "build.xml"
+ ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
+ (string-join
+ (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
+ `(("java-junit" ,java-junit)
+ ("java-jmock" ,java-jmock-1)
+ ("java-easymock" ,java-easymock)
+ ("java-hamcrest-core" ,java-hamcrest-core)
+ ,@(package-inputs java-hamcrest-core)))))
+
(define-public java-jopt-simple
(package
(name "java-jopt-simple")