반응형
<?xml version="1.0"?>

<project name="HelloWorld" default="compile" basedir="." >
<property name="src.dir" value="${basedir}" />
<property name="classes.dir" value="${basedir}" />
<property name="jar.dir" value="${basedir}" />
<property name="main-class"  value="HelloWorld"/>

<target name="compile" >
<javac srcdir="${src.dir}" destdir="${classes.dir}" />
</target>

<target name="jar" depends="compile">
<jar jarfile="${jar.dir}/hello.jar"
    basedir="${classes.dir}"
    includes="**/*.class">
    <manifest>
        <attribute name="Main-Class" value="${main-class}"/>
    </manifest>
</jar>
</target>

</project>


manifest 사용설명
http://ant.apache.org/manual/tutorial-HelloWorldWithAnt.html

ANT (상): Ant 무엇에 쓰는 물건인고?
http://www.javastudy.co.kr/docs/lec_oop/ant/ant1.htm

Ant 사용에 대한 설명
http://www.oracle.com/global/kr/magazine/webcolumns/2002/o62odev_ant.html 

[출처] Java Ant Tutorial|작성자 redcore75

+ Recent posts