This topic applies to WebSphere Application Server Liberty V8.5.5.9 and earlier. For the latest Liberty topics, see the WebSphere Application Server Liberty documentation.

Using Ant to automate tasks for Liberty

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

Before you begin

Important: The wlp-anttasks.jar file that is included with Liberty is planned to be removed. For more information, see Removal notices. An open source Ant plug-in with more tasks for Liberty is available. The more recent Ant plug-in has a different antlib namespace, xmlns:wlp="antlib:net.wasdev.wlp.ant. For more information about the open source Ant plug-in for Liberty, see the GitHub repository.
The Liberty Ant plug-in wlp-anttasks.jar files are located in Maven Central. If you want to use these tasks in your build script, you must make sure the plug-in is available on the Ant class path. 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. See the following example:
  <project .... xmlns:wlp="antlib:net.wasdev.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 Liberty. 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 Liberty.


Icon that indicates the type of topic Task topic



Timestamp icon Last updated: Tuesday, 12 December 2017
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=phil&product=was-libcore-mp&topic=twlp_dev_ant
File name: twlp_dev_ant.html