In my case I was trying to use labminder ( available at
http://sourceforge.net/projects/labminder/files/AntTasks/1.0.0-VMware3.0.1/labminder-1.0.0-VMware3.0.1.zip/download)
Downloaded labminder-1.0.0-VMware3.0.1.zip and extracted the contents into a directory
The directory contained two main folders
doc and lib , a README.html and a demo.xml file
Doc: contains the instructions on how to use the library
You will need to copy the contents on the lib directory into %ANT_HOME%/lib/labminder
This makes it available to ant for use
How to use:
In your build.xml file , you will have to make the below namespace and antlib declaration
<project name="your-project"
xmlns:LabMinder="antlib:org.labminder.ant.tasks" default="main">
Calling the traget:
<target name="listworkspaces"
description="list configurations for configration type Workspace.">
<LabMinder:ListConfigurations username="${labmgr.user}"
password="${labmgr.password}" host="${labmgr.host}"
configurationtype="Workspace" organization="${labmgr.organization}" />
</target>
FROM THE ANT MANUAL:
Ant supports a plugin mechanism for using third party tasks. For using them you have to do two steps:
1. place their implementation somewhere where Ant can find them
2. declare them.
Don't add anything to the CLASSPATH environment variable - this is often the reason for very obscure errors. Use Ant's own mechanisms for adding libraries:
* via command line argument -lib
* adding to ${user.home}/.ant/lib
* adding to ${ant.home}/lib
For the declaration there are several ways:
* declare a single task per using instruction using
* declare a bundle of tasks using a properties-file holding these taskname-ImplementationClass-pairs and
* declare a bundle of tasks using a xml-file holding these taskname-ImplementationClass-pairs and
* declare a bundle of tasks using a xml-file named antlib.xml, XML-namespace and antlib: protocoll handler
No comments:
Post a Comment