From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
To: 57913@debbugs.gnu.org
Subject: [bug#57913] [PATCH] gnu: Add java-argparse4j.
Date: Sun, 18 Sep 2022 20:17:30 +0300 [thread overview]
Message-ID: <87czbsob4l.fsf@gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 38 bytes --]
Hello,
this patch adds "argparse4j".
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-java-argparse4j.patch --]
[-- Type: text/x-diff, Size: 2472 bytes --]
From d4f3e93b9fd322dfc9c71d7251cdf8c8b838a6f5 Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
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
[-- Attachment #1.3: Type: text/plain, Size: 364 bytes --]
Thanks,
- Artyom
References:
1. Java port of Python's famous argparse command-line argument parser.
<https://github.com/argparse4j/argparse4j>
--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 519 bytes --]
next reply other threads:[~2022-09-18 17:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-18 17:17 Artyom V. Poptsov [this message]
2022-09-18 18:35 ` [bug#57913] [PATCH] gnu: Add java-argparse4j Julien Lepiller
2022-09-18 18:45 ` Artyom V. Poptsov
2022-09-19 13:52 ` bug#57913: " Julien Lepiller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87czbsob4l.fsf@gmail.com \
--to=poptsov.artyom@gmail.com \
--cc=57913@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.