WebSphere Commerce Developer

Building and configuring OpenLaszlo Web projects using Ant

You can build and configure OpenLaszlo Web projects within the WebSphere Commerce Developer workbench, or you can also perform these tasks using Ant.

About this task

Apache Ant, a Java-based build tool, is widely used to automate build processes. To facilitate OpenLaszlo development for WebSphere Commerce customization and build automation, Ant tasks for OpenLaszlo operations are provided in WebSphere Commerce Developer. This task provides general instructions on how to use these tasks.


  1. Create a new Ant build file if you do not already have one.
  2. In the Ant build file, implement the logic to build and configure an OpenLaszlo Web project using the openLaszloBuild and openLaszloConfigureProperties Ant tasks respectively.
  3. Run the Ant build file using the build utility in WebSphere Commerce Developer.


The following sample Ant build file compiles the OpenLaszlo files in the LOBTools project with the debugging window disabled, which is suitable for production use. The Ant build file can be named build.xml and placed into the root of the LOBTools project in your WebSphere Commerce Developer workspace.

<?xml version="1.0" encoding="UTF-8"?>
<project name="build" default="all">
    <target name="all">
        <!-- Disable debugging window for production use -->
        <openLaszloConfigureProperties debug="false" />
        <!-- Build the OpenLaszlo files in the project -->
        <openLaszloBuild project="LOBTools" />
        <!-- Re-eable debugging window for the development environment -->
        <openLaszloConfigureProperties debug="true" />