Table of Contents
Ant project is opened in Visual Studio. There is at least one target added to the project. You can find instructions how to manage targets in this section.
Tasks in Ant are commands that specify what to do. Tasks usually belong to some target. If there is more than one task for a target, they are executed in sequence. Therefore the order in which tasks are defined in the Ant build file does matter. Tasks are marked in Solution Explorer window by a "tool" icon. This is because most of the tasks actually run various tools, like the compiler, JAR packager, documentation generator, etc. There is also a bunch of simpler tasks, to do operations on the file system, test various conditions, set properties, and so on. You can find a list of standard tasks in Ant documentation. IntegraStudio also displays short help texts for most of them.
To add a task, right click on a target in Solution Explorer window and choose Add / New item... option. A window will appear, which shows available elements for this target:
You can see tasks (with a "tool" icon, like the Javac one) as well as other elements which can be added to a target. Please consult Ant documentation for the detailed description of each element.
Select a task from the list and click OK. You can also select an element from the "recently added" list. This is for convenience. The window in lower part displays a short description of selected element. The "Search" box allows to find some element by name. For example, if you want to add the task named "Zip", you can enter the name into the box and the cursor will jump to the Zip task.
After clicking OK, you get an opportunity to configure attributes of the task being added. IntegraStudio displays the Properties window for that purpose:
There can be large number of properties for some tasks. Most of them are optional and may be left empty. Ant supplies reasonable defaults in such case. For certain tasks, some properties are required. Please check Ant documentation for the list. Later versions of IntegraStudio will mark these required properties.
After the properties are configured and OK is clicked, the task is added to the project. You can open the Properties window later at any time and change any properties you wish (see this section).
As the order of tasks matters, there is a function to change it. To change the task order, select a task (must be exactly one) and click one of the Up/Down buttons:
There is also a self-explanatory option to Remove a task or other element from its parent. On the other hand, there is no Rename, as it does not make any sense for tasks.
After changing any properties or task list, save the project files by starting a build, exitting Visual Studio or issuing Save All command. The XML build file will be saved then. This is compatible with standard Visual Studio behavior.
Ant also allows to define global tasks. Those tasks are not tied to any particular target and are always executed, regardless which target is being selected to run. They are managed in same way as regular tasks, however their parent node is the Global tasks node instead of a target node. Typical tasks that go here are various property setters:
Table of Contents