====== Gant Scripts ====== Gant 스크립트는 타겟(target)을 정의하고 미리 선언한 AntBuilder와 기타 객체들에 대한 작업을 호출하는 Groovy 스크립트이다. * Ant 태스크는 아무 객체 없이 바로 태스크 이름으로 호출한다. target(hello: 'hello world') { echo(message: 'hello world!') // Ant의 echo 태스크 호출 } * ''includeTargets'' : 다른 Gant 스크립트나 적절한 클래스에 정의된 타겟을 끌어온다. * ''includeTool'' : Gant 파일에서 사용할 서비스를 제공하는 클래스를 끌어온다. * 용례 ant.property ( environment : 'environment' ) ant.taskdef ( name : 'groovyc' , classname : 'org.codehaus.groovy.ant.Groovyc' ) includeTargets << gant.targets.Clean cleanPattern << '**/*~' // Clean 타겟이 미리 선언한 객체 includeTool << gant.targets.Ivy * 다른 Gant 파일의 타겟 끌어오기 includeTargets << new File('source/org.codehaus/groovy/gant/targets/clean.gant') * File 클래스 대신 파일을 나타내는 문자열을 바로 써도 상관 없는 경우도 있다. javac * 기본 타겟 지정. ''gant'' 명령만 내려도 기본 타겟이 실행된다. setDefaultTarget(compile)