From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6NrrAAFntWA9PAAAgWs5BA (envelope-from ) for ; Tue, 01 Jun 2021 00:45:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id UIbJNwBntWAKfQAAB5/wlQ (envelope-from ) for ; Mon, 31 May 2021 22:45:20 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 742B627966 for ; Tue, 1 Jun 2021 00:45:20 +0200 (CEST) Received: from localhost ([::1]:50928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnqet-0006ed-E4 for larch@yhetil.org; Mon, 31 May 2021 18:45:19 -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 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1622501120; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=+8bhr8dGgSDKqCTwp7vZGc09u+9La5oQhPoCIqIaEAo=; b=Sk1f1H9B3ngSvLO5YUk6QbnfxN9jxHeM5LU851MpavWc5lm474wNP4Sa9ZW1DB8/GewEx6 NrXGPiv0PbfymgS0m2uFxMjPtN61KkI3fCO/nR4A9YOqY/ZKccEpBmgs9U6GblgSXQar/I d92htrkSmhTg9PoQmMXJ+Ck7Uyhl+QbGPbFdJg45de5uSvxahaul6bNphurhT9wjqBsP6/ RhRU1JGA6CGgBw6vPhyARg9Bpofu3F2o9EnPl4SFX5aCo3gq4DV+WSez+Hp7zRN9kl5WZ9 cjWpBQ5XPXYkaNXl39zB+i5LLbBx1OBWKWaQ5yYNvnxXPgAvSaMH8a008riwqw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622501120; a=rsa-sha256; cv=none; b=TlYelJ/xxcXP1k4IIszsZq0K353Jifh4vnVQ9yg6qwzb0gSgb+iEIEEWURlelvRbptKjyt 2Cl80H7EdYo4pAm2Gm+rM8TgAdL7799ShIIq/FtSJZo1KLbS1M6gPRYmTaF3q6JWdG3ykF t7qL9egw+SzMwFdNCd/M9ak02wbkwwYzcSCBg9nK6pVCGhQewBYqJthxNKZUFnhSaAw1oJ iJckgJs4JsQDgAN8nJNMHwY6JW0tMh+l2EiVPUPJx0vG5fAK9d6M5K14uFobzcRZSxnxci oSdZOVPlBv8MbmkHjvjiAxjeBIYPeKkPo3UWSolhEID9lpcLv3hUPwh8JNQFWg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lepiller.eu header.s=dkim header.b=LWHnCWqb; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 3.67 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lepiller.eu header.s=dkim header.b=LWHnCWqb; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 742B627966 X-Spam-Score: 3.67 X-Migadu-Scanner: scn0.migadu.com X-TUID: txPkqpi/dmBL * 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 ('() '()) -- 2.31.1