When executing an Ant build.xml file, the Ant executable should not be required to live on the environment's $PATH ------------------------------------------------------------------------------------------------------------------
Key: JRUBY-6250 URL: https://jira.codehaus.org/browse/JRUBY-6250 Project: JRuby Issue Type: Bug Components: Java Integration Affects Versions: JRuby 1.6.5 Environment: RHEL6 Reporter: John Ryding Priority: Minor When trying to re-use a pre-built build.xml file, the following code is used: def exec_ant(arg_list) ant arg_list end When executed in this way, JRuby's Ant library makes a shell call to execute Ant. This is done at lib/ruby/site_ruby/shared/ant/ant.rb:172. The problem is that the path to the ant executable (e.g. /opt/apache-ant/bin) is required to live on the environment's $PATH. This is a problem for systems that get automatically deployed by configuration management systems like Chef because is is difficult for a script to permanently set the $PATH variable to live on after its process is done. Also, external systems like build engines may screw up the $PATH. For example, the build system that my team uses sets its own $PATH when it executes a new build, which requires us to have our scripts explicitly know where the Ant binary lives in order to utilize Jruby+Ant. A better method to execute ant from an sh command would be to use some other environment variable the same way Java is required to ($JAVA_HOME). -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email