From patchwork Mon May 31 22:44:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Lepiller X-Patchwork-Id: 29714 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 999CA27BC78; Mon, 31 May 2021 23:45:19 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 36B5427BC81 for ; Mon, 31 May 2021 23:45:19 +0100 (BST) Received: from localhost ([::1]:50928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnqes-0006ed-AA for patchwork@mira.cbaines.net; Mon, 31 May 2021 18:45:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnqed-0006DP-OV for guix-patches@gnu.org; Mon, 31 May 2021 18:45:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51868) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lnqed-0007Tr-Gn for guix-patches@gnu.org; Mon, 31 May 2021 18:45:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lnqed-00040V-Dg for guix-patches@gnu.org; Mon, 31 May 2021 18:45:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48766] [PATCH 04/14] guix: maven: Support fixing extensions. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 May 2021 22:45:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48766 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48766@debbugs.gnu.org Received: via spool by 48766-submit@debbugs.gnu.org id=B48766.162250108815330 (code B ref 48766); Mon, 31 May 2021 22:45:03 +0000 Received: (at 48766) by debbugs.gnu.org; 31 May 2021 22:44:48 +0000 Received: from localhost ([127.0.0.1]:35170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeN-0003z6-Vm for submit@debbugs.gnu.org; Mon, 31 May 2021 18:44:48 -0400 Received: from lepiller.eu ([89.234.186.109]:38958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeH-0003xm-UA for 48766@debbugs.gnu.org; Mon, 31 May 2021 18:44:42 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id f50dd7e6 for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=dkim; bh=NIPuzvf2Ja6WklkImfi6QaEhH wOdro1G+CUVqogUohY=; b=LWHnCWqbmtglgGADkJ0pWaV7XWKtjfN0ZOeUMyBA2 5CB53dpytz18jwT7JcmoiIQTT4YWlzs6G0r5MWGqFS4+AuR2ONA9eKt6izv25LcI wUQVoc3G6WmnFLk9vyuJhMQMndOK2oRqJpBkEyPowc5QfnaXZ5nXJqUDDye8f+A1 +fd6OmHIe7Tpb/RqCJ8pydwn4W3p89ctr2LWKHPbScWqXBCWCbbCFmO/DefO+a2P p0SOTl4326AkiLgAd2aGsPtqiFzTPPW6rR5HxT+3IfT6JSUOD8zWucbZa7WxNCrm IMtJ67YcRBQSHOrUCmOjXNQOsbcMEPJbFUkFTWHGu7Eeg== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 05722e43 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:37 +0000 (UTC) From: Julien Lepiller Date: Tue, 1 Jun 2021 00:44:17 +0200 Message-Id: <20210531224427.13300-4-julien@lepiller.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531224427.13300-1-julien@lepiller.eu> References: <20210601004100.69baa2d0@tachikoma.lepiller.eu> <20210531224427.13300-1-julien@lepiller.eu> MIME-Version: 1.0 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 * guix/build/maven/pom.scm (fix-pom-dependencies): Add support for fixing extension versions. --- guix/build/maven/pom.scm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/guix/build/maven/pom.scm b/guix/build/maven/pom.scm index 8f16cf4d26..3a4ad7a216 100644 --- a/guix/build/maven/pom.scm +++ b/guix/build/maven/pom.scm @@ -374,8 +374,27 @@ Returns nothing, but overrides the @var{pom-file} as a side-effect." `((http://maven.apache.org/POM/4.0.0:plugins ,(fix-plugins plugins)) ,@(fix-build rest))) + (('http://maven.apache.org/POM/4.0.0:extensions extensions ...) + `((http://maven.apache.org/POM/4.0.0:extensions + ,(fix-extensions extensions)) + ,@(fix-build rest))) (tag (cons tag (fix-build rest))))))) + (define* (fix-extensions extensions #:optional optional?) + (match extensions + ('() '()) + ((tag rest ...) + (match tag + (('http://maven.apache.org/POM/4.0.0:extension extension ...) + (let ((group (or (pom-groupid extension) "org.apache.maven.plugins")) + (artifact (pom-artifactid extension))) + (if (member artifact (or (assoc-ref excludes group) '())) + (fix-extensions rest optional?) + `((http://maven.apache.org/POM/4.0.0:extension + ,(fix-plugin extension optional?)); extensions are similar to plugins + ,@(fix-extensions rest optional?))))) + (tag (cons tag (fix-extensions rest optional?))))))) + (define fix-management (match-lambda ('() '())