ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: unable to use user properties inside the Javascript task.
Date Sat, 22 Jun 2002 03:31:59 GMT
I didn't get into tracking down whether doodle.poodle should actually be
getting set -- instead, I just got the gist of what you were looking to
do, and I'd shrink it all down (the checking for the file part) to:

  <target name="checkForChanges" depends="script">
    <echo>changes = ${changes}</echo>
    <!-- do whatever you do when a changes.txt file exists -->
  </target>

  <target name="script">
    <script language="javascript"> <![CDATA[
      importClass(java.io.File);
      file = new File("changes.txt");
      for( ;; ) {
        if( file.exists() ) {
          project.setNewProperty("changes", "true");
          break;
        } else { java.lang.Thread.sleep(5000); } // give it a rest :)
      }
      ]]>
    </script>
  </target>

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message