Coder Social home page Coder Social logo

zkwlx / jargs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from purcell/jargs

0.0 0.0 0.0 100 KB

GNU getopt-style command-line argument parser for Java, used in JBoss

Home Page: http://jargs.sourceforge.net/

License: BSD 3-Clause "New" or "Revised" License

Java 100.00%

jargs's Introduction

JArgs command-line argument parsing library

  • Copyright (c) 2001-2019 Steve Purcell.
  • Copyright (c) 2002 Vidar Holen.
  • Copyright (c) 2002 Michal Ceresna.
  • Copyright (c) 2005 Ewan Mellor.
  • Copyright (c) 2010-2012 penSec.IT UG (haftungsbeschränkt).

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

  • Apache Ant (1.8.2), by The Apache Software Foundation
  • Apache Maven (3.0.4), by The Apache Software Foundation

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

ant

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 in target/site/apidocs.

To use the library with your own code, simply ensure that target/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 your pom.xml:

<repository>
  <id>sonatype-oss-public</id>
  <url>https://oss.sonatype.org/content/groups/public/</url>
  <releases>
    <enabled>true</enabled>
  </releases>
  <snapshots>
    <enabled>true</enabled>
  </snapshots>
</repository>

Then add JArgs to your dependencies list tag:

<dependency>
  <groupId>com.sanityinc</groupId>
  <artifactId>jargs</artifactId>
  <version>2.0-SNAPSHOT</version>
</dependency>

Documentation

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

Package contents

  • src/main/java/com/sanityinc/jargs -- The library itself.
  • src/examples/java/com/sanityinc/jargs/examples -- Examples showing how to use the library.
  • src/test/java/com/sanityinc/jargs -- JUnit tests.
  • target/site/apidocs -- API and other documentation.
  • target/classes -- Compiled classes, once built.
  • target/ -- JArgs jars, once built.

💝 Support this project and my other Open Source work

💼 LinkedIn profile

✍ sanityinc.com

🐦 @sanityinc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.