An ant extension that parses build.xml in the root directory (but you can configure it to look elsewhere) 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.
ant.useAntForParsing
to false.For this release the extension requires:
ant.executable
and ant.home
).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).ant.buildFilenames
: comma separated list of build file names to load. Default is build.xml.ant.buildFileDirectories
: comma separated list of directories to search for configured file names (build, auto & env files). Default is . .ant.buildAutoFile
: comma separated list of file names to load auto targets from. Default is build.auto.ant.initialiseCommandOnWin32
: command to call when new output console is initialised on win32 platform.ant.initialiseCommandOnLinux
: command to call when new output console is initialised on linux platform.ant.useAntForParsing
: Use ant command line to parse the build file. If set to false then an internal parser is used instead which is comparatively limited.The extension will use the built in version of Ant which includes a windows colour library if you don't configure the ant.executable or ant.home settings.
The build.env (or whatever is configured) should be in standard property file format like this:
ENV_VAR1=my setting
ENV_VAR2=C:\some\path
The autoTarget file build.auto (or whatever is configured) should be in the json format below:
{
"autoTargets": [
{
"filePattern": "src/foldertest/**/*.{p,w,i,cls}",
"buildFile": "build.xml",
"runTargets": "compile_foldertest",
"initialDelayMs": 1000
},
{
"filePattern": "**/*.{p,w,i,cls}",
"buildFile": "build.xml",
"runTargets": "compile",
"initialDelayMs": 1000
},
{
"filePattern": "**/*.test",
"buildFile": "build.xml",
"runTargets": "compile test",
"initialDelayMs": 5000
},
{
"filePattern": "**/*.spacetest",
"buildFile": "build.xml",
"runTargets": "\"space test\" test",
"initialDelayMs": 2000
}
]
}
Dependencies weren't been parsed correctly after the first one so you couldn't run them correctly. Send in file that caused the auto build as a parameter to the ant script. Updated dependencies.