gnu: java-tomcat: Build the full Tomcat package.
Currently java-tomcat uses the "package" build-target. In that way, it is built like a library, with only the jar files. This commit will change the build-target to "deploy" in order to build the full tomcat package. * gnu/packages/web.scm (java-tomcat)[source]: Remove bat-files in snippet. [inputs]: Remove java-eclipse-jdt-core, add java-commons-daemon, java-ecj. [native-inputs]: Remove. [arguments]: Use "deploy" build-target, add phases 'modify-deploy, 'symlink-commons-daemon, 'symlink-java-ecj, change 'install phase.master
parent
bc3497a573
commit
39775121c4
|
@ -5718,14 +5718,14 @@ encoder/decoder based on the draft-12 specification for UBJSON.")
|
||||||
(snippet
|
(snippet
|
||||||
'(begin
|
'(begin
|
||||||
(for-each delete-file (find-files "." "\\.jar$"))
|
(for-each delete-file (find-files "." "\\.jar$"))
|
||||||
|
(for-each delete-file (find-files "." "\\.bat$"))
|
||||||
#t))))
|
#t))))
|
||||||
(build-system ant-build-system)
|
(build-system ant-build-system)
|
||||||
(inputs
|
(inputs
|
||||||
`(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
|
`(("java-commons-daemon" ,java-commons-daemon)
|
||||||
(native-inputs
|
("java-ecj" ,java-ecj)))
|
||||||
`(("java-junit" ,java-junit)))
|
|
||||||
(arguments
|
(arguments
|
||||||
`(#:build-target "package"
|
`(#:build-target "deploy"
|
||||||
#:tests? #f; requires downloading some files.
|
#:tests? #f; requires downloading some files.
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
|
@ -5748,6 +5748,34 @@ encoder/decoder based on the draft-12 specification for UBJSON.")
|
||||||
(("<filter token=\"VERSION_BUILT\" value=.*")
|
(("<filter token=\"VERSION_BUILT\" value=.*")
|
||||||
"<filter token=\"VERSION_BUILT\" value=\"Jan 1 1970 00:00:00 UTC\"/>"))
|
"<filter token=\"VERSION_BUILT\" value=\"Jan 1 1970 00:00:00 UTC\"/>"))
|
||||||
#t))
|
#t))
|
||||||
|
(add-after 'unpack 'modify-deploy
|
||||||
|
(lambda _
|
||||||
|
;; The Tomcat build downloads and copies these files to the
|
||||||
|
;; bin and lib directory.
|
||||||
|
;; We instead symlink to the input (see below).
|
||||||
|
(substitute* "build.xml"
|
||||||
|
(("<copy tofile=\"\\$\\{tomcat.build\\}/bin/commons-daemon.jar.*") "")
|
||||||
|
(("<copy file=\"\\$\\{jdt.jar\\}\" todir=\"\\$\\{tomcat.build\\}/lib\"/>")
|
||||||
|
""))
|
||||||
|
#t))
|
||||||
|
(add-after 'install 'symlink-commons-daemon
|
||||||
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
|
(let* ((commons-daemon (assoc-ref inputs "java-commons-daemon"))
|
||||||
|
(files (find-files commons-daemon "commons-daemon-.*\\.jar"))
|
||||||
|
(daemon-jar (car files))
|
||||||
|
(out-bin (string-append (assoc-ref outputs "out") "/bin"))
|
||||||
|
(target (string-append out-bin "/commons-daemon.jar")))
|
||||||
|
(symlink daemon-jar target)
|
||||||
|
#t)))
|
||||||
|
(add-after 'install 'symlink-java-ecj
|
||||||
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
|
(let* ((java-ecj (assoc-ref inputs "java-ecj"))
|
||||||
|
(files (find-files java-ecj "ecj.*\\.jar"))
|
||||||
|
(java-ecj-jar (car files))
|
||||||
|
(out-lib (string-append (assoc-ref outputs "out") "/lib"))
|
||||||
|
(target (string-append out-lib "/java-ecj.jar")))
|
||||||
|
(symlink java-ecj-jar target)
|
||||||
|
#t)))
|
||||||
(add-after 'unpack 'generate-properties
|
(add-after 'unpack 'generate-properties
|
||||||
(lambda _
|
(lambda _
|
||||||
;; This could have been passed to make-flags, but getcwd returns
|
;; This could have been passed to make-flags, but getcwd returns
|
||||||
|
@ -5758,7 +5786,10 @@ encoder/decoder based on the draft-12 specification for UBJSON.")
|
||||||
(string-append "base.path=" (getcwd) "/downloads\n"))))
|
(string-append "base.path=" (getcwd) "/downloads\n"))))
|
||||||
#t))
|
#t))
|
||||||
(replace 'install
|
(replace 'install
|
||||||
(install-jars "output/build/lib")))))
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
|
(let ((out (assoc-ref outputs "out")))
|
||||||
|
(copy-recursively "output/build" out))
|
||||||
|
#t)))))
|
||||||
(home-page "https://tomcat.apache.org")
|
(home-page "https://tomcat.apache.org")
|
||||||
(synopsis "Java Servlet, JavaServer Pages, Java Expression Language and Java
|
(synopsis "Java Servlet, JavaServer Pages, Java Expression Language and Java
|
||||||
WebSocket")
|
WebSocket")
|
||||||
|
|
Reference in New Issue