Contents

1 로그파일에 특정 패턴이 표시될 때까지 sshexe 대기
2 bulid.xml 예제
3 예제2 : 웹서비스제작용Ant설정파일
4 Ant build.xml 예제3


1 로그파일에 특정 패턴이 표시될 때까지 sshexe 대기 #

<project default="test">
  <target name="test">
    <sshexec host="${host}" username="${username}" password="${password}" trust="true"
      command="CNT=0; while [ $CNT -lt 1 ] ; do CNT=`grep stop ~/log | wc -l`; sleep 5; done;"/>
  </target>
</project>

2 bulid.xml 예제 #

<?xml version="1.0" encoding="euc-kr"?>
<!--
basedir은 ant가 실행되는 경로
default 속성은 ant가 기본적으로 실행하는 target
target은 ant의 작업단위
-->
<project basedir="." default="all">
    <property file="build.properties"></property>
    <path id="jwsdplib">
        <fileset dir="${jwsdplib-dir}">
            <include name="**/*.jar" />
        </fileset>
        <fileset dir="${tomcatlib-dir}">
            <include name="*.jar" />
        </fileset>
    </path>

    <target name="init">
        <mkdir dir="conf"/>
        <mkdir dir="dist/WEB-INF/classes"/>
    </target>
    
    <target name="javac" depends="init">
        <javac srcdir="${src-dir}" destdir="${bin-dir}">
            <classpath refid="${jwsdplib-dir}"></classpath>
        </javac>
    </target>
    
    <target name="all" depends="javac">
        <echo>프로젝트 작업이 완료되었습니다.</echo>
    </target>
</project>


Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2012-08-31 02:14:20
Processing time 0.0096 sec