guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/04: gnu: Add java-slf4j-nop.


From: guix-commits
Subject: 03/04: gnu: Add java-slf4j-nop.
Date: Wed, 14 Sep 2022 04:35:25 -0400 (EDT)

cbaines pushed a commit to branch master
in repository guix.

commit 8349fce0ee37469313dec40e61642af3f9a77792
Author: Artyom V. Poptsov <poptsov.artyom@gmail.com>
AuthorDate: Fri Sep 9 19:49:56 2022 +0300

    gnu: Add java-slf4j-nop.
    
    * gnu/packages/java.scm (java-slf4j-nop): New variable.
    
    Signed-off-by: Christopher Baines <mail@cbaines.net>
---
 gnu/packages/java.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 0ad7af67dd..91a729b7ad 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -8168,6 +8168,38 @@ all events to System.err.  Only messages of level INFO 
and higher are
 printed.")
     (license license:expat)))
 
+(define-public java-slf4j-nop
+  (package
+    (name "java-slf4j-nop")
+    (version "1.7.25")
+    (source (package-source java-slf4j-api))
+    (build-system ant-build-system)
+    (arguments
+     `(#:jar-name "slf4j-nop.jar"
+       #:source-dir "slf4j-nop/src/main"
+       #:test-dir "slf4j-nop/src/test"
+       #:phases (modify-phases %standard-phases
+                  ;; The tests need some test classes from slf4j-api
+                  (add-before 'check 'build-slf4j-api-test-helpers
+                    (lambda _
+                      ;; Add current dir to CLASSPATH ...
+                      (setenv "CLASSPATH"
+                              (string-append (getcwd) ":"
+                                             (getenv "CLASSPATH")))
+                      ;; ... and build test helper classes here:
+                      (apply invoke
+                             `("javac" "-d" "."
+                               ,@(find-files "slf4j-api/src/test" 
".*\\.java")))))
+                  (replace 'install
+                    (install-from-pom "slf4j-nop/pom.xml")))))
+    (propagated-inputs (list java-slf4j-api))
+    (native-inputs (list java-junit java-hamcrest-core))
+    (home-page "https://www.slf4j.org/";)
+    (synopsis "SLF4J binding that silently discards all logging messages")
+    (description "Binding/provider for NOP, an implementation that silently
+discards all logging messages.")
+    (license license:expat)))
+
 (define-public antlr2
   (package
     (name "antlr2")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]