3.필퍼링-해킹공격9단계 › WindowsXPShutdown명령 › vi.cmd › BestPractices › vmware › Ant
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>