SmartFrog Ant Tasks
SmartFrog Ant Tasks
These are the Ant tasks to deploy and undeploy applications with SmartFrog during a build process.
Tasks
<sf-parse> | Parse a SmartFrog file and pre-validate it before deployment |
<sf-deploy> | Deploy applications to a SmartFrog daemon |
<sf-run> | Run one or more applications in a new process |
<sf-undeploy> | Undeploy an application |
<sf-startdaemon> | Start a SmartFrog daemon |
<sf-stopdaemon> | Stop a SmartFrog daemon |
<sf-sign> | Sign JAR files with a SmartFrog certificate |
<sf-sign> | Convert files and filesets to a list of URLs |
Common Elements Unique to the SmartFrog Tasks
Application
The <application> element describes an application to deploy.
name | Application name. Required. |
descriptor | path to a deployment descriptor in a JAR in the classpath |
file | path to a deployment descriptor in a file |
A descriptor can also be included inline. When that is done, Ant property expansion takes place before the deployment descriptor is sent to the daemon. This is powerful but not normally needed as properties can be set and queried more elegantly using the PROPERTY keyword, combined with the <sysproperty> element and others.
Note that when running with security enabled, only signed descriptors inside a JAR file will be accepted for deployment.
Security
This element configures security for a daemon.
Different tasks may have different requirements of this file. For example, tasks that talk to a daemon will need a keystore, policy file and security properties file defined; the <sf-sign> task does not need the policy information.
keystore | Path to a java keystore |
policyFile | Path to a java security policy |
SecurityPropertiesFile | Name of a file containing SmartFrog security properties |
SecurityPropertiesResource | Path to a resource containing SmartFrog security properties |
Alias | Identity to use when signing |
Codebase
Any number of <codebase> elements can be added to any of the tasks that support the element; together they build up the complete sfCodebase URL list that is used to tell SmartFrog how to load component classes and resources.
One -and only one- of the possible attributes must be declared.
url | A URL of a JAR file to add the the codebase |
file | A file to add to the codebase |
PropertyFile
A declaration of a property file containing name/value assigment of JVM properties. A property file can be marked optional, in which case it is not an error for the file to be absent.
file | A file containing Java property declarations. Required |
optional | A boolean attribute to mark whether a file is required (default="true"). |
Other Common Elements
The following elements are all part of Ant's core datatype set, and are documented on the Ant web site.
assertions | Control assertion options of the SmartFrog JVM |
sysproperty | JVM System properties |
syspropertyset | A set of properties to pass from the Ant JVM to the SmartFrog JVM |
classpath | the classpath for the task |