Back to Library


/ ensure ant.jar and antlauncher.jar 
/ are on the class path and run as a standard groovy script
import groovy.xml.NamespaceBuilder

class build {
	def ant = new AntBuilder()
	public static void main(args){
		def  b = new build()

Resolving Dependencies with Ivy

// add ivy to the list of tools for gant
includeTool <<
target('retrieveDependencies':'Install dependencies') {
  def lib = new File("lib")
  println "saving files to $lib.absolutePath"
  // we use the default properites but you can define your own  
 ivy.resolve(file:'ivy.xml') // the file where the dependencies are stored
 ivy.retrieve(ivypattern:"$lib.absolutePath/[artifact].[ext]") // copy locally
setDefaultTarget ( retrieveDependencies )

and a sample ivy.xml file

<ivy-module version="1.0">
    <info organisation="jayasoft" module="hello-ivy" />
        <dependency org="org.seleniumhq.webdriver" name="webdriver-parent" rev="0.9.7376"/>
        <dependency org="net.sourceforge.htmlunit" name="htmlunit" rev="2.9"/>


  ant.unzip( src:""
       , dest:'public/javascripts/highcharts', 
          patternset {
	    include('name': '**/?*.js')
gant.txt · Last modified: 2012/02/07 02:24 by root
RSS - 200 © CrosswireDigitialMedia Ltd