[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#26803: [PATCH 33/36] gnu: Add java-commons-httpclient.
From: |
Roel Janssen |
Subject: |
bug#26803: [PATCH 33/36] gnu: Add java-commons-httpclient. |
Date: |
Thu, 11 May 2017 10:35:34 +0200 |
User-agent: |
mu4e 0.9.18; emacs 25.2.1 |
Ricardo Wurmus writes:
> * gnu/packages/java.scm (java-commons-httpclient): New variable.
> ---
> gnu/packages/java.scm | 55
> +++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 55 insertions(+)
>
> diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
> index 4bc03e5ca..1639570f9 100644
> --- a/gnu/packages/java.scm
> +++ b/gnu/packages/java.scm
> @@ -2164,6 +2164,61 @@ standards and recommendations.")
> ("java-junit" ,java-junit)
> ("java-hamcrest-core" ,java-hamcrest-core)))))
>
> +(define-public java-commons-httpclient
> + (package
> + (name "java-commons-httpclient")
> + (version "3.1")
> + (source (origin
> + (method url-fetch)
> + (uri (string-append "mirror://apache/"
> + "httpcomponents/commons-httpclient/source/"
> + "commons-httpclient-" version
> "-src.tar.gz"))
> + (sha256
> + (base32
> + "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
> + (build-system ant-build-system)
> + (arguments
> + `(#:make-flags
> + (let ((junit (assoc-ref %build-inputs "java-junit"))
> + (codec (assoc-ref %build-inputs "java-commons-codec"))
> + (logging (assoc-ref %build-inputs
> "java-commons-logging-minimal")))
> + (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
> + (string-append "-Dcommons-codec.jar=" codec
> + "/share/java/commons-codec.jar")
> + (string-append "-Dcommons-logging.jar=" logging
> + "/share/java/commons-logging-minimal.jar")))
> + #:build-target "dist"
> + #:test-target "test"
> + #:phases
> + (modify-phases %standard-phases
> + (add-after 'unpack 'fix-utf8-problems
> + (lambda _
> + ;; These files contain invalid characters.
> + (with-fluids ((%default-port-encoding "ISO-8859-1"))
> + (substitute* '("src/examples/ClientApp.java"
> + "src/examples/TrivialApp.java"
> +
> "src/test/org/apache/commons/httpclient/TestHttps.java"
> +
> "src/test/org/apache/commons/httpclient/TestURIUtil2.java"
> + "src/java/org/apache/commons/httpclient/\
> +HttpContentTooLargeException.java")
> + (("Ortwin Gl.") "Ortwin Glue"))
> + (substitute*
> "src/test/org/apache/commons/httpclient/TestURIUtil2.java"
> + (("\xe4") "")
> + (("%C3%A4") "")))
> + #t))
> + (replace 'install (install-jars "dist")))))
> + (inputs
> + `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
> + ("java-commons-codec" ,java-commons-codec)
> + ("java-junit" ,java-junit)))
> + (home-page "http://hc.apache.org/httpclient-3.x/")
> + (synopsis "Deprecated HTTP client library for Java")
Now that sound wonderful.. ;)
> + (description "The Commons HttpClient project is now end of life, and is
> +no longer being developed. It has been replaced by the Apache HttpComponents
> +project in its HttpClient and HttpCore modules, which offer better
> performance
> +and more flexibility.")
> + (license license:asl2.0)))
> +
> (define-public java-commons-cli
> (package
> (name "java-commons-cli")
I guess we need it for some dependency. Is it possible to use the
java-httpcomponents-httpclient for these?
If we really need this package, then the recipe looks good to me, but I
think it'be better to not need an already deprecated version of
something that does networking stuff.
Kind regards,
Roel Janssen
- bug#26803: [PATCH 28/36] gnu: Add java-httpcomponents-httpcore., (continued)
bug#26803: [PATCH 30/36] gnu: Add java-httpcomponents-httpcore-ab., Ricardo Wurmus, 2017/05/06
bug#26803: [PATCH 33/36] gnu: Add java-commons-httpclient., Ricardo Wurmus, 2017/05/06
bug#26803: [PATCH 32/36] gnu: Add java-httpcomponents-httpmime., Ricardo Wurmus, 2017/05/06
bug#26803: [PATCH 34/36] gnu: Add java-commons-net., Ricardo Wurmus, 2017/05/06
bug#26803: [PATCH 36/36] gnu: Add java-commons-compress., Ricardo Wurmus, 2017/05/06
bug#26803: [PATCH 31/36] gnu: Add java-httpcomponents-httpclient., Ricardo Wurmus, 2017/05/06