diff mbox series

[bug#35570,3/8] gnu: java-javaee-servletapi: Addproperties-files to jar.

Message ID 20190505003823.453451b5@alma-ubu
State Accepted
Headers show
Series [bug#35570,1/8] gnu: ant-build-system: Don't overridesymlinks. | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed

Commit Message

Björn Höfling May 4, 2019, 10:38 p.m. UTC
* gnu/packages/java.scm (jav-javaee-servletapi)[arguments]: Add phase
'copy-resources' to copy properties-files.
---
 gnu/packages/java.scm | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index f92b3d5e89..9b635699f6 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2851,7 +2851,25 @@  API and version 2.1 of the Java ServerPages
API.") `(#:jar-name "javax-servletapi.jar"
        ;; no tests
        #:tests? #f
-       #:source-dir "src/main/java"))
+       #:source-dir "src/main/java"
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'copy-resources
+           (lambda _
+             (mkdir-p "build/classes/javax/servlet/http")
+             (let ((from-prefix "src/main/java/javax/servlet/")
+                   (to-prefix "build/classes/javax/servlet/"))
+               (for-each (lambda (f)
+                           (copy-file (string-append from-prefix f)
+                                      (string-append to-prefix f)))
+                         (list "LocalStrings_ja.properties"
+                               "LocalStrings.properties"
+                               "LocalStrings_fr.properties"
+                               "http/LocalStrings_es.properties"
+                               "http/LocalStrings_ja.properties"
+                               "http/LocalStrings.properties"
+                               "http/LocalStrings_fr.properties")))
+               #t)))))
     (native-inputs
      `(("unzip" ,unzip)))
     (home-page "https://javaee.github.io/servlet-spec/")