Xvcl And Ant Task
CjOS Project @ cjos.sourceforge.net
Index
Bind Pages
Cjos Library
Cjos Pages
Cjos News Pages
Eric Pages
Introduction To Smart Api
Osgi Pages
Registry Api Pages
Smart Api Pages
Xvcl Pages
CjOS Project
Summary Page
Mailing List
Download
CVS
JOS Technical Edition
Support This Project
Xvcl Pages; [ Cjos Audience]
Article contributed by Gilbert Herschberger (17 August 2007).

xvcl task

The xvcl task is equivalent to the command line for an XVCL processor. It supports the following attributes:

  • spc attribute - Required. Sets the SPC, or top-most x-frame. Does not include a path separator, such as slash (/) or backslash (/).
  • projectPath attribute - Required. Sets the location of the SPC.
  • appendOutput attribute - When true, the XVCL processor appends output to an existing file.
  • beautifyOutput attribute - When true, the XVCL processor removes certain blank lines.
  • failonerror attribute - When true, a failure in the xvcl task stops an Ant script.
  • includeTraceInfo attribute - When true, the XVCL processor emits the name of an x-frame into an output file.
  • logGeneratedFiles attribute - When true, the XVCL processor emits the name of generated files to a log file.
  • namespace attribute - When true, the XVCL processor requires the xvcl namespace for its tags.
  • validateOnly attribute - Use this attribute to validate an x-framework. When true, the XVCL processor will not write to any file.
  • verbose attribute - When true, the XVCLAntTask displays additional messages.

set and setmulti tags

  • set tag - sets a variable with a single value.
  • setmulti tag - sets a variable with multiple values, like a list.
  • var attribute - Required. Name of variable.
  • value attribute - Required. Value of variable. Supports both ${property-name} and ?@variable-name? notation.
  • deferEvaluation attribute - When "yes", defers the evaluation of the value attribute util the variable is used.


Version 3.2.1

This section contains information about the Ant task for XVCL Processor 3.2.1.

Defining the xvcl task

 <taskdef name="xvcl" classname="edu.xvcl.core.util.XVCLAntTask">
   <classpath>
     <pathelement location="build/extract/edu.xvcl.core_3.2.1"/>
     <fileset dir="build/extract/edu.xvcl.core_3.2.1/lib">
       <include name="*.jar"/>
     </fileset>
     <fileset file="build/extract/edu.xvcl.core_3.2.1/xvcl.jar"/>
   </classpath>
 </taskdef>

Alternative: Defining the xvcl task with classpath reference

 <path id="cp1">
     <pathelement location="build/extract/edu.xvcl.core_3.2.1"/>
     <fileset dir="build/extract/edu.xvcl.core_3.2.1/lib">
       <include name="*.jar"/>
     </fileset>
     <fileset file="build/extract/edu.xvcl.core_3.2.1/xvcl.jar"/>
 </path>
 <taskdef
     name="xvcl"
     classname="edu.xvcl.core.util.XVCLAntTask"
     classpathref="cp1">
 </taskdef>

Example: Using the xvcl task

 <target name="xvcl" depends="taskdef">
   <xvcl
       spc="spc.xvcl"
       projectPath="."
       beautifyOutput="true"
       includeTraceInfo="false"
       logGeneratedFiles="true"
       validateOnly="false"/>
 </target>


Version 2.07 (1g)

This section contains information about the Ant task for XVCL Processor 2.07 (1g).

Defining the xvcl task

 <taskdef name="xvcl" classname="gchii.tools.xvcl.XVCLAntTask">
   <classpath>
     <fileset dir="lib">
       <include name="cjos-xvcl.jar"/>
       <include name="jdom.jar"/>
     </fileset>
   </classpath>
 </taskdef>

Example: Using the xvcl task

 <target name="xvcl" depends="taskdef">
   <xvcl
       spc="spc.xvcl"
       projectPath="."
       appendOutput="false"
       beautifyOutput="true"
       failonerror="true"
       includeTraceInfo="false"
       logGeneratedFiles="false"
       namespace="false"
       validateOnly="false"
       verbose="false"/>
 </target>

Example: Using the xvcl task with set and setmulti

 <property name="dest" value="build/source"/>
 <property name="version" value="1.2-3"/>
 <target name="init">
   <tstamp/>
 </target>
 <target name="xvcl" depends="init,taskdef">
   <xvcl spc="spc.xvcl" projectPath=".">
     <set var="dest" value="${dest}"/>
     <set var="dstamp" value="${DSTAMP}"/>
     <set var="logfile" value="?@xvcl.starttime?.log" deferEvaluation="yes"/>
     <set var="version" value="${version}"/>
     <setmulti var="list" value="1,2,3"/>
   </xvcl>
 </target>

  • ${dest}, ${DSTAMP} and ${version} are evaluated by Ant. A value attribute can include a reference to an Ant property, such as ${dest}.
  • ?@xvcl.starttime? is evaluated by the XVCL processor. A value attribute can include a reference to another variable, such as a system variable.