gnu: java-hamcrest-library: Fix race condition.
authorJulien Lepiller <julien@lepiller.eu>
Sat, 18 Jul 2020 11:24:12 +0000 (13:24 +0200)
committerJulien Lepiller <julien@lepiller.eu>
Sat, 18 Jul 2020 11:28:11 +0000 (13:28 +0200)
* gnu/packages/java.scm (java-hamcrest-library)[arguments]: Fix
build.xml in the same way it is fixed in java-hamcrest-all to prevent a
race condition.

gnu/packages/java.scm

index d42b537..424c24b 100644 (file)
@@ -3796,6 +3796,13 @@ testing frameworks, mocking libraries and UI validation rules.")
       ((#:build-target _) "library")
       ((#:phases phases)
        `(modify-phases ,phases
+          (add-after 'unpack 'patch-classpath-for-integration
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "build.xml"
+                (("build/hamcrest-core-\\$\\{version\\}\\.jar")
+                 (car (find-files (assoc-ref inputs "java-hamcrest-core")
+                                  "jar$"))))
+              #t))
           (replace 'create-pom
             (lambda _
              (substitute* "pom/hamcrest-library.pom"