Using License Keys > > Using License Keys > Deploying an Application > Using jlmdeploy as an ant Task

jlmdeploy can also be invoked as Apache ant "task" from a build.xml file.

Parameters

jlmdeploy can take the parameters in Table 3 as attributes. For additional information about the options, see Using jlmdeploy from the Command Line.

Table 3 ant tool attributes
Attribute 
Description 
Required 
application 
Name of the application, as mentioned in the license keys. 
Yes 
input 
File name of the input JAR. 
Yes 
output 
File name of the JAR to be created. 
No (default is based on the input JAR file, ending in .deployed.jar
products 
A comma separated list of products and corresponding version numbers. 
Yes 
nowarnings 
A comma separated list of products. 
No (default is empty) 
warningserrors 
A Boolean value. 
No (default is false) 
classpath 
The classpath to use. It must include jlm-tools.jar and the directory containing the keys.jlm file. 
No 
classpathref 
The classpath to use, given as a reference to a PATH defined elsewhere. It must include jlm-tools.jar and the directory containing the keys.jlm file. 
No 

It can also take the following parameters as nested elements:

Table 4 ant tool nested elements
Nested Element 
Description 
Required 
classpath 
A PATH like structure that can also be set through the classpath attribute. 
No 

ant Syntax Example

Here is an example in ant syntax, suitable for a build.xml:

<taskdef name="jlmdeploy"
     classpath="${jviews.framework}/lib/jlm-tools.jar"
     classname="ilog.tools.ant.JlmDeploy" />
<jlmdeploy products="JViews-Diagrammer 6.0"
     application="MaxiMap"
     input="myapp.jar"
     output="myapp.deployed.jar">
  <classpath>
     <pathelement location="${jviews.framework}/lib/jlm-tools.jar" />
     <pathelement location="${jlmdir}/" />
  </classpath>
</jlmdeploy>

Note
The classpath in the taskdef is needed so that this ant task can be found. The classpath in the jlmdeploy element is needed so that jlmdeploy can find the keys.jlm file.

ant Project Example

See also the example ant project, which contains a ready-to-run build.xml for an ILOG JViews Diagrammer sample.