I’m trying to better integrate Eclipse with my build.xml.
My build file calls GNU Make for the native portion of the program, and the Makefile uses sudo to movethe compiled libs into system path.
Unfortunately that requires entering a password, and Eclipse’s terminal doesn’t accept user input.
So the result from running the build in eclipse is:
[exec] sudo: no tty present and no askpass program specified
[exec] make: *** [install] Error 1
Any way around this problem? Can the ant build be elevated to root some other way?
Set up a separate account, e.g. deployer. Modify
/etc/sudoersto include aliases that allow deployer to execute a single command, e.g. deploy, as root. Make deployerNOEXEC:. Store the deployer password in an invisible file, e.g. .deployconf having user-only access: e.g.400or600. Load the password inant, and use as required:This works well with <signjar/>, but I’ve not tried it with <exec/>. Some effort may be required to keep linefeeds out of .deployconf.