guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/04: gnu: Add java-xmlunit-matchers.


From: guix-commits
Subject: 02/04: gnu: Add java-xmlunit-matchers.
Date: Sat, 1 Dec 2018 17:56:49 -0500 (EST)

roptat pushed a commit to branch master
in repository guix.

commit f5cc5ead58543d9e56647fd1426109154278bf4e
Author: Julien Lepiller <address@hidden>
Date:   Sat Dec 1 22:28:36 2018 +0100

    gnu: Add java-xmlunit-matchers.
    
    * gnu/packages/java.scm (java-xmlunit-matchers): New variable.
---
 gnu/packages/java.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 0c7b9a9..d5bd111 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -9670,6 +9670,37 @@ against expected outcomes.")
     (native-inputs
      `(("java-mockito-1" ,java-mockito-1)))))
 
+(define-public java-xmlunit-matchers
+  (package
+    (inherit java-xmlunit)
+    (name "java-xmlunit-matchers")
+    (arguments
+     `(#:jar-name "java-xmlunit-matchers.jar"
+       #:source-dir "xmlunit-matchers/src/main/java"
+       #:test-dir "xmlunit-matchers/src/test"
+       #:test-exclude
+       ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
+       (list "**/ValidationMatcherTest.java")
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'copy-test-class
+           (lambda _
+             (copy-file 
"xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
+                        
"xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
+             #t))
+         (add-before 'build 'fix-test-resources-path
+           (lambda _
+             (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
+               (("../test-resources") "test-resources"))
+             #t))
+         (add-before 'check 'copy-test-resources
+           (lambda* (#:key inputs #:allow-other-keys)
+             (copy-recursively (assoc-ref inputs "resources") "test-resources")
+             #t)))))
+    (inputs
+     `(("java-xmlunit" ,java-xmlunit)
+       ("java-junit" ,java-junit)))))
+
 (define-public java-openchart2
   (package
     (name "java-openchart2")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]