From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:58508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hN3N3-0004bz-D1 for guix-patches@gnu.org; Sat, 04 May 2019 18:43:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hN3N2-0002zM-0J for guix-patches@gnu.org; Sat, 04 May 2019 18:43:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39059) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hN3N0-0002yb-CC for guix-patches@gnu.org; Sat, 04 May 2019 18:43:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hN3N0-0007ek-8m for guix-patches@gnu.org; Sat, 04 May 2019 18:43:02 -0400 Subject: [bug#35570] [PATCH 7/8] gnu: java-tomcat: Build the full Tomcat package. Resent-Message-ID: Received: from eggs.gnu.org ([209.51.188.92]:58247) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hN3M9-0004EG-1T for guix-patches@gnu.org; Sat, 04 May 2019 18:42:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hN3M7-0001d1-RM for guix-patches@gnu.org; Sat, 04 May 2019 18:42:09 -0400 Received: from m4s11.vlinux.de ([83.151.27.109]:35774 helo=bjoernhoefling.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hN3M7-0001ab-Gv for guix-patches@gnu.org; Sat, 04 May 2019 18:42:07 -0400 Received: from alma-ubu (p508AC174.dip0.t-ipconnect.de [80.138.193.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bjoernhoefling.de (Postfix) with ESMTPSA id 1426A3F85A for ; Sun, 5 May 2019 00:42:07 +0200 (CEST) Date: Sun, 5 May 2019 00:42:06 +0200 From: =?UTF-8?Q?Bj=C3=B6rn_?= =?UTF-8?Q?H=C3=B6fling?= Message-ID: <20190505004206.23197eea@alma-ubu> In-Reply-To: <20190505003450.3bc9058a@alma-ubu> References: <20190505003450.3bc9058a@alma-ubu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/vaZXz831rdGCl06j5Wjkv9g"; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 35570@debbugs.gnu.org --Sig_/vaZXz831rdGCl06j5Wjkv9g Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable 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.") (("")) #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" + (("") "")) + #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=3D" (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") --=20 2.21.0 --Sig_/vaZXz831rdGCl06j5Wjkv9g Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQQiGUP0np8nb5SZM4K/KGy2WT5f/QUCXM4VPgAKCRC/KGy2WT5f /WyUAJ40UguCCCCRxqHcN61gkRvDhWbncgCfb0OXxSrTEEDTT6IcOFEUsAEzcH0= =dVB9 -----END PGP SIGNATURE----- --Sig_/vaZXz831rdGCl06j5Wjkv9g--