Subject: bug#57913: closed (Re: [bug#57913] [PATCH] gnu: Add java-argparse4j.)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 19 Sep 2022 13:53:02 +0000

Your bug report

#57913: [PATCH] gnu: Add java-argparse4j.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
57913: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57913
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#57913] [PATCH] gnu: Add java-argparse4j.
From: Julien Lepiller <[email-masked]>
To: "Artyom V. Poptsov" <[email-masked]>
Cc: [email-masked]
Date: Mon, 19 Sep 2022 15:52:49 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Le Sun, 18 Sep 2022 21:45:16 +0300,
"Artyom V. Poptsov" <[email-masked]> a écrit :

> Hello Julien,
> 
> thank you for the patch review.
> 
> > This looks good from a distance, but I'm not sure you need
> > maven-enforcer-plugin. Since you're using the ant-build-system, I
> > don't think the plugin has a chance to run?  
> 
> Good catch.  It seems that "java-argparse4j" builds fine w/o
> "maven-enforcer-plugin".  I removed this dependency and added
> "java-junit" instead as it is required for the tests.

Thanks for the patch, pushed to master as
72fe3c0a35f04a6616c17228953a20861ce9b690.

Subject: [PATCH] gnu: Add java-argparse4j.
From: "Artyom V. Poptsov" <[email-masked]>
To: [email-masked]
Date: Sun, 18 Sep 2022 20:17:30 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

this patch adds "argparse4j".
From d4f3e93b9fd322dfc9c71d7251cdf8c8b838a6f5 Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <[email-masked]>
Date: Sun, 18 Sep 2022 20:14:28 +0300
Subject: [PATCH] gnu: Add java-argparse4j.

* gnu/packages/java.scm (java-argparse4j): New variable.
---
 gnu/packages/java.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index c25a330c2a..2afc6f89ca 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -13965,6 +13965,44 @@ (define-public java-args4j
 parse command line options/arguments in your CUI application.")
     (license license:expat)))
 
+(define-public java-argparse4j
+  (package
+    (name "java-argparse4j")
+    (version "0.9.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/argparse4j/argparse4j")
+                    (commit (string-append "argparse4j-" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1i0j3zs1ln48n0g8a90vqbv6528mcswhzys6252yp0c8w1ai64fb"))))
+    (build-system ant-build-system)
+    (arguments
+     (list #:jar-name "java-argparse4j.jar"
+           #:source-dir "main/src/main/"
+           #:test-dir "main/src/test/"
+           #:jdk openjdk11
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'copy-resources
+                 (lambda _
+                   ;; XXX: argparse4j expects input files for argument parser
+                   ;; tests to be in "target" diretory.
+                   (copy-recursively "main/src/test/resources"
+                                     "target/test-classes")
+                   (copy-recursively "main/src/main/resources"
+                                     "build/classes")))
+               (replace 'install
+                 (install-from-pom "pom.xml")))))
+    (inputs (list maven-enforcer-plugin))
+    (home-page "https://argparse4j.github.io/")
+    (synopsis "Java command-line argument parser library")
+    (description "Argparse4j is a command line argument parser library for
+Java based on Python's @code{argparse} module.")
+    (license license:expat)))
+
 (define-public java-metadata-extractor
   (package
     (name "java-metadata-extractor")
-- 
2.34.1

Thanks,

- Artyom

References:
1. Java port of Python's famous argparse command-line argument parser.
   <https://github.com/argparse4j/argparse4j>

-- 
Artyom "avp" Poptsov <[email-masked]>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F