Saxbi Command Line Interface

The Saxbi Command Line Interface (CLI) is the primary tool for managing Artifact Repository on the Saxbi Server. It communicates directly with Saxbi Server just as the iPad application does, which means that Saxbi Server needs to be running in order to get any use out of the CLI.

The saxbi-client package contains a runnable Java JAR file, some configuration files, and some example artifacts. The runnable JAR file is similar to a normal Windows executable program except that it requires a Java JRE to be installed (Setting up a Java). You can run it simply by typing the following command:

java -jar saxbi-command-line.jar

Saxbi CLI will look for a file called connection.properties which contains a Saxbi Server URL, username, and password to connect with. This is done for convenience purposes since it's likely that you will be connecting to the server fairly often. If you choose to leave an active username and password in the file, it is very important to ensure that you are the only one with access to the file.

Assuming Saxbi Server is running and your connection.properties file is configured properly, then you should be connected to Saxbi Server. A brief status message will tell you the version of the server. There are many commands you can run. First try the list command:

list

This command will ask for a list of all the artifacts on the Saxbi Server. If this is a new deployment, there should be just one artifact: the configuration artifact. Your output should look similar to the following:

C:\Saxbi\saxbi-client-1.0.5-SNAPSHOT>java -jar saxbi-command-line.jar Loading defaults from properties file... Establishing connection with http://localhost:8080 Connected to Saxbi Server with version 1.0.5 >list Artifact ID                             Artifact Name --           configuration                            Saxbi Configuration >

You may type help to get a list of all commands. Additionally, you can type help with a command name in order to get a description of the command and the parameters it takes. For example:

>help -c add Help for [add]. Description: Add an artifact to the repository Usage: [options] Options: *    --file   File name to add --id    The artifact ID to upload as (default is the filename without                  .xml extension) >

You will use the add command quite a bit.

Managing Saxbi Server
Generally speaking, your primary task for managing Saxbi Server is actually to manage the artifacts on the server, not the "server" itself. There are numerous configuration tweaks that can be made to the server (the servlet/Winstone/Tanuki) but those will not be made with the Saxbi CLI. Here's what the Saxbi CLI allows you to do:


 * Add an artifact
 * Delete an artifact
 * Update an artifact
 * Get a list of artifacts
 * Validate an artifact
 * Describe an artifact (see its XML)

There are a few other miscellaneous commands that are understandable if you understand the artifact system. A typical scenario in which one wishes to deploy functionality to Saxbi Server might be the following:


 * Add an Authentication Provider artifact
 * Add a Connection artifact
 * Add Selector artifacts
 * Add a View artifact

Adding these artifacts (correctly created, of course) will allow users to use the Saxbi iPad application to login to Saxbi Server, see their list of views, and build them.