Using the Ant Tasks at the Command Line
Prerequisites:
- Import the CXF Ant property file for the scenario being run into an Eclipse workspace before running the task from the command line
by selecting
File > New > Other... > Web Services > Ant Files from the top level menu.
- Edit the CXF Ant property file and set the scenarioType and
initialSelection parameters:
To invoke the Ant tasks from the command line complete the following steps:
- Navigate to the plugins directory of your WTP installation and extract the contents of the
org.eclipse.wst.command.env plug-in.
- In the extracted plug-in go to the ant folder. The following files should exist there:
- Copy the required CXF Ant property file that was imported in the prerequisites into the ant folder.
- Edit the wsgen.xml file to point to the CXF Ant property file.
- Edit the wsant.bat file and set the following local environment variables to reflect your system configuration:
- JAVAEXE the location of a 1.5 or higher JDK.
- INSTALL_DIRECTORY the Eclipse install directory.
- LAUNCHER_JAR the location of the Eclipse Equinox Launcher jar.
- WORKSPACE the location of the workspace that contains the Dynamic Web projects being used.
- To run the Ant task open a command line, navigate to the ant folder and type wsant
- Check the wsgen.txt file for output after the generation has completed.
- Navigate to the Dynamic Web project in the file system or refresh the project in Eclipse to find the generated artifacts.