-
Notifications
You must be signed in to change notification settings - Fork 8
Command Line Tool
Besides the Eclipse plugin, the tool is also usable with a command line interface (CLI), to be controlled with a rich command language. This language is described in more detail on the Batch File Usage page.
The CLI offers four modes of operation:
- an interactive mode,
- the execution of batch files on the console,
- the execution of batch files using the maven plug-in, and
- the execution of batch files in the Eclipse workspace.
Read more about these modes in the following chapters.
Download the tool's CLI JAR file com.inventage.tools.versiontiger-cli.jar
(newest release):
You may put it into an arbitrary directory. Usually, you want to keep it in the vicinity of the projects you're versioning.
To start the interactive mode, just execute the JAR without parameters:
$ java -jar com.inventage.tools.versiontiger-cli.jar
You may now enter commands according to the rules in Batch File Usage. For the help screen, just enter 'help' and press return.
Assuming you have a batch file myVersionings.versiontiger at hand (for syntax and hints see the Batch File Usage page). Execute the JAR file with your batch file as argument:
$ java -jar com.inventage.tools.versiontiger-cli.jar myVersionings.versiontiger
The operations declared in the file are subsequently executed.
Instead of downloading the jar file manually, you would better use the maven plugin.
$ mvn com.inventage.tools.versiontiger:versiontiger-maven-plugin:execute -DstatementsFile=myVersionings.versiontiger
Even simpler the call when you add com.inventage.tools.versiontiger
to mvn plugin groups in your maven settings file:
$ mvn versiontiger:execute -DstatementsFile=myVersionings.versiontiger
Note that you don't have to be located in a maven project folder to run the mvn command. Actually, the execution is faster when the current directory isn't a maven project because mvn does not have to do the dependency resolution.
If there lies a file with the extension .versiontiger in a project in the Eclipse workspace, right-clicking on it yields the entry 'Run versioning commands...'. Click on it to execute the contents of the file.