I need to create an interactive commandline application in Java and/or Groovy to orchestrate a very customized build and deployment process.
My current vision would be that the result should somehow feel like using a maven archetype: There will be a “wizard-like” workflow that prompts the user for input at several stages. Typically not all user-inputs are provided when starting the application (i.e: The user provides a subversion-url, then the applications queries subversion for all available tags and displays them to the user and prompts the user to choose a tag for building…)
Are there any Java/Groovy libraries to support building such a commandline application?
So far I have found JCommander and Groovy CliBuilder. But they seem not to be a help when it comes to “wizard-like” commandline applications, that query for user input at several points during runtime.
Any pointers would be appreciated…
There is a java package jLine which is used behind the scenes by groovysh. It supports custom tab-completion, saveable command history, and command line editing.
The best example of using it’s features that I can find is here, but there might be better examples elsewhere.
Hope this is what you were after?