I would like to run a custom shell script upon clicking Build Project
in Eclipse. I tried modifying the "compile" section in build.xml, but my script is not getting run. Invoking ant debug
on the commandline works, however.
views:
57answers:
3
+1
A:
you can right click the build.xml file and choose run as ant script, which will run the default target or get the second option which lets you choose a certain target to be run.
virgium03
2010-10-07 14:53:49
So the default eclipse "Build Project" does not go through ant?
zer0stimulus
2010-10-07 14:55:09
the build project uses the eclipse compiler and is used for development purposes. if you want to compile using ant and deploy your application somewhere, right click the ant build file.
virgium03
2010-10-07 15:17:17
+1
A:
Build.xml should be active document. So open Build.xml in Eclipse and click debug. Eclipse will run ant with your custom build file instead of standard build. You will see build output in console.
cement
2010-10-07 15:37:10
+1
A:
You needn't involve ant unless you already want to.
Somewhere in the menus there is a thing for builders. Just add another one and customize it. This gives your typical IDE run-external-command type capability with assorted variables for project path, name, etc that you can use in constructing the command line.
Chris Stratton
2010-10-08 05:23:50