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 MM+VOBQurmI6wgAAbAwnHQ (envelope-from ) for ; Sat, 18 Jun 2022 21:57:09 +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 4LRkOBQurmLgiwAAauVa8A (envelope-from ) for ; Sat, 18 Jun 2022 21:57:08 +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 A361D461D for ; Sat, 18 Jun 2022 21:57:08 +0200 (CEST) Received: from localhost ([::1]:34446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2eZ9-00010U-LA for larch@yhetil.org; Sat, 18 Jun 2022 15:57:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2eZ4-000101-FW for guix-patches@gnu.org; Sat, 18 Jun 2022 15:57:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56163) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o2eZ4-0007WK-7l for guix-patches@gnu.org; Sat, 18 Jun 2022 15:57:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o2eZ4-0001ss-2I for guix-patches@gnu.org; Sat, 18 Jun 2022 15:57:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56054] [PATCH] gnu: Add maven-shared-invoker Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 18 Jun 2022 19:57: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: "Artyom V. Poptsov" Cc: 56054@debbugs.gnu.org Received: via spool by 56054-submit@debbugs.gnu.org id=B56054.16555822197233 (code B ref 56054); Sat, 18 Jun 2022 19:57:02 +0000 Received: (at 56054) by debbugs.gnu.org; 18 Jun 2022 19:56:59 +0000 Received: from localhost ([127.0.0.1]:50060 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2eZ0-0001sb-KC for submit@debbugs.gnu.org; Sat, 18 Jun 2022 15:56:58 -0400 Received: from lepiller.eu ([89.234.186.109]:40896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2eYx-0001sP-9j for 56054@debbugs.gnu.org; Sat, 18 Jun 2022 15:56:57 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id f7bd797c; Sat, 18 Jun 2022 19:56:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=dkim; bh=wgsmT4NLQJFr G23LXgyDO9TdjAuWVy94g9Ldaaj1iBM=; b=lYPwdoVSnM2ZRwf2oKafpkb/QfCf 78GfmOuWvutuTnrLShSB8dZmXFu8hmlMAVu+G50GN8pEiBn6fVe5eh1MnIRvwNVG Kip6Txl6esdu7Ccu/8vjlSF2ftXShQEby/npv6+EYZt7/ySNtR/kaMtdN0q4tskU 7nLXQdqOgIVQ7X2EbveuifMUDkE/PJ4e/JSwX9j+UC65sp0/u2pQemv5z0ZdnE1J aJCiVNYy/L9RfI3HTs5PnUv1RwgCJTVjAUZ0fhoGzDc0XujYqqUDKq9QuKPJ90f9 J3hoDQhWPnNexpPE2sP/5y0GDfgavYiq79CvNfGEqbspzHCaRRz7n92NQg== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 1921c05a (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Sat, 18 Jun 2022 19:56:53 +0000 (UTC) Date: Sat, 18 Jun 2022 21:56:51 +0200 From: Julien Lepiller Message-ID: <20220618215647.4e25fd30@sybil.lepiller.eu> In-Reply-To: <87a6aavx17.fsf@gmail.com> References: <87a6aavx17.fsf@gmail.com> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.30; x86_64-pc-linux-gnu) 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=1655582228; 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=zGuX5y7sYBCNecSIKRHT1r+NERVDwg5eEPB+Tp7XE7c=; b=V4wqqRP4kdrHj66W6J6r0z5xyKYM1L0eK5YuiC7oP71Q1O4MsBG8d8p2XdY42KKxnl9keK q2prHyHL+oB2No+XuN03fR7Cy13F6p5H1TNqkSFXOjvPsmQjA49tPH2qh9byYsR+eZvSwO K44VEZZyP1eoqih5W+Mr9sCCQNZKdSUwpiyeNhtwEEFV3PbvULZp1OqV26h5tqeTszDbfE mrOQO0U0BOZbloDmEtel9Tlqjxdbf54iIJ008yfHSm3kx2zPAXoPsc5l1S6QFHaiMig6rX lLpVhHvJ0LedAVAy8AMTrEB2+IW+WSZ7Jg218KdPmbaRExsw2m31hnsRLvYILg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655582228; a=rsa-sha256; cv=none; b=XByeFr1A0bSOt6P4hAEZu36LPLY3OuMotaKgWEH+wKNohvfTolmdKPJ1ryHGtk3/Roz/UL ZKoXuosyR5kuhkmkqJk4J3UG7zepNZdcNjc5voH4UaS4FshEqMBD+LMUcFYPrflmiGyOwQ KpNFfZkPaO+gjuUWuoQVDbDBU4mBuBqHtpE/fI6eFony9n3lDSJq7W3eDSt4DA9Smq2NXK Hai1PorvAQOQ7UZo/+0KwmLGRCwx9aidKsdHdJaVWH9syMaPYUFyCEzqLgFk0fzPsauYhL sjxfhAXuTyNdLpO8t0xD7zCQmsU2lr8Uk0hXO4+0jmWjljUTnEsnv9/aS3/qog== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lepiller.eu header.s=dkim header.b=lYPwdoVS; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); 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: 5.71 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lepiller.eu header.s=dkim header.b=lYPwdoVS; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); 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: A361D461D X-Spam-Score: 5.71 X-Migadu-Scanner: scn0.migadu.com X-TUID: goO96oN4I3zZ 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.java > + (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?