Petals CLI

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (4)

View Page History
The return code of the wrapping command is the return code of the system command.

h1. Logging in Petals CLI
h1. Advanced usage

h2. Logging in Petals CLI

Petals CLI is provided with a default Java Logging configuration. This configuration displays logging trace as following:
{code}
The default configuration can be overridden using the system property '{{java.util.logging.config.file}}' to set into the launching script '{{$PETALS_CLI_HOME/bin/petals-cli.sh}}' or '{{%PETALS_CLI_HOME%\bin\petals-cli.bat}}'. An sample configuration is available in file '{{$PETALS_CLI_HOME/conf/petals-cli-logging-sample.properties}}'

h2. To add your custom command

Petals CLI is provided with an API to add your own command.

h3. Writing your command

To create a new custom command, just create a new Java class that *IMPLEMENTS* the interface {{org.ow2.petals.cli.api.command.Command}}.

If the new command needs third party products in addition of the ones already provided by Petals CLI, they *MUST* be installed with your command.
{warning}No classloader isolation is available between commands, pay attention to versions of third-party products. They MUST match the version of those provided with Petals CLI or those custom commands.{warning}

h3. Custom command installation

To install your command just put all needed JAR files in the directory {{$PETALS_CLI_HOME/extensions}}.

h1. Known Problems