Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

How to call Ant scripts

To call an Ant script from Buildr, simply call Ant's main method using the Ruby-Java bridge (RJB):

Code Block
define "my-project" do

 task :call_ant do
   p 'calling ant..'
   Java.org.apache.tools.ant.Main.main( ['-file', 'build.xml', 'my-target'] )
 end
end

And from the command-line you can call this task directly:

Code Block
buildr my-project:call_ant