사용자 도구

사이트 도구


gant:scripts

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

다음 판
이전 판
gant:scripts [2012/10/17 18:17]
kwon37xi 새로 만듦
gant:scripts [2012/10/18 17:41] (현재)
kwon37xi
줄 1: 줄 1:
 ====== Gant Scripts ====== ====== Gant Scripts ======
 Gant 스크립트는 타겟(target)을 정의하고 미리 선언한 AntBuilder와 기타 객체들에 대한 작업을 호출하는 Groovy 스크립트이다. Gant 스크립트는 타겟(target)을 정의하고 미리 선언한 AntBuilder와 기타 객체들에 대한 작업을 호출하는 Groovy 스크립트이다.
 +  * Ant 태스크는 아무 객체 없이 바로 태스크 이름으로 호출한다.<code groovy>
 +target(hello: 'hello world') {
 +  echo(message: 'hello world!') // Ant의 echo 태스크 호출
 +}
 +</code>
  
   * ''includeTargets'' : 다른 Gant 스크립트나 적절한 클래스에 정의된 타겟을 끌어온다.   * ''includeTargets'' : 다른 Gant 스크립트나 적절한 클래스에 정의된 타겟을 끌어온다.
줄 8: 줄 13:
 ant.taskdef (  name : 'groovyc' , classname : 'org.codehaus.groovy.ant.Groovyc' ) ant.taskdef (  name : 'groovyc' , classname : 'org.codehaus.groovy.ant.Groovyc' )
 includeTargets << gant.targets.Clean includeTargets << gant.targets.Clean
-cleanPattern << '**/*~'+cleanPattern << '**/*~' // Clean 타겟이 미리 선언한 객체
 includeTool << gant.targets.Ivy includeTool << gant.targets.Ivy
 </code> </code>
  
- +  * 다른 Gant 파일의 타겟 끌어오기<code groovy> 
 +includeTargets << new File('source/org.codehaus/groovy/gant/targets/clean.gant'
 +</code> 
 +  * File 클래스 대신 파일을 나타내는 문자열을 바로 써도 상관 없는 경우도 있다. javac  
 +  * 기본 타겟 지정. ''gant'' 명령만 내려도 기본 타겟이 실행된다. <code groovy> 
 +setDefaultTarget(compile) 
 +</code>
gant/scripts.1350465461.txt.gz · 마지막으로 수정됨: 2012/10/17 18:17 저자 kwon37xi