Subject: [PATCH 02/24] gnu: Add java-tomcat.

From: [email-masked]
Date: Sun, 15 Oct 2017 00:23:27 +0200

From: Julien Lepiller <[email-masked]>

* gnu/packages/java.scm (java-tomcat): New variable.
---
 gnu/packages/java.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index a36db179a..4561b92d8 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -6058,3 +6058,46 @@ significant digits in the value recording, and provides control over value
 quantization behavior across the value range and the subsequent value resolution
 at any given level.")
     (license license:bsd-2)))
+
+(define-public java-tomcat
+  (package
+    (name "java-tomcat")
+    (version "8.5.23")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://apache/tomcat/tomcat-8/v"
+                                  version "/src/apache-tomcat-" version "-src.tar.gz"))
+              (sha256
+               (base32
+                "1m6b1dikib46kbgz9gf0p6svi00nsw62b9kgjzn6sda151skbbza"))))
+    (build-system ant-build-system)
+    (inputs
+     `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
+    (native-inputs
+     `(("java-junit" ,java-junit)))
+    (arguments
+     `(#:build-target "package"
+       #:tests? #f; requires downloading some files.
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'properties
+           (lambda _
+             (mkdir "downloads")
+             (substitute* "build.xml"
+               (("download-compile,") "")
+               (("depends=\"validate\"") "depends=\"build-prepare\"")
+               ((",download-validate") ""))
+             (with-output-to-file "build.properties"
+               (lambda _
+                 (display
+                   (string-append "base.path=" (getcwd) "/downloads\n"))))))
+         (replace 'install
+           (install-jars "output/build/lib")))))
+    (home-page "https://tomcat.apache.org")
+    (synopsis "Java Servlet, JavaServer Pages, Java Expression Language and Java
+WebSocket")
+    (description "Apache Tomcat is an open source implementation of the Java
+Servlet, JavaServer Pages, Java Expression Language and Java WebSocket
+technologies.  The Java Servlet, JavaServer Pages, Java Expression Language and
+Java WebSocket specifications are developed under the Java Community Process.")
+    (license license:asl2.0)))
-- 
2.14.2