-----Original Message-----
From: EJ Ciramella [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 09, 2006 11:10 AM
To: Ant Users List
Subject: Problems with property file task

Hey guys, I'm having a bit of an issue with the propertyfile task.  I
have a build script that captures a date range worth of changes to a
file then use that file as the message body for an email:
 
 
<project name="datetest" default="build" basedir=".">
 <target name="build">
   <property file="build.properties"/>
   <echo message="Grabbing changes between ${datestart} - ${dateend}"/>
   <exec dir="." executable="p4.exe" output="mailbody.txt">
      <arg line="changes -l
//depot/up-svcs/lty/rel/LTY-R25.0/[EMAIL PROTECTED],@${dateend}"/>
   </exec>
   <mail mailhost="<somehost>" 
     subject="Deployment of ${version} complete" 
     messagefile="mailbody.txt">
      <from address="<fromadd>"/ <mailto:[EMAIL PROTECTED]"/> >
      <replyto address="<replytoadd>"/
<mailto:[EMAIL PROTECTED]"/> >
      <to address="<toadd>"/ <mailto:[EMAIL PROTECTED]"/> >
    </mail>
  </target>
   <!-- datestart=2006/05/06\:23\:00 -->
   <propertyfile file="build.properties">
     <entry  key="datestart" type="date" value="${dateend}"
pattern="yyyy/MM/dd:HH:mm:ss"/>
     <entry  key="dateend" type="date" value="now"
pattern="yyyy/MM/dd:HH:mm:ss"/>
   </propertyfile>
   <delete file="mailbody.txt"/>
</project>
 
What's weird is, if I leave in the propertyfile task, the mailbody.txt
file is blank, if I comment it out, I get exactly what I'm expecting.
 
What is propertyfile doing and why is mailbody.txt blank?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to