You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Lasher, James L" <ji...@hp.com> on 2005/09/16 07:09:03 UTC

why do I get a java FileNotFound when defining a property

I have defined a property:

<property name="mypropname" value="/opt/odi/success.txt"/>

If the /opt/odi/success.txt file does not yet exist, I get a
java.io.FileNotFound Exception and the build fails.

Is there any way around this?  I'd like to just set this property up
with the name of a file that will exist later.  I imagine I could wait
to set this up until after I know the file has been created, but why
won't Ant let me do it the way I'd like?

Thanks,
-jim-

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


Re: why do I get a java FileNotFound when defining a property

Posted by Ben Stringer <be...@burbong.com>.
On Fri, 2005-09-16 at 01:09 -0400, Lasher, James L wrote:
> I have defined a property:
> 
> <property name="mypropname" value="/opt/odi/success.txt"/>
> 
> If the /opt/odi/success.txt file does not yet exist, I get a
> java.io.FileNotFound Exception and the build fails.
> 
> Is there any way around this?  I'd like to just set this property up
> with the name of a file that will exist later.  I imagine I could wait
> to set this up until after I know the file has been created, but why
> won't Ant let me do it the way I'd like?

Hi Jim,

I don't see this problem - I tried it out on Ant 1.6.1 and 1.6.5 on
Linux. Which version are you using?

I used this simple target to test:

  <target name="test">
    <property name="mypropname" value="/opt/odi/success.txt"/>
  </target>

and it runs with no errors.

Cheers, Ben



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