Using Ant to automate tasks for the Liberty profile

Apache Ant is a Java™ library tool for automating the build process. You can use Ant tasks provided by the Liberty profile to manage the server and applications.

Before you begin

The Ant plug-in for the Liberty profile is located in the dev/tools/ant directory of the server image. This plug-in contains a set of Ant tasks. If you want to use these tasks in your build script, you must make sure the plug-in is available on the Ant classpath. One way of doing this is to copy the plug-in file wlp-anttasks.jar to the /lib directory of the Ant installation, and declare the antlib namespace in the build.xml file. For example:
  <project .... xmlns:wlp="antlib:com.ibm.websphere.wlp.ant">
    ...
  </project>

The namespace can be any string, provided you avoid name conflicts. After that, you must use the namespace as a prefix of the Ant tasks for the Liberty profile. For example, you must use wlp:server when calling the server task.

About this task

You can create build scripts that use these Ant tasks to package, install, and test your application on the Liberty profile.


Icon that indicates the type of topic Task topic

Terms and conditions for information centers | Feedback


Timestamp icon Last updated: Monday, 21 April 2014
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=phil&product=was-nd-iseries&topic=twlp_dev_ant
File name: twlp_dev_ant.html