build.xml
<project name="test" default="all" basedir=".">
<property environment="env" />
<property name="jboss.dev.home" value="c:\test2" />
<property name="jboss.real.home" value="c:\test2" />
<property name="hudson.home" value="C:\test" />
<property name="ftp.server" value="localhost" />
<property name="ftp.userid" value="antuser" />
<property name="ftp.pw" value="antuser1" />
<target name="copy">
<echo message="Copy ready" />
<copy todir="${jboss.dev.home}">
<fileset dir="${hudson.home}">
<include name="**/*" />
</fileset>
</copy>
</target>
<target name="ftp">
<echo message="ftp : ${ftp.server}/${ftp.userid}" />
<ftp server="${ftp.server}" remotedir="/" userid="${ftp.userid}" password="${ftp.pw}" port="21" Passive="yes" depends="yes">
<fileset dir="${hudson.home}">
<include name="**/*" />
</fileset>
</ftp>
</target>
<target name="all" >
<antcall target="copy" />
<antcall target="ftp" />
</target>
</project>
※ BUILD FAILED 조치 방법
Buildfile: C:\eGovFrameDev-2.6.0-FullVer\workspace\sims\build.xml
all:
copy:
[echo] Copy ready
[copy] Copying 1 file to c:\test2
ftp:
[echo] ftp : owthit.iisweb.co.kr/ii_owthit
BUILD FAILED
C:\eGovFrameDev-2.6.0-FullVer\workspace\sims\build.xml:33: The following error occurred while executing this line:
C:\eGovFrameDev-2.6.0-FullVer\workspace\sims\build.xml:24: Could not create type ftp due to java.lang.NoClassDefFoundError: org/apache/commons/net/ftp/FTPClientConfig
Total time: 401 milliseconds
위와 같이 FTP 실패 일경우 Ant home에 common-net 최신 파일 lib에 추가
1. 첨부된 파일 ant lib 에 복사(C:\eGovFrameDev-2.6.0-FullVer\eclipse\plugins\org.apache.ant_1.8.3.v201301120609\lib)
2. 이클립스 > Window > Preperences > Ant > Runtime Classpath에 등록
'나 어제 배웠다 > Eclipse' 카테고리의 다른 글
메이븐(Maven) WEB-INF/lib jar 파일 추가 (0) | 2013.11.13 |
---|---|
메이븐(maven) 빌드시 tools.jar 못찾는 오류 (0) | 2013.09.13 |
Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core" (0) | 2013.09.13 |
HTML5 Aptana Plug-in Install (0) | 2012.08.23 |
Eclipse에 Class Diagram 플러그인 설치 (0) | 2010.08.26 |