Ant Target Runner for Visual Studio Code
An ant extension that parses build.xml in the root directory and allows you to easily run the targets or reveal their definitions.
Ant build output can be colorized, environment variables can be set and targets can be automatically run on changes in the file system.
- Searches for build.xml in the root directory on startup and loads the targets ready to run.
- The targets and their dependencies are visualised in a treeview and can be run from the toolbar or the context menu option.
- Dependencies of dependencies are shown recursively to give a full picture of what will be run and in which order.
- Targets can be sorted as they appear in the file or in alphabetical order.
- Will detect changes, creates and deletes of the build.xml file and reload the target list automatically.
- Reveal target line definition in build.xml.
- Auto targets allow targets to be run on file system changes with configurable delay.
- Will load env vars from build.env (configurable) and pass them into ant.
For this release the extension requires:
- You need to point the extension at an existing ant install (using
- Your ant build xml file should be in the root directory and be called build.xml.
- Any environment variables file should be in the root directory and be called build.env.
- Any auto target file should be in the root directory and be called build.auto.
Extension Settings & Configuration files
This extension contributes the following settings:
ant.executable: the executable for ant. Default is ant.
ant.home: if set will set ANT_HOME env in terminal to this value. Default is blank.
ant.sortTargetsAlphabetically: should the targets be sorted alphabetically by default? Default is true.
ant.envVarsFile: file name to load env vars from to pass to ant. Default is build.env.
ant.ansiconExe: Ansicon executable (e.g. D:/tools/ansicon/ansicon.exe) for colorization on windows. Download from (https://github.com/adoxa/ansicon/releases).
The build.env should be in standard property file format like this:
The autoTarget file build.auto should be in the json format below:
"runTargets": "compile test",
"runTargets": "\"space test\" test",
Only works for build.xml, build.env & build.auto in the root folder at the moment.
Fix issue where having multiple auto targets separated by spaces wouldn't run after change to surround targets by quotes.
Quotes are now only added when running a selected target from the tree that contains a space and not for auto targets. To use targets with spaces in auto targets you need to surround it with escaped quotes (").
[0.1.6] - 2019-07-02
[0.1.5] - 2019-07-02
- Fixed error where space separated auto targets are surrounded by quotes.