ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: possible to open an alert window?
Date Thu, 25 Oct 2007 13:50:33 GMT
Opening the file with notepad is easy:

<property name="logfile" value="log.txt"/>
<macrodef name="log">
    <attribute name="msg"/>
        <echo file="${logfile}" append="true" message="@{msg}${line.separator}"/>
<macrodef name="notepad">
    <attribute name="file" default="${logfile}"/>
        <exec executable="notepad" taskname="notepad">
            <arg value="${logfile}"/>

<log msg="one message"/>
<log msg="another message"/>

But this is only possible on systems where notepad exists (means Windows).

You could also write a java application which shows the message and start that via <java>

You could also write a BuildListener. That could scan the fireMessage() for special words
"alert", store these messages and open a java windows with them on buildFinished().

Just some ideas ...


>-----Urspr√ľngliche Nachricht-----
>Von: Mario Madunic [] 
>Gesendet: Donnerstag, 25. Oktober 2007 15:36
>Betreff: possible to open an alert window?
>Was wondering if it is possible to open an alert window? What 
>I want to do is
>change an alert via <echo> because some users are missing it 
>and have an alert
>window open stating that there is an error log to view. So far 
>I the code checks
>to see the size of an error log and if its file size is 
>greater than 0 then
>output an message on the command window, if not then delete the file.
><length file="error\artError${l_Docset}.txt" 
>property="articleErrorFileSize" />
>  <if>
>    <equals arg1="${reviewErrorFileSize}" arg2="0" />
>    <then>
>      <delete file="error\revError${l_Docset}.txt" />
>    </then>
>    <else>
>      <echo />
>      <echo>There where errors during ingest into the database 
>of the reviews
>for ${l_Docset}</echo>
>      <echo>Please review the following error file:
>      <echo />
>    </else>
>  </if>
>The other idea I have if I can't open an alerter window is to 
>open the file
>using notepad.
>Any help will be appreciated.
>Using ANT 1.7
>Windows XP
>Java 1.6
>Marijan (Mario) Madunic
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message