Jostraca Reference

Command Line Options

Ant Attributes
Command Line Options
Configuration Settings
Glossary
Template Directives
Template Sections
Template Services
Standard Files and Folders
www.jostraca.org
info@jostraca.org

Index (most frequently used first)[ alphabetical index ]
-o   Specify folder for generated files.
-w   Work folder where CodeWriter program is placed.
-l   Interpret all command line arguments as template names.
-a   Specify arguments for the CodeWriter program.
-t   Specify a text file containing list of template names
-b   Specify backup folder.
-B   Do not make backups.
-m   Specify metadata folder.
-M   Do not store metadata.
-c   Compile the template (compile the CodeWriter program).
-C   Do not compile the template (do not compile the CodeWriter program).
-g   Generate output files (execute the CodeWriter program).
-G   Do not generate output files (do not execute the CodeWriter program).
-W   Specify writer format file.
-F   Specify additional configuration files.
-f   Specify main configuration file.
-D   Explicitly set a configuration setting.
-X   Set non-standard options.
-v   Display verbose detailed messages.
-V   Display error messages only.
-d   Dump internal settings to a file.
-h   Show template documentation, if it exists.







Command Line Options
OptionParametersDescription
-o
[ top ]
folder:
     Generated files are saved to this folder
Jostraca saves generated files to a specific output folder. This option allows you to specify the output folder. By default, the output folder is the current folder.

The CodeWriter source code and executable (if any) are also saved to and executed from the output folder. You can use the -w option to specify a work folder where these files will be saved instead. This means that the output folder will then only be used for generated files.

See: main.OutputFolder, -w.

Example:
jostraca foobar.jtm -o ../myproject/src
-w
[ top ]
folder:
    The CodeWriter program is saved to this folder
The CodeWriter source code and executable (if any) are saved to a work folder, which is specified using the -w option. If the work folder is not specified, the output folder is used as the work folder.

This option allows you to place the CodeWriter program and the generated files in separate folders.

See: main.WorkFolder, -o

Example:
jostraca foobar.jtm -o ../generated-files -w ../code-writer
-l
[ top ]
None
By default, the first command line argument to Jostraca is assumed to be the name of a template. The second and subsequent arguments are assumed to be arguments for the CodeWriter program. The arguments for the CodeWriter program are effectively arguments for the template being processed, which may require some configuration information, such as the location of XML files containing data models.

Note: if a command line option ends in .jtm then it is always assumed to be a template name (to specify arguments ending in .jtm, use the -a option explicity).

The -l option makes Jostraca assume that all command line arguments are the names of templates, unless otherwise indicated using the -a option. This allows multiple templates to be processed during one invocation of Jostraca. This can also be achieved using the -t option.

Note: this option is a lower case 'L' (ell), that is, 'l', not the number '1' (one).

See: main.CodeWriterOptions, -a, -t

Example:
jostraca -l foo.jtm bar.jtm 
jostraca -l *.jtm
-a
[ top ]
arguments:
     Arguments passed on by Jostraca to the CodeWriter program.
Jostraca generates code using an intermediate program, the CodeWriter, which is also generated. In order to control the operation of the CodeWriter program, you may need to specify certain command line arguments. For example, an argument might be the location of an external meta data source such as an XML file. These options can be specified using the -a option to Jostraca. This option is only really useful when using the -l option, as the second and subsequent arguments to Jostraca are by default considered CodeWriter arguments.

Note: special arguments to the CodeWriter are used by Jostraca in order to set standard options such as the location of the output folder or backup configuration. These arguments are prefixed with the special marker text jsa: so as not to conflict with user arguments.

See: main.CodeWriterOptions, -l

Example:
jostraca -l foo.jtm bar.jtm -a data-model.xml
-t
[ top ]
file:
    Text file containg list of templates to process
Use this option to specify large numbers of templates to process. The names of the templates are placed in a text file, one name per line.

Note: when using the -t option, all other command line arguments are assumed to be CodeWriter arguments, unless:
    the argument ends in .jtm, or
    the -a option is used.

Example:
jostraca -t template-list.txt data-model.xml
-b
[ top ]
folder:
    Folder to use for backup files
Jostraca automatically backs up previously generated files to a special backup folder. By default, this folder has the name .jostraca and is placed in the current folder.

This option allows you to specify the name of the backup folder. The backup folder is automatically created if it does not exist.

See: -B.

Example:
jostraca -b foobar-backups foobar.jtm
-B
[ top ]
None
If you specify this option, backups of previously generated files are not made.

See: -b

Example:
jostraca -B foobar.jtm
-m
[ top ]
folder:
    Folder to use for metadata files
Jostraca creates metadata describing each template execution. This metadata includes external files referenced in the template options and the full set of properties used while generating. This metadata can then be used on subsequent template executions to avoid unnecessary compilation and execution. By default, this folder has the name .jostraca and is placed in the current folder.

This option allows you to specify the name of the metadata folder. The metadata folder is automatically created if it does not exist.

See: -M.

Example:
jostraca -m foobar-metadata foobar.jtm
-M
[ top ]
None
If you specify this option, metadata from the template execution will not be stored.

See: -m

Example:
jostraca -M foobar.jtm
-c
[ top ]
None
If you specify this option, the CodeWriter program generated by Jostraca is compiled. This is the default behaviour.

See: main.CompileCodeWriter, -C

Example:
jostraca -c foobar.jtm
-C
[ top ]
None
If you specify this option, the CodeWriter program generated by Jostraca is not compiled. This can be used to improve generation speed for languages such as Perl, which do not require compilation.

See: main.CompileCodeWriter, -c

Example:
jostraca -C foobar.jtm
-g
[ top ]
None
If you specify this option, the output files specified by the template are generated. The output files are generated by executing the CodeWriter program. This is the default behaviour.

See: main.ExecuteCodeWriter, -G

Example:
jostraca -g foobar.jtm
-G
[ top ]
None
If you specify this option, no output files are generated. The CodeWriter program created by Jostraca is not executed. This can be used to check the syntax of the template script that defines the CodeWriter program source code.

See: main.ExecuteCodeWriter, -g

Example:
jostraca -G foobar.jtm
-W
[ top ]
file:
    File containing writer format source code for the templates
Use this option to change the writer format used to generate the source code. The writer format is the basic source code framework for the CodeWriter program. This option is provided for debugging purposes.

Example:
jostraca -W AdvancedWriterFormat.jwf foobar.jtm
-F
[ top ]
file:
    File containing some additional configuration settings
Use this option to specify additional minor configuration files. The settings in these files override the settings in the main configuration file specified with -f. The configuration files override each other in order of appearance. This option can be used for minor, project specific configuration changes.

Example:
jostraca -F project.conf foobar.jtm
-f
[ top ]
file:
    File containing basic configuration settings
This option is specified by default in the standard script which executes Jostraca from the command line (the batch file jostraca.bat or the sheel script jostraca). Thus, it is usually not necessary to specify this option. It can be used for testing or for using several very different configurations.

Example:
java org.jostraca.Jostraca -f another.conf foobar.jtm
-D
[ top ]
setting:
    Individual name=value configuration pair
Use this option to explicitly control individual configuration settings from the command line. Settings specified in this way from the command line always have the highest precedence and override all other settings with the same name.

Example:
jostraca -Dmain.ExternalCompiler=jikes foobar.jtm
-X
[ top ]
option list:
    A list of free form options
This option controls the use of non-standard or experimental features. These options are:
old
Use old template processing engine. This option will be removed soon.
noexit
Do not exit JVM after running.
track:file-path
Enable and set tracking file. This an experimental feature providing simplistic logging of internal operations. It is not complete but may provide some information when using Jostraca in a server environment.


Example:
jostraca -Xtrack:/tmp/jostraca-tracking.log foobar.jtm
-v
[ top ]
None
This option makes Jostraca display more detailed output while templates are being processed. This can be useful for debugging as the exact commands used to execute external programs are shown. Also shown are the explicit paths to various files.

Example:
jostraca -v foobar.jtm
-V
[ top ]
None
This option prevents output to the console, except for error messages. This can be useful when using Jostraca inside scripts or batch files.

Example:
jostraca -V foobar.jtm
-d
[ top ]
dump type:
    One or both of: settings or template
The option is used to dump internal settings to a text file. The type of information to dump is specified with a comma separated list of keywords. The currently supported keywords are:
    settings: dump full settings list
    template: dump full template source code

Example:
jostraca -d settings foobar.jtm
jostraca -d template,settings foobar.jtm
-h
[ top ]
template:
    The name of a template.
This option displays the contents of the documentation section in the specified template, if this section exists.

Example:
jostraca -h foobar.jtm







Index (alphabetical)[ top ]
-a   Specify arguments for the CodeWriter program.
-b   Specify backup folder.
-B   Do not make backups.
-c   Compile the template (compile the CodeWriter program).
-C   Do not compile the template (do not compile the CodeWriter program).
-d   Dump internal settings to a file.
-D   Explicitly set a configuration setting.
-f   Specify main configuration file.
-F   Specify additional configuration files.
-g   Generate output files (execute the CodeWriter program).
-G   Do not generate output files (do not execute the CodeWriter program).
-h   Show template documentation, if it exists.
-l   Interpret all command line arguments as template names.
-m   Specify metadata folder.
-M   Do not store metadata.
-o   Specify folder for generated files.
-t   Specify a text file containing list of template names
-v   Display verbose detailed messages.
-V   Display error messages only.
-w   Work folder where CodeWriter program is placed.
-W   Specify writer format file.
-X   Set non-standard options.

























Copyright © 2000-2001 Richard Rodger.