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.
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.
Note: while this answer was intended to state the general approach rather then specifics, user149408 suggests that at least in some Eclipse versions, this would be achieved by navigating menus to Project > Properties and choosing Builders.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With