GitHub - purcell/jargs: GNU getopt-style command-line argument parser for Java, used in JBoss (original) (raw)

JArgs command-line argument parsing library

All rights reserved.

Released under the terms of the BSD licence. See the file LICENCE for details.

Prerequisites

For each prerequisite, the version with which JArgs has been tested is given in parentheses. Any version equal to or later than this should work.

To build JArgs and run its tests you need on of

Moreover JUnit (4.3.1), by Eric Gamma, is used to run the unit tests, but is not needed to run the library itself.

Installation

To compile, package, and test the code, run either

or

mvn clean package source:jar javadoc:jar jar:test-jar

Two jars are created, one called target/jargs-$VERSION$.jar, which contains the runtime library, and one called target/jargs-$VERSION$-tests.jar, which contains the unit tests and the examples. The Javadoc APIs are created intarget/site/apidocs.

To use the library with your own code, simply ensure thattarget/jargs-$VERSION$.jar is on the CLASSPATH.

Pre-built packages are available via Sonatype's OSS Snapshots maven repository. Ensure you have the oss-public repository enabled in yourpom.xml:

sonatype-oss-public https://oss.sonatype.org/content/groups/public/ true true

Then add JArgs to your dependencies list tag:

com.sanityinc jargs 2.0-SNAPSHOT

Documentation

The main documentation is the detailed worked example insrc/examples/java/com/sanityinc/jargs/examples/OptionTest.java, plus the generated API documentation in target/site/apidocs.

Package contents


💝 Support this project and my other Open Source work

💼 LinkedIn profile

✍ sanityinc.com