Xuse User Guide: Commands
This section describes the commands that are available in Xuse - these commands are applicable for all version of Xuse - i.e. Java standalone version and the Maven 2 plugin.
Command reference
The following table shows how to form the different base commands for Xuse stand-alone as well as xuse with Maven 2. If you are not normally a Maven user it is recommended that you run use Xuse standalone.
Type | Base command | Example |
---|---|---|
Standalone | xuse | xuse.sh <command> |
xuse | xuse.sh html |
Maven 2.x | mvn net.sourceforge.xuse:maven-xuse-m2-plugin:<command> |
mvn net.sourceforge.xuse:maven-xuse-m2-plugin:html |
The following tables summarises the commands available and their applicability to different flavours of Xuse.
Standard commands
The following list are the most widely used Xuse commands.
Command | Since | Description | Stand-alone | Maven 2.x |
---|---|---|---|---|
new-project |
00.02.00 | Creates a new project from a template in the directory where the command is run. Don't run this command in an existing project as it may overwrite files. | ||
xuse |
00.01.00 | Builds all the project documentation. | ||
html |
00.03.00 | Builds the HTML documentation. | ||
documents-html |
00.03.00 | Builds the HTML documentation for vision documents and SRSes. | ||
pdf-use-case <use-case-id> |
00.03.00 | Creates a PDF version of the use-case (note replace <use-case-id> with the use-case reference e.g. UC1 ). For maven users see guide below on how to pass parameters. |
||
pdf-use-cases |
00.03.00 | Creates a PDF version of the all the use-cases. |
Import / Export commands
The following commands show what data import and export facilities are available in Xuse.
Command | Since | Description | Stand-alone | Maven 2.x |
---|---|---|---|---|
import-trace-report |
00.03.00 | Import a trace-report allowing traceability of requirements to other artefacts - e.g. Java classes. | ||
import-requirements |
00.03.00 | Import a requirements from other data sources - currently supports CSV import. | ||
export-requirements |
00.03.00 | Export requirements into a CSV file format. | ||
import-glossary |
01.00.00 | Import a glossary terms from other data sources - currently supports CSV import. | ||
export-glossary |
01.00.00 | Exports the project glossary to other formats - will initially support CSV export. |
Theme editing commands
The following table shows commands that are applicable when editing or installing themes.
Command | Since | Description | Stand-alone | Maven 2.x |
---|---|---|---|---|
new-theme-project <theme-name> |
01.00.00 | Sets up a special project for Xuse theme editing. The command clones theme files from the xuse-standard theme and creates the directory structure for a new theme editing project. The <theme-name> argument should be replaced by your first theme name e.g. my-first-theme . For maven users see guide below on how to pass parameters. |
||
new-theme <theme-name> |
01.00.00 | Creates a new theme for editing within a theme editing project. The command clones theme files from the xuse-standard theme and adds them to the current theme editing project structure. The <theme-name> argument should be replaced by your new theme name e.g. my-second-theme . For maven users see guide below on how to pass parameters. |
||
install-theme <theme-name> |
01.00.00 | Installs the selected theme so that it can be used by all Xuse projects on the local system. The command installs the theme files in the Xuse working folder location. The command works on a local theme directory (designed to work in a theme editing project) or against a theme distributed as a zip file. The <theme-name> argument should be replaced by name of the theme you want to install e.g. corporate-theme . For maven users see guide below on how to pass parameters. |
||
create-theme-distro <theme-name> |
01.00.00 | Creates a zip file distribution of a XUse theme. The command zips the theme files in the local theme editing project directory. The <theme-name> argument should be replaced by name of the theme you want to create a distribution for e.g. corporate-theme . For maven users see guide below on how to pass parameters. |
Miscellaneous commands
Command | Since | Description | Stand-alone | Maven 2.x |
---|---|---|---|---|
validate |
00.03.00 | Runs the validation routine for standalone validation of the project without any publication. | ||
upgrade |
00.02.00 | Runs a tool that updates project files from a previous version to the current version of the model. Should only be run if project files have been backed up. Note: Tooling is not yet built for model version 0.2, 0.3 to 1.0 upgrade. | ||
version (maven) -v (command line) |
01.00.00 | Displays the Xuse version. |
Passing parameters in Maven
Unfortunately Maven does not readily allow command line parameters to be passed to the xuse plugin. Consequently you will have to add the following to your pom.xml to use Xuse goals that require an argument.
<build>
<plugins>
<plugin>
<groupId>net.sourceforge.xuse</groupId>
<artifactId>maven-xuse-m2-plugin</artifactId>
<configuration>
<!-- Name of the new theme: used in conjunction with
the "new-theme" and "new-theme-project" goals -->
<newThemeName>new-theme-name</newThemeName>
<!-- Name of the theme: used in conjunction with the
"install-theme" and "create-theme-disto" goals -->
<themeName>theme-name</themeName>
<!-- Use case identifier - used in conjunction
with the "pdf-use-case" goal -->
<useCaseId>UC3</useCaseId>
</configuration>
</plugin>
</plugins>
</build>