본문 바로가기

자바환경설정

[java] ant 컴파일시 - warning: `includeantruntime` was not set

컴파일시 경고메시지 발생

[sang@dev5 HotelHilton]$ ant -f compile.xml
Buildfile: /home/sang/HotelHilton/compile.xml

compile:
[delete] Deleting directory /home/sang/HotelHilton/bin
[mkdir] Created dir: /home/sang/HotelHilton/bin
[javac] /home/sang/HotelHilton/compile.xml:7: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 1 source file to /home/sang/HotelHilton/bin

BUILD SUCCESSFUL
Total time: 1 second

---------------------------------------------------------

추가해준다. includeantruntime="false"

<project name="HotelHilton" basedir="." default="compile">
<property name="src.dir" value="src" />
<property name="bin.dir" value="bin" />
<target name="compile" depends="" description="Compiling the Web Service">
<delete dir="${bin.dir}" />
<mkdir dir="${bin.dir}" />
<javac debug="on" srcdir="${src.dir}" destdir="${bin.dir}" includeantruntime="false" />
</target>
</project>

-------------------------------------------------------------------

결과 OK!!

[sang@dev5 HotelHilton]$ ant -f compile.xml
Buildfile: /home/sang/HotelHilton/compile.xml

compile:
[delete] Deleting directory /home/sang/HotelHilton/bin
[mkdir] Created dir: /home/sang/HotelHilton/bin
[javac] Compiling 1 source file to /home/sang/HotelHilton/bin

BUILD SUCCESSFUL
Total time: 1 second