2011-06-30 23 views
6

ANTタスクを使用してポートが開いているかどうかを確認できますか?ANTでポートが開いていることを確認してください

フレックスタスクを実行する必要がありますが、このタスクを開始する前に、別のフレックスユニットタスクが実行されておらず、目的のポートをブロックしているかどうかを確認する必要があります。

ラファウ

答えて

9

はアリソケット条件を使用して、任意の提案をいただき、ありがとうございます。

<target name="check-port" description="Check whether Tomcat is running"> 
    <echo message="Checking whether Tomcat is running"/> 
    <condition property="tomcat.running"> 
     <socket server="${tomcat.host}" port="${tomcat.port}"/> 
    </condition> 
</target> 

http://ant.apache.org/manual/Tasks/conditions.html

関連する問題