Skip to content

RyanSkraba/docopt4s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

147 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docopt4s - A scala library for using docopt

Java CI with Maven

Using docopt4s

You can import the library into your project from maven central:

<dependency>
  <groupId>com.tinfoiled</groupId>
  <artifactId>docopt4s_2.13</artifactId>
  <version>0.0.7</version>
</dependency>

Building

# Build, format and run all tests
mvn spotless:apply clean verify

# Using the uber jar from the command line
alias docopt_go="java -jar $(find ~+ -name find ~+ -name docopt4s-testkit*.jar | sort | head -n1 | sort | head -n1)"
skrync_go --help

The project comes with an example CLI in the testkit module, which you can run:

# From inside the root directory
__cwd=$PWD
function ExampleGo() {
  mvn -q -f $__cwd/testkit/pom.xml exec:java \
    -Dexec.classpathScope=test \
    -Dexec.mainClass=com.tinfoiled.docopt4s.testkit.example.ExampleGo -Dexec.args="$*"
}

# Now you can run the examples in the example CLI
ExampleGo naval_fate ship NOSTRADAMUS move 10 20 --speed=23

About

Descriptive CLI argument parser

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages