From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8jZv-0005Ri-4t for guix-patches@gnu.org; Thu, 11 May 2017 04:36:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8jZq-0007WQ-8C for guix-patches@gnu.org; Thu, 11 May 2017 04:36:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:34947) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d8jZp-0007W5-Tn for guix-patches@gnu.org; Thu, 11 May 2017 04:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d8jZp-0005Jy-P8 for guix-patches@gnu.org; Thu, 11 May 2017 04:36:01 -0400 Subject: bug#26803: [PATCH 33/36] gnu: Add java-commons-httpclient. Resent-Message-ID: References: <20170506153617.3074-1-rekado@elephly.net> <20170506153617.3074-33-rekado@elephly.net> From: Roel Janssen In-reply-to: <20170506153617.3074-33-rekado@elephly.net> Date: Thu, 11 May 2017 10:35:34 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain 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: Ricardo Wurmus Cc: 26803@debbugs.gnu.org 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