For pratical reasons, now I maintain this project under a new repository.
This is a Maven Archetype project, to create Maven project that produce command line packages.
You can easily generate a new project (ie, Maven module) from a Bash-compatible shell, by typing something like:
curl -L TODO | sh -s sampleGroupId sample-cli 1.0-SNAPSHOT
where, of course, the three parameters are the new artifact's coordinates.
This generates a new basic CLI project, which includes:
-
an entry point class, which contains a
main()
implementation that parses the command line arguments by means of the picocli library. Examples showing how to define possible options and parse them with this library is shown. -
A unit test for the entry point, which you can customise according to your needs.
-
Definitions based on the Maven Assembly plug-in to put a distribution zip together. This includes a Bash launching script (Windows not available yet). The
zip-deploy.sh
script helps you to deploy the distro zip to some target directory. -
You can read more about this project on this blog post.