From patchwork Tue Feb 8 09:42:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Lepiller X-Patchwork-Id: 145 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A5A7927BBEA; Tue, 8 Feb 2022 09:52:57 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D890127BBE9 for ; Tue, 8 Feb 2022 09:52:56 +0000 (GMT) Received: from localhost ([::1]:55516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHNBA-0001Qu-2K for patchwork@mira.cbaines.net; Tue, 08 Feb 2022 04:52:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHN1a-0008VX-UA for guix-patches@gnu.org; Tue, 08 Feb 2022 04:43:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51423) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nHN1a-0006tE-Kn for guix-patches@gnu.org; Tue, 08 Feb 2022 04:43:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nHN1a-0004ne-K8 for guix-patches@gnu.org; Tue, 08 Feb 2022 04:43:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53872] [PATCH] gnu: maven: Use required logger Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 08 Feb 2022 09:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53872 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53872@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164431337918439 (code B ref -1); Tue, 08 Feb 2022 09:43:02 +0000 Received: (at submit) by debbugs.gnu.org; 8 Feb 2022 09:42:59 +0000 Received: from localhost ([127.0.0.1]:45320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHN1X-0004nK-24 for submit@debbugs.gnu.org; Tue, 08 Feb 2022 04:42:59 -0500 Received: from lists.gnu.org ([209.51.188.17]:43970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHN1U-0004nC-NN for submit@debbugs.gnu.org; Tue, 08 Feb 2022 04:42:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHN1S-0008OP-RF for guix-patches@gnu.org; Tue, 08 Feb 2022 04:42:56 -0500 Received: from [2a00:5884:8208::1] (port=36150 helo=lepiller.eu) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHN1P-0006qJ-TG for guix-patches@gnu.org; Tue, 08 Feb 2022 04:42:54 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 908e38db for ; Tue, 8 Feb 2022 09:42:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:message-id:mime-version:content-type; s=dkim; bh=co0 LucUHbBfUxhFjpqYxR4Gm0ybCROeayijRhcLos0g=; b=IHWAyVA25oVrMZGDpFW xYx/4wI3St0TrrJvMPh0uazqVsmCOhB4mIa6vl7vWWSp1q2+krT97kpoepS/f48L +2NTkRMhU3YUbf5CEivS8GVxkl3iLmHIuFkCaQNEo0G+1Sms1mZYjTKSv+003CTT R5Niht7p19P4S2JWVJr/NV5ZWS4d9VX+Rv2eklzrelDNYGNqM3XP8xLjQCdQFhjD CRR4iAvv2XeOF2oARs5dIWGmSoc0xv6qo5wnn00LpoS65XxwCEgdmIG2r1MHVwZs GAmAHh3LvgcEFzgTJLUQ2n+bL7Bc/rF3nrBkQhVqgZUGWeKumtnBKZNcNoBiZft/ Nyw== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 5ffb27ee (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Tue, 8 Feb 2022 09:42:44 +0000 (UTC) Date: Tue, 8 Feb 2022 10:42:31 +0100 From: Julien Lepiller Message-ID: <20220208104231.415fc1ba@tachikoma.lepiller.eu> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:5884:8208::1 (failed) Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RDNS_NONE=0.793, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi Guix! I figured there was a small issue with our maven package. It warns that the current logger is not supported, and lists no supported logger. This is because I forgot to copy resources in maven-embedder (first patch). I also noticed I missed resources in maven-compat, so I fixed that in the second patch. Then, maven uses its own logger instead of a default one, even if it does support slf4j-simple. The third patch adds maven-slf4j-wrapper. It is essentially a fork of slf4j-simple, but the way it's written requires me to copy most of slf4j-simple's sources. The last patch switches the use of slf4j-simple to maven-slf4j-provider. I checked that java-jmh still builds properly with this change, and no warnings are shown about the logger anymore. From e7fe8f9973b32d8f6114dbf4aee3807adf2c8fb5 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: <6af76778dd0fb3436e673ee00984fb87fb72cdde.1644313064.git.julien@lepiller.eu> References: <6af76778dd0fb3436e673ee00984fb87fb72cdde.1644313064.git.julien@lepiller.eu> From: Julien Lepiller Date: Tue, 8 Feb 2022 10:32:32 +0100 Subject: [PATCH 4/4] gnu: maven: Use maven-slf4j-provider instead of slf4j-simple. Maven uses its own slf4j implementation, not the default one. The main difference is the color on the output. * gnu/packages/maven.scm (maven-wagon-http, maven-embedder, maven-compat) (maven): Replace slf4j-simple with maven-slf4j-provider. --- gnu/packages/maven.scm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm index cf07c08b8e..edf93f276b 100644 --- a/gnu/packages/maven.scm +++ b/gnu/packages/maven.scm @@ -1088,6 +1088,7 @@ (define-public maven-wagon-http ("java-plexus-cli" ,java-plexus-cli) ("maven-plugin-api" ,maven-plugin-api) ("maven-plugin-annotations" ,maven-plugin-annotations) + ("maven-slf4j-provider" ,maven-slf4j-provider) ("maven-core" ,maven-core) ("maven-model" ,maven-model) ("java-commons-cli" ,java-commons-cli) @@ -1106,7 +1107,6 @@ (define-public maven-wagon-http ("java-commons-codec" ,java-commons-codec) ("java-commons-io" ,java-commons-io) ("java-jsoup" ,java-jsoup) - ("java-slf4j-simple" ,java-slf4j-simple) ,@(package-native-inputs maven-wagon-provider-api))) (synopsis "Wagon provider that gets and puts artifacts through HTTP(S)") (description "Maven Wagon is a transport abstraction that is used in Maven's @@ -1874,6 +1874,7 @@ (define-public maven-embedder ("maven-settings" ,maven-settings) ("maven-settings-builder" ,maven-settings-builder) ("maven-shared-utils" ,maven-shared-utils) + ("maven-slf4j-provider" ,maven-slf4j-provider) ("java-plexus-classworlds" ,java-plexus-classworlds) ("java-plexus-util" ,java-plexus-utils) ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) @@ -1891,7 +1892,6 @@ (define-public maven-embedder ("java-guice" ,java-guice) ("java-javax-inject" ,java-javax-inject) ("java-slf4j-api" ,java-slf4j-api) - ("java-slf4j-simple" ,java-slf4j-simple) ("java-jsr250" ,java-jsr250))) (native-inputs `(("java-asm-8" ,java-asm-8) @@ -2122,8 +2122,8 @@ (define-public maven-compat ("java-commons-lang3" ,java-commons-lang3) ("java-aop" ,java-aopalliance) ("maven-resolver-provider" ,maven-resolver-provider) + ("maven-slf4j-provider" ,maven-slf4j-provider) ("java-slf4j-api" ,java-slf4j-api) - ("java-slf4j-simple" ,java-slf4j-simple) ,@(package-inputs java-slf4j-api))) (description "Apache Maven is a software project management and comprehension tool. This package contains Maven2 classes maintained as compatibility @@ -2161,7 +2161,8 @@ (define-public maven "maven-repository-metadata" "maven-shared-utils" "maven-resolver-api" "maven-resolver-spi" "maven-resolver-util" "maven-resolver-impl" "maven-resolver-connector-basic" "maven-resolver-provider" - "maven-resolver-transport-wagon" "maven-wagon-provider-api" + "maven-resolver-transport-wagon" "maven-slf4j-provider" + "maven-wagon-provider-api" "maven-wagon-file" "maven-wagon-http" "java-commons-logging-minimal" "java-httpcomponents-httpclient" "java-httpcomponents-httpcore" "maven-wagon-http-shared" "maven-wagon-tck-http" @@ -2171,8 +2172,7 @@ (define-public maven "java-plexus-utils" "java-plexus-interpolation" "java-plexus-sec-dispatcher" "java-plexus-cipher" "java-guava" "java-jansi" "java-jsr250" "java-cdi-api" "java-commons-cli" - "java-commons-io" "java-commons-lang3" "java-slf4j-api" - "java-slf4j-simple")))) + "java-commons-io" "java-commons-lang3" "java-slf4j-api")))) (substitute* "apache-maven/src/bin/mvn" (("cygwin=false;") (string-append @@ -2218,6 +2218,7 @@ (define-public maven maven-resolver-connector-basic maven-resolver-provider maven-resolver-transport-wagon + maven-slf4j-provider maven-wagon-provider-api maven-wagon-file maven-wagon-http @@ -2245,9 +2246,7 @@ (define-public maven java-commons-cli java-commons-io java-commons-lang3 - java-slf4j-api - ;; TODO: replace with maven-slf4j-provider - java-slf4j-simple)) + java-slf4j-api)) (propagated-inputs (list coreutils which)) (description "Apache Maven is a software project management and comprehension -- 2.34.0