ant 컴 파일 패키지 학습 노트
2680 단어 ant 컴 파일
환경 변수:
ANT_HOME = ant 설치 목록
PATH=%PATH%;%ANT_HOME%/bin
http://blog.csdn.net/lip009/article/details/1226931 에 따라 build. xml 파일 을 스스로 썼 습 니 다.
<?xml version="1.0" encoding="UTF-8"?>
<project name="AntTest" basedir="." default="war">
<description>
This is a description for AntTest
</description>
<!-- -->
<property name="webroot" location="WebRoot"></property>
<property name="classes.dir" location="${webroot}/WEB-INF/classes"></property>
<property name="lib.dir" location="${webroot}/WEB-INF/lib"></property>
<property name="dist.dir" location="dist"></property>
<property name="config.dir" location="config"></property>
<path id="classpath">
<fileset dir="${classes.dir}"></fileset>
<fileset dir="${lib.dir}"></fileset>
</path>
<target name="init-dir" >
<mkdir dir="${classes.dir}"/>
<mkdir dir="${lib.dir}"/>
<mkdir dir="${dist.dir}"/>
<echo> , .</echo>
</target>
<target name="src-compile">
<javac target="1.6" srcdir="src" destdir="${classes.dir}" classpathref="classpath" includeantruntime="false">
<!-- , -->
<compilerarg line="-encoding UTF-8"/>
</javac>
<echo> , .</echo>
</target>
<target name="copy-config">
<copy todir="${classes.dir}">
<fileset dir="${config.dir}" includes="**/*.*"></fileset>
</copy>
<echo> classes , .</echo>
</target>
<target name="war" depends="init-dir,src-compile,copy-config">
<war destfile="${dist.dir}/${ant.project.name}.war" basedir="${webroot}"></war>
<echo> War , .</echo>
</target>
</project>
이것 은 가장 간단 한 built. xml 일 뿐 입 니 다. jar 가방 을 치 려 면 안에 추가 할 수 있 습 니 다.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
ANT 컴 파일 후 SWF 파일 실행target 을 추가 한 다음 exec 작업 을 사용 합 니 다.구체 적 인 코드 는 다음 과 같 습 니 다. 사실 구체 적 인 뜻 은'플래시 플레이어.exe'를 실행 하고 SWF 의 경로 인 자 를 주면 된다 는 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.