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

From: Ricardo Wurmus <[email-masked]>
Date: Wed, 18 Oct 2017 22:36:59 +0200

Hi Julien,

> From: Julien Lepiller <[email-masked]>
>
> * gnu/packages/java.scm (java-tomcat): New variable.

Impressive!

> +    (build-system ant-build-system)
> +    (inputs
> +     `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))

Note to self: we still need to fix the ant-build-system to install a
file containing plain-text references to all inputs to prevent them from
being garbage collected.

> +    (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") ""))

Could you add a comment here to explain why this is needed?

> +             (with-output-to-file "build.properties"
> +               (lambda _
> +                 (display
> +                   (string-append "base.path=" (getcwd)
> "/downloads\n"))))))

I prefer using the make-flags here to set the base.path property.  Have
you tried that?

> +    (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.")

“Open source”, eh? :)  Please just write “[…] is an implementation of
the […]”.  The second sentence is a bit odd.  I don’t think that’s
information that belongs in a package description.

Thanks!

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net