From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uL0vD3uN62KbiAAAbAwnHQ (envelope-from ) for ; Thu, 04 Aug 2022 11:12:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id IHvdDnuN62KtbwAAauVa8A (envelope-from ) for ; Thu, 04 Aug 2022 11:12:27 +0200 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 992F42CD1E for ; Thu, 4 Aug 2022 11:12:26 +0200 (CEST) Received: from localhost ([::1]:56934 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJWu1-0000iv-NZ for larch@yhetil.org; Thu, 04 Aug 2022 05:12:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJWte-0000iR-Hu for guix-patches@gnu.org; Thu, 04 Aug 2022 05:12:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33208) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJWte-0003GS-95 for guix-patches@gnu.org; Thu, 04 Aug 2022 05:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oJWte-0002Sy-48 for guix-patches@gnu.org; Thu, 04 Aug 2022 05:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56054] [PATCH] gnu: Add maven-shared-invoker Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 04 Aug 2022 09:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56054 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Julien Lepiller Cc: "Artyom V. Poptsov" , 56054@debbugs.gnu.org Received: via spool by 56054-submit@debbugs.gnu.org id=B56054.16596043199472 (code B ref 56054); Thu, 04 Aug 2022 09:12:02 +0000 Received: (at 56054) by debbugs.gnu.org; 4 Aug 2022 09:11:59 +0000 Received: from localhost ([127.0.0.1]:51190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJWta-0002Sh-MW for submit@debbugs.gnu.org; Thu, 04 Aug 2022 05:11:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47442) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJWtZ-0002SV-4O for 56054@debbugs.gnu.org; Thu, 04 Aug 2022 05:11:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36946) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJWtT-0003FT-Tg; Thu, 04 Aug 2022 05:11:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=LjuxC7enGm9xXXJN1Sv0Vb3PVwhaA2Z55T49XNdjNBw=; b=Do7YyoZHSm9j7eZ3GTt8 va1ZLfdauKYmceI9gBPyPE7HL1Gvz9mQy531mOXf/dF1bk/YLkvT1zhmwKJorGMDgF6OpvF4yXc1S G6/LcLgc6V9FUXI7GI+YCJDh9zrhCMvoYaI5k7IdmxcmaHFcgiO5c1kGcjGEs87RQ5/Yjcgafrz1t WU41tVbHjYOhSQ7uyIlzER6R5yY+IimyMDIrd87KmzRnC4dhK+YPeVFxWAol/0CkrAufYzPVjjRuf tdaL0juz2wpZLYc4cfEgBY8IXnC2I1VRp6Q2bjt6PWddbvg7Anbd0ZdO4cP6UucvqwBlnNPgZZGvm woKqykdqR3LwAg==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=35156 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJWtT-0001O4-Cl; Thu, 04 Aug 2022 05:11:51 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87a6aavx17.fsf@gmail.com> <20220618215647.4e25fd30@sybil.lepiller.eu> Date: Thu, 04 Aug 2022 11:11:49 +0200 In-Reply-To: <20220618215647.4e25fd30@sybil.lepiller.eu> (Julien Lepiller's message of "Sat, 18 Jun 2022 21:56:51 +0200") Message-ID: <87y1w4nzje.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1659604347; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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=LjuxC7enGm9xXXJN1Sv0Vb3PVwhaA2Z55T49XNdjNBw=; b=enDWxWtVC/QZY7CZgqSYoy9TwuTdEXWbMnQEKaRXdghvrsQx5KAkP9ntReXV5OPXk3HgdF dhbIv5800eZts7CbirwIkJzE8ouYJVpIiMFe12P9ULJ8ajbcb6/lGRKhxoYuNVlJhLANsy 1ndH7eWO6GcseudmKkTJNXXTiHFfRQF1aPXBnoPyd4racjSc2qTRBRHIIYy2GDYghqv9kl LrUO0vECH9ENZKM+LA00FNeT5DRfyAS6YmrDp4vDfurdNcVng+eONKjjj2ED/TYW/+LI1p J1O71qU9T1rD/CQ7ewi/Plp1zqfMbAMDI0Gc03nbQOUAszobuqFQQaTnp1cHjg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659604347; a=rsa-sha256; cv=none; b=HmcSmXgPHhWQfg1iAYbAKJuPQuLIxQbAs7Kw8eCbYiLSFQ/Oz/972pz9jXsRL5shgCmbyS L/b9MAyGLYA9d6ZIQiWFQYXtA7BlcUJqMXy4m1zxExNNwHdQkSXMFn/ObprZqUOD+RA/VO R8+QoVY3uEb61mFdSZF8i4RpDu3XJTp1gc+OHMTReoPfDyzMYbti4P93zaX5agT+OejCJ6 AkGf7HTzLINtnAwxQ/WRo4iICqqrUijlQkqO4Lbto6T3lR9PAmwKD3ATh5mTxzjfBCqrxi irIP5Koe3Hon1HBvbMFPEYXBuVjGg3SHiNqid0q22s1FD7loPfGLxuwvSKJGbg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Do7YyoZH; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Do7YyoZH; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 992F42CD1E X-Spam-Score: -2.31 X-Migadu-Scanner: scn1.migadu.com X-TUID: gRJ3FyRtq0Us Hey Artyom, Did you have a chance to look at Julien=E2=80=99s comments below? Thanks, Ludo=E2=80=99. Julien Lepiller skribis: > Thanks for the patch! It's mostly good, but I have some comments below > :) > > Le Sat, 18 Jun 2022 17:58:12 +0300, > "Artyom V. Poptsov" a =C3=A9crit : > >> +(define-public maven-shared-invoker >> + (package >> + (name "maven-shared-invoker") >> + (version "3.2.0") >> + (source (origin >> + (method url-fetch) >> + (uri (string-append "mirror://apache/maven/shared/" >> + "maven-invoker-" version >> "-source-release.zip")) >> + (sha256 >> + (base32 >> + >> "0yhgxvwpmyfhqaksdfmj9c4ml4pj60gnin8bq1a92ximf1dyyjyc")) >> + (patches >> + (search-patches >> + "maven-shared-invoker-exception-handler-fix.patch" >> + "maven-shared-invoker-rename-test-classes.patch")))) >> + (build-system ant-build-system) >> + (arguments >> + `(#:jar-name "maven-shared-invoker.jar" >> + #:source-dir "src/main/java" >> + #:tests? #f)) ; Tests require Maven >> itself > > How so? Tests are usually just junit tests and it's easy to run them. > How are they so different from the usual tests? > > If it really requires maven, have you tried building it with the > maven-build-system? There's a way to remove plugins from the pom file, > so maven doesn't complain. The pom file doesn't look too complex, so I > think it could work. > >> + (propagated-inputs >> + (list maven-parent-pom-35)) > > Yes you should propagate the parent, but that's only because maven > needs it when it reads this package's pom file. So, please keep it and > install this package from its pom file, like the others :) > >> + (native-inputs >> + (list unzip >> + maven-surefire-plugin >> + java-javax-inject >> + java-junit)) > > I'm surprised here you need maven-surefire-plugin. What is it used for > exactly? From my understanding it can't be called outside of maven, and > we don't use maven to install this package. > > The pom file lists java-javax-inject as a normal dependency, so it > should be propagated instead. The pom file also lists > maven-shared-utils. Is it needed? If so please add it to the propagated > inputs, otherwise fix the pom file (with a patch to upstream I=C2=A0guess= ). > >> + (home-page >> "https://maven.apache.org/shared/maven-invoker/index.html") >> + (synopsis "Invoke Maven programmatically") > >> Sep 17 00:00:00 2001 +From: "Artyom V. Poptsov" >> +Date: Tue, 14 Jun 2022 23:53:13 +0300 >> +Subject: [PATCH 1/2] MavenCommandLineBuilder: Fix exception handling >> + >> +* >> src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.ja= va >> + (setGoals): Catch 'Exception' instead of 'CommandLineException' as >> + 'CommandLineException' is never thrown in the "try" block. >> +--- >> + .../apache/maven/shared/invoker/MavenCommandLineBuilder.java | 2 >> +- >> + 1 file changed, 1 insertion(+), 1 deletion(-) >> + >> +diff --git > > This looks like a simple patch, but I don't understand why it's needed. > Is this a fix from upstream? Did you create it? For what reason? > >> @@ -0,0 +1,126 @@ +From 4bce3183b25c44ab406c2f4d8541a0a520b15a3d Mon >> Sep 17 00:00:00 2001 +From: "Artyom V. Poptsov" >> +Date: Wed, 15 Jun 2022 07:09:29 +0300 >> +Subject: [PATCH 2/2] test: Rename some classes to avoid name >> conflicts + >> +* > > I'm lost. What's happening in this patch? Why do you need it > (especially since you couldn't run the tests anyway)? Is this a problem > with upstream, or some issue you encountered because of what Guix is > doing?