From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMYbE-0001WY-HW for guix-patches@gnu.org; Sat, 26 May 2018 08:47:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fMYbD-0006eR-Mt for guix-patches@gnu.org; Sat, 26 May 2018 08:47:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:41217) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fMYbD-0006eK-JW for guix-patches@gnu.org; Sat, 26 May 2018 08:47:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fMYbB-0007eu-Ed for guix-patches@gnu.org; Sat, 26 May 2018 08:47:07 -0400 Subject: [bug#31604] [PATCH 8/8] gnu: Add java-logback-classic. Resent-Message-ID: From: Julien Lepiller Date: Sat, 26 May 2018 14:45:50 +0200 Message-Id: <20180526124550.5136-8-julien@lepiller.eu> In-Reply-To: <20180526124550.5136-1-julien@lepiller.eu> References: <20180526144338.72814509@lepiller.eu> <20180526124550.5136-1-julien@lepiller.eu> 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: 31604@debbugs.gnu.org * gnu/packages/java.scm (java-logback-classic): New variable. --- gnu/packages/java.scm | 45 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index edfa7db8f..1efa65781 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -53,6 +53,7 @@ #:use-module (gnu packages gnuzilla) ;nss #:use-module (gnu packages ghostscript) ;lcms #:use-module (gnu packages gnome) + #:use-module (gnu packages groovy) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) #:use-module (gnu packages icu4c) @@ -10095,3 +10096,47 @@ This module lays the groundwork for the other two modules.") ;; Either epl1.0 or lgpl2.1 (license (list license:epl1.0 license:lgpl2.1)))) + +(define-public java-logback-classic + (package + (inherit java-logback-core) + (name "java-logback-classic") + (arguments + `(#:jar-name "logback-classic.jar" + #:source-dir "src/main/java" + #:test-dir "src/test" + #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix + #:jdk ,icedtea-8 + #:phases + (modify-phases %standard-phases + (add-before 'configure 'chdir + (lambda _ + (chdir "logback-classic") + #t)) + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + (mkdir-p "build/classes") + (setenv "CLASSPATH" + (string-join + (apply append (map (lambda (input) + (find-files (assoc-ref inputs input) + ".*.jar")) + '("java-logback-core" "java-slf4j-api" + "java-commons-compiler" "java-tomcat" + "groovy"))) + ":")) + (apply invoke "groovyc" "-d" "build/classes" "-j" + (find-files "src/main/" ".*\\.(groovy|java)$")) + (invoke "ant" "jar") + #t))))) + (inputs + `(("java-logback-core" ,java-logback-core) + ("java-slf4j-api" ,java-slf4j-api) + ,@(package-inputs java-logback-core))) + (native-inputs + `(("groovy" ,groovy))) + (description "Logback is intended as a successor to the popular log4j project. +This module can be assimilated to a significantly improved version of log4j. +Moreover, @code{logback-classic} natively implements the slf4j API so that you +can readily switch back and forth between logback and other logging frameworks +such as log4j or @code{java.util.logging} (JUL)."))) -- 2.17.0