Program/Tool
[ Ant 사용법 및 필수 태그 설명 ]
Mr콩랑
2011. 1. 19. 10:21
반응형
시간날때 마다 Ant에 대해서 하나씩 정리해 보도록 하자.
[1] Ant 란?
[2] Ant 에서 사용되는 Tag들 설명
[3] Ant 사용시 *.java 이외 파일 Build 하는 방법
예를들어 src 폴더 이하에 properties 파일이 상당 수 존재한다고 하는 경우, Build 하는 방법을 서술해 보도록 하겠다.
간단하게 COPY Tag를 사용 하면 해결된다.
38 <target name="mandsSystem" description="M and S System service"> 39 <javac 40 srcdir="${src.dir}" 41 destdir="${classes.dir}" 42 deprecation="on" 43 debug="on" 44 failonerror="off" 45 listfiles="on" 46 verbose="off" 47 includeantruntime="false" 48 49 > 50 <classpath refid="mandsSystem.classpath"/> 51 </javac> 51 </javac> 52 <copy todir ="${classes.dir}"> 53 <fileset dir="${src.dir}"> 54 <exclude name="**/*.java" /> 55 </fileset> 56 </copy> 57 </target> |
java파일이 아닌 것은 Build의 개념이 존재하지 않기 때문에 특정 폴더 이하 에서 *.java가 아닌 모든 파일들을 classes 폴더로 Copy하는 방법 밖에 없다.
반응형