Ant ANT 작성예제 (build.xml , build.properties)

황제낙엽 2007.05.16 10:26 조회 수 : 345 추천:67

1. build.properties
######################################################################################
# for Deploy (location at the Web Service)
######################################################################################
webApp.root   =${basedir}/WebContent
target.root   =${basedir}/Honban_litesneo
source.root   =${basedir}/HonbanSource
######################################################################################
# Basic
######################################################################################
projectName   =litesneo_dev
src.path   =${basedir}/src
lib.path   =${webApp.root}/WEB-INF/lib
env.path    =${webApp.root}/WEB-INF/env
images.path   =${webApp.root}/images
script.path   =${webApp.root}/script
metaFiles.path   =${source.root}/meta
buildFiles.path  =${source.root}/build
etcFiles.path   =${source.root}/etc
envFiles.path   =${source.root}/env


2. build.xml
<?xml version="1.0" encoding="Shift_JIS"?>
<!-- NEC litesNeo System copy process file by Lee Ki Eun (cugain@gmail.com) -->
<project name="litesneo_dev" default="start" basedir="..">
        <property file="build/build.properties"/>
        <target name="start" depends="init, copyfiles" />
        <target name="init">
                <mkdir dir="${target.root}" />
                <mkdir dir="${target.root}/build" />
                <mkdir dir="${target.root}/lib" />
                <mkdir dir="${target.root}/resource" />
                <mkdir dir="${target.root}/src" />
        </target>
        <target name="copyfiles">
                <copy todir="${target.root}/build" verbose="true" preservelastmodified="true">
                        <fileset dir="${buildFiles.path}" />
                </copy>
                <copy todir="${target.root}/lib" verbose="true" preservelastmodified="true">
                        <fileset dir="${lib.path}" />
                </copy>
                <copy todir="${target.root}/resource/env" verbose="true" preservelastmodified="true">
                        <fileset dir="${env.path}" excludes="environment.xml, trace.xml"/>
                </copy>
                <copy file="${webApp.root}/browse.css" todir="${target.root}/resource/html" verbose="true" preservelastmodified="true" />
                <copy file="${webApp.root}/common.css" todir="${target.root}/resource/html" verbose="true" preservelastmodified="true" />
                <copy file="${webApp.root}/dummy.htm" todir="${target.root}/resource/html" verbose="true" preservelastmodified="true" />
                <copy file="${webApp.root}/dummy2.htm" todir="${target.root}/resource/html" verbose="true" preservelastmodified="true" />
                <copy file="${webApp.root}/index.htm" todir="${target.root}/resource/html" verbose="true" preservelastmodified="true" />
                <copy file="${webApp.root}/litesneo.css" todir="${target.root}/resource/html" verbose="true" preservelastmodified="true" />
                <copy todir="${target.root}/resource/images" verbose="true" preservelastmodified="true">
                        <fileset dir="${images.path}" />
                </copy>
                <copy todir="${target.root}/resource/meta" verbose="true" preservelastmodified="true">
                        <fileset dir="${metaFiles.path}" />
                </copy>
                <copy file="${webApp.root}/WEB-INF/web.xml" todir="${target.root}/resource/meta/" verbose="true" preservelastmodified="true" />
                <copy file="${webApp.root}/WEB-INF/weblogic.xml" todir="${target.root}/resource/meta/WebLogic" verbose="true" preservelastmodified="true" />
                <copy todir="${target.root}/resource/script" verbose="true" preservelastmodified="true">
                        <fileset dir="${script.path}" />
                </copy>
                <copy todir="${target.root}/src" verbose="true" preservelastmodified="true">
                        <fileset dir="${src.path}" />
                </copy>
                <copy file="${etcFiles.path}/build.bat" todir="${target.root}" verbose="true" preservelastmodified="true" />
                <copy file="${etcFiles.path}/build.xml" todir="${target.root}" verbose="true" preservelastmodified="true" />
                <copy todir="${target.root}/resource/env" verbose="true" preservelastmodified="true">
                        <fileset dir="${envFiles.path}" />
                </copy>
        </target>
        <target name="remove">
                <delete dir="${target.root}"/>
        </target>
</project>
번호 제목 글쓴이 날짜 조회 수
49 GitHub, SourceTree, Gradle, Eclipse 환경의 java project 생성하기 절차 황제낙엽 2025.08.26 252
48 eclipse 용 gradle web application project (no spring) 생성하기 황제낙엽 2025.05.04 317
47 라이브러리 개발 프로젝트에서 jar 로 build 후 파일을 특정 로컬 경로로 copy 하는 예제 황제낙엽 2025.02.07 294
46 [Gemini] gradle init 으로 프로젝트 생성하는 절차 내용 황제낙엽 2025.01.24 344
45 [ChatGPT] eclipse 의 web project 에서 gradle refresh 때마다 context root 가 초기화 황제낙엽 2024.11.14 375
44 Gretty, Jetty 에서 ssl 적용 황제낙엽 2024.11.12 414
43 [ChatAI] Gradle Wrapper의 버전을 업그레이드하는 절차 황제낙엽 2024.11.12 458
42 eclipse 용 gradle web application sample project (no spring) file 황제낙엽 2024.11.12 374
41 [phind] Gradle 프로젝트를 생성할 때 nested sub project 가 함께 생성되는 이유 황제낙엽 2024.11.12 362
40 IDE(IntelliJ, Android Studio, Eclipse) 에서 build.gradle 에 dependencies 추가후 의존 라이브러리 갱신하기 황제낙엽 2024.10.30 379
39 [POST, 2021.06.28] Gradle을 이용해 Web 어플리케이션을 만들고 빌드하고 실행하기 file 황제낙엽 2023.12.30 330
38 build.gradle 의 dependencies 황제낙엽 2023.12.29 327
37 error: unmappable character 황제낙엽 2023.12.29 326
36 Task :compileJava FAILED 황제낙엽 2023.12.29 349
35 사용자 라이브러리 파일(*.jar) 를 의존성에 추가하는 방법 황제낙엽 2023.12.28 361
34 Windows 에 Gradle 설치 황제낙엽 2023.12.23 347
33 Eclipse, Gradle 프로젝트 생성, Dynamic Web Project 로 변경 황제낙엽 2023.12.23 362
32 Eclipse 에서 Gradle Project 를 WAR 로 배포하기 황제낙엽 2023.12.01 538
31 Eclipse 에서 생성한 Gradle Project 를 리프레쉬 했을때 주의할 점 황제낙엽 2023.11.30 1532
30 Gradle 기본 다지기 1편 file 황제낙엽 2023.11.16 244