You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
2.6 KiB
XML
81 lines
2.6 KiB
XML
|
4 months ago
|
<?xml version="1.0" encoding="utf-8"?>
|
||
|
|
|
||
|
|
<project name="unsu" default="deploy_was" basedir=".">
|
||
|
|
|
||
|
|
<target name="clean">
|
||
|
|
<echo>ant버전 : ${ant.version}</echo>
|
||
|
|
<echo>clean - 기존 war,html 삭제</echo>
|
||
|
|
|
||
|
|
<delete dir="/html" />
|
||
|
|
<delete dir="/webapps" />
|
||
|
|
|
||
|
|
<mkdir dir="/html" />
|
||
|
|
<mkdir dir="/webapps/unsu.war/WEB-INF/lib" />
|
||
|
|
<mkdir dir="/webapps/unsu.war/WEB-INF/classes" />
|
||
|
|
</target>
|
||
|
|
|
||
|
|
|
||
|
|
<target name="compile" depends="clean">
|
||
|
|
<echo>compile - 컴파일</echo>
|
||
|
|
<javac srcdir="src/main/java" destdir="/webapps/unsu.war/WEB-INF/classes/" includeantruntime="false" encoding="utf-8">
|
||
|
|
<classpath>
|
||
|
|
<fileset dir="src/main/webapp/WEB-INF/lib" includes="*.jar"/>
|
||
|
|
</classpath>
|
||
|
|
<classpath path="lib_for_ant/javax.jsp_2.0.0.0_2-2.jar"/>
|
||
|
|
<classpath path="lib_for_ant/javax.servlet_2.0.0.0_3-0.jar"/>
|
||
|
|
</javac>
|
||
|
|
</target>
|
||
|
|
|
||
|
|
<target name="copy_for_config" depends="compile">
|
||
|
|
<echo>copy_for_config - 설정파일을 복사한다.</echo>
|
||
|
|
<copy todir="/webapps/unsu.war/WEB-INF/classes/">
|
||
|
|
<fileset dir="src/main/resources"/>
|
||
|
|
</copy>
|
||
|
|
</target>
|
||
|
|
|
||
|
|
|
||
|
|
<target name="copy_for_war" depends="copy_for_config">
|
||
|
|
<echo>copy_for_war - war를 작성하기 위해 필요한 폴더구조를 만들고 파일을 복사한다.(jsp파일,xml파일,tld파일,라이브러리파일,라이센스파일)</echo>
|
||
|
|
<copy todir="/webapps/unsu.war" >
|
||
|
|
<fileset dir="src/main/webapp">
|
||
|
|
<exclude name="**/*.css"/>
|
||
|
|
<exclude name="**/*.html"/>
|
||
|
|
<exclude name="**/*.js"/>
|
||
|
|
<exclude name="**/*.gif"/>
|
||
|
|
<exclude name="**/*.jpg"/>
|
||
|
|
<exclude name="**/*.png"/>
|
||
|
|
<exclude name="**/*.cab"/>
|
||
|
|
<exclude name="**/*.exe"/>
|
||
|
|
<exclude name="**/*.zip"/>
|
||
|
|
<exclude name="**/*.jrf"/>
|
||
|
|
</fileset>
|
||
|
|
</copy>
|
||
|
|
</target>
|
||
|
|
|
||
|
|
<target name="copy_for_html" depends="copy_for_war">
|
||
|
|
<echo>copy_for_html - image, js, css, html 등의 contents를 WEB server에 배포한다.</echo>
|
||
|
|
<copy todir="/html">
|
||
|
|
<fileset dir="src/main/webapp">
|
||
|
|
<exclude name="/WEB-INF/**"/>
|
||
|
|
<exclude name="**/*.jsp"/>
|
||
|
|
</fileset>
|
||
|
|
</copy>
|
||
|
|
</target>
|
||
|
|
|
||
|
|
<!-- 서버(test, stage, product)에 의존적인 설정파일을 선택 적용 -->
|
||
|
|
<target name="copy_resources_dependon_server" depends="copy_for_html">
|
||
|
|
<echo>copy_resources_dependon_server - 서버(test, stage, product)에 의존적인 설정파일을 선택 적용한다.</echo>
|
||
|
|
<!-- log4j 설정 파일을 서버에 맞게 적용 -->
|
||
|
|
<copy
|
||
|
|
file="src/main/resources/config/log/log4j.xml.test"
|
||
|
|
tofile="/webapps/unsu.war/WEB-INF/classes/config/log/log4j.xml"
|
||
|
|
overwrite="true" />
|
||
|
|
|
||
|
|
</target>
|
||
|
|
|
||
|
|
|
||
|
|
<!-- 완료 -->
|
||
|
|
<target name="deploy_was" depends="copy_resources_dependon_server" />
|
||
|
|
|
||
|
|
|
||
|
|
</project>
|