SmartFrog Ant Tasks

SmartFrog Ant Tasks

These are the Ant tasks to deploy and undeploy applications with SmartFrog during a build process.


<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


The <application> element describes an application to deploy.

nameApplication name. Required.
descriptorpath to a deployment descriptor in a JAR in the classpath
filepath 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.


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.

keystorePath to a java keystore
policyFilePath to a java security policy
SecurityPropertiesFileName of a file containing SmartFrog security properties
SecurityPropertiesResourcePath to a resource containing SmartFrog security properties
AliasIdentity to use when signing


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.

urlA URL of a JAR file to add the the codebase
fileA file to add to the codebase


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.

fileA file containing Java property declarations. Required
optionalA 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.

assertionsControl assertion options of the SmartFrog JVM
syspropertyJVM System properties
syspropertysetA set of properties to pass from the Ant JVM to the SmartFrog JVM
classpaththe classpath for the task