java 태스크
<target name="run" depends="compile">
<java classname="com.some.package.path.BootStrap"
classpathref="classpath"
fork="true"
failonerror="true">
<jvmarg value="-Dcom.sun.management.jmxremote=true"/>
<jvmarg value="-Dcom.sun.management.jmxremote.port=9999"/>
<jvmarg value="-Dcom.sun.management.jmxremote.authenticate=false"/>
<jvmarg value="-Dcom.sun.management.jmxremote.ssl=false"/>
<classpath>
<pathelement path="${dist.dir}/classes"/>
</classpath>
</java>
</target>
jar 태스크
<target name="jar" depends="compile">
<delete>
<fileset dir="${dist.dir}" includes="output-jar-name.jar"/>
</delete>
<jar jarfile="${dist.dir}/output-jar-name.jar">
<fileset dir="${classes.dir}">
<include name="com/some/package/path/**/*.class" />
<include name="com/some/package/path/**/*.xml" />
<include name="resources/**/*.*" />
</fileset>
<manifest>
<attribute name="Built-By" value="owner"/>
<attribute name="Main-Class" value="com.some.package.path.BootStrap"/>
<attribute name="Class-Path" value="
../lib/aopalliance-1.0.jar
../lib/commons-beanutils-1.6.jar
../lib/commons-collections-3.2.jar
../lib/commons-configuration-1.8.jar
../lib/commons-dbcp-1.2.2.jar
../lib/commons-lang-2.6.jar
../lib/commons-logging-1.1.1.jar
../lib/commons-pool-1.3.jar
../lib/ibatis-sqlmap-2.3.4.726.jar
../lib/java-gearman-service-0.6.3.jar
../lib/log4j-1.2.16.jar
../lib/mysql-connector-java-5.1.19.jar
../lib/org.springframework.aop-3.1.1.RELEASE.jar
../lib/org.springframework.asm-3.1.1.RELEASE.jar
../lib/org.springframework.beans-3.1.1.RELEASE.jar
../lib/org.springframework.context.support-3.1.1.RELEASE.jar
../lib/org.springframework.context-3.1.1.RELEASE.jar
../lib/org.springframework.core-3.1.1.RELEASE.jar
../lib/org.springframework.expression-3.1.1.RELEASE.jar
../lib/org.springframework.jdbc-3.1.1.RELEASE.jar
../lib/org.springframework.orm-3.1.1.RELEASE.jar
../lib/org.springframework.transaction-3.1.1.RELEASE.jar
../lib/slf4j-api-1.6.4.jar
../lib/slf4j-log4j12-1.6.5.jar"/>
</manifest>
</jar>
</target>
'자바' 카테고리의 다른 글
서브버전(subversion) svn locked 오류 해결 (2) | 2016.12.29 |
---|---|
이클립스에서 zen-coding 사용 (0) | 2012.10.10 |
삽질 에피소드 두가지 (0) | 2012.03.27 |
Hudson에서 Tomcat 재기동 시 하위 프로세스 문제 (0) | 2010.01.30 |
IE와 FF에서 똑같이 보이게 하기 위한 몇가지 팁 (0) | 2008.04.03 |