From: "Björn Höfling" <bjoern.hoefling@bjoernhoefling.de>
To: 35570@debbugs.gnu.org
Subject: [bug#35570] [PATCH 7/8] gnu: java-tomcat: Build the full Tomcat package.
Date: Sun, 5 May 2019 00:42:06 +0200 [thread overview]
Message-ID: <20190505004206.23197eea@alma-ubu> (raw)
In-Reply-To: <20190505003450.3bc9058a@alma-ubu>
[-- Attachment #1: Type: text/plain, Size: 4067 bytes --]
Currently java-tomcat uses the deploy build target. In that way, it is
built like a library, with only the jar files. This commit will change
the arget to deploy 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.
---
gnu/packages/web.scm | 40 +++++++++++++++++++++++++++++++++++-----
1 file changed, 35 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 3d9070f169..cb9af0a781 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -5552,14 +5552,14 @@ encoder/decoder based on the draft-12
specification for UBJSON.") (snippet
'(begin
(for-each delete-file (find-files "." "\\.jar$"))
+ (for-each delete-file (find-files "." "\\.bat$"))
#t))))
(build-system ant-build-system)
(inputs
- `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
- (native-inputs
- `(("java-junit" ,java-junit)))
+ `(("java-commons-daemon" ,java-commons-daemon)
+ ("java-ecj" ,java-ecj)))
(arguments
- `(#:build-target "package"
+ `(#:build-target "deploy"
#:tests? #f; requires downloading some files.
#:phases
(modify-phases %standard-phases
@@ -5582,6 +5582,33 @@ encoder/decoder based on the draft-12
specification for UBJSON.") (("<filter token=\"VERSION_BUILT\"
value=.*") "<filter token=\"VERSION_BUILT\" value=\"Jan 1 1970 00:00:00
UTC\"/>")) #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
(lambda _
;; This could have been passed to make-flags, but getcwd
returns @@ -5592,7 +5619,10 @@ encoder/decoder based on the draft-12
specification for UBJSON.") (string-append "base.path=" (getcwd)
"/downloads\n")))) #t))
(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")
(synopsis "Java Servlet, JavaServer Pages, Java Expression
Language and Java WebSocket")
--
2.21.0
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2019-05-04 22:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-04 22:34 [bug#35570] java-tomcat: Make it the full package Björn Höfling
2019-05-04 22:37 ` [bug#35570] [PATCH 1/8] gnu: ant-build-system: Don't override symlinks Björn Höfling
2019-05-04 22:37 ` [bug#35570] [PATCH 2/8] gnu: java-javaee-servletapi: Don't use unstable tarball Björn Höfling
2019-05-04 22:38 ` [bug#35570] [PATCH 3/8] gnu: java-javaee-servletapi: Add properties-files to jar Björn Höfling
2019-05-04 22:39 ` [bug#35570] [PATCH 4/8] gnu: Remove dependencies on java-tomcat, use servlet API Björn Höfling
2019-05-04 22:41 ` [bug#35570] [PATCH 5/8] gnu: java-commons-daemon: Update to 1.1.0 Björn Höfling
2019-05-04 22:41 ` [bug#35570] [PATCH 6/8] gnu: Add java-ecj in version 4.6.3 Björn Höfling
2019-05-04 22:42 ` Björn Höfling [this message]
2019-05-04 22:42 ` [bug#35570] [PATCH 8/8] gnu: java-tomcat: Update to 8.5.40 Björn Höfling
2019-10-13 20:58 ` bug#35570: java-tomcat: Make it the full package Björn Höfling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190505004206.23197eea@alma-ubu \
--to=bjoern.hoefling@bjoernhoefling.de \
--cc=35570@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).