Skip to content



Repository files navigation

The Command Line Archetype

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 "$create_cli_url" | 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 script helps you to deploy the distro zip to some target directory.

  • You can read more about this project on this blog post.

Note: the script mentioned above creates a new project based on the latest (usually snapshot) version of the archetype POM. Change the script manually if you want to use another version.


Allows you to define a project that produces the binary for a command-line based application, using the Assembly plug-in.






No packages published


  • Java 52.5%
  • Shell 47.5%