Using the Ant Tasks at the Command Line

Prerequisites:

  1. 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 Open the ant files wizardFile > New > Other... > Web Services > Ant Files from the top level menu.
  2. 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:
  1. Navigate to the plugins directory of your WTP installation and extract the contents of the org.eclipse.wst.command.env plug-in.
  2. In the extracted plug-in go to the ant folder. The following files should exist there:
  3. Copy the required CXF Ant property file that was imported in the prerequisites into the ant folder.
  4. Edit the wsgen.xml file to point to the CXF Ant property file.
  5. Edit the wsant.bat file and set the following local environment variables to reflect your system configuration:
  6. To run the Ant task open a command line, navigate to the ant folder and type wsant
  7. Check the wsgen.txt file for output after the generation has completed.
  8. Navigate to the Dynamic Web project in the file system or refresh the project in Eclipse to find the generated artifacts.