I am using Ant 1.7.1...

Hmm...did does your PATH contain $ANT_HOME/bin as the first portion of the path...for example:

export PATH=$ANT_HOME/bin:$PATH

So, you say it worked on another machine?  Wierd...

Honestly, I'm not sure...  First check the path...and let us know :)



On Wed, 28 Jan 2009, Niklas Johansson wrote:


Hello,

Thank you for your quick reply! Yes, I am sure about the names of the files and 
where they are placed.

Which version of Ant did you use?

Could it be some kind of collision? I have ant 1.6 installed in some kind of 
sun-directory since before. I also have clipse installed and Ant comes whith it 
and is also installed somewhere else. When I try the to run Ant from Eclipse I 
get the same error message. As you can see in my first mail I am using Ant 
1.7.1 so I am sure about that I am using the latest version. I did configure 
both my PATH and ANT_HOME to point to my version 1.7.1.

I also took the information I sent to the mailing list as input for setting up 
exactly the same configuration on another computer in office, I worked 
seemless. I tried both 1.7.0 and 1.7.1 so I assume it is not a bug but has to 
do with my setup. Any suggestions for how to move forward?

Thanks again!

Regards,
Niklas



Date: Tue, 27 Jan 2009 17:52:30 -0500
From: sflo...@nc.rr.com
To: user@ant.apache.org
Subject: Re: Strange problem: "Could not find file" - but it's for sure there


Sorry hit send too soon...

Are you sure the file is there exactly as spelled in your build.xml?

On Tue, 27 Jan 2009, Niklas Johansson wrote:








Hello,

I am bit worried that I am doing something really clumpsy here, but I really 
cannot figure out what I am doing wrong. Hope anyone out there are smarter than 
me to help out because I am really really stuck! Thank you in advance!

I am using Ant version 1.7.1 compiled on June 27 2008.

The problem: When I am running my "ant" command, I am getting following error:

BUILD FAILED
C:\Users\Niklas\SimpleDepotApplWS\SimpleDepotAppl\build.xml:7: Warning: Could 
not find file C:\Users\Niklas\SimpleDepotApplWS\SimpleDepotAppl\flytta.txt to 
copy
.
       at org.apache.tools.ant.taskdefs.Copy.copySingleFile(Copy.java:561)
       at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:400)
.
.
.
My build.xml file is located in 
C:\Users\Niklas\SimpleDepotApplWS\SimpleDepotAppl and looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

   <project name="SimpleDepotAppl" basedir="." default="init">
       <property name="build" value="build"/>

          <target name="init">
           <copy file="flytta.txt" todir="${build}"/>

      </target>
</project>


And this link I copied from the file explorer: 
"C:\Users\Niklas\SimpleDepotApplWS\SimpleDepotAppl\"
Inside it I have the file "flytta.txt" and the directory "build".

This is the full ant -debug output:

C:\Users\Niklas\SimpleDepotApplWS\SimpleDepotAppl>ant -debug
Apache Ant version 1.7.1 compiled on June 27 2008
Buildfile: build.xml
Adding reference: ant.PropertyHelper
Detected Java version: 1.6 in: C:\Program Files\Java\jre1.6.0_04
Detected OS: Windows Vista
Adding reference: ant.ComponentHelper
Setting ro project property: ant.file -> C:\Users\Niklas\SimpleDepotApplWS\Simpl
eDepotAppl\build.xml
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
parsing buildfile C:\Users\Niklas\SimpleDepotApplWS\SimpleDepotAppl\build.xml wi
th URI = file:/C:/Users/Niklas/SimpleDepotApplWS/SimpleDepotAppl/build.xml
Setting ro project property: ant.project.name -> SimpleDepotAppl
Adding reference: SimpleDepotAppl
Setting ro project property: ant.file.SimpleDepotAppl -> C:\Users\Niklas\SimpleD
epotApplWS\SimpleDepotAppl\build.xml
Project base dir set to: C:\Users\Niklas\SimpleDepotApplWS\SimpleDepotAppl
+Target:
+Target: init
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apach
e/tools/ant/antlib.xml. It could not be found.
Setting project property: build -> build
Attempting to create object of type org.apache.tools.ant.helper.DefaultExecutor
Adding reference: ant.executor
Build sequence for target(s) `init' is [init]
Complete build sequence is [init, ]

init:

BUILD FAILED
C:\Users\Niklas\SimpleDepotApplWS\SimpleDepotAppl\build.xml:7: Warning: Could 
not find file C:\Users\Niklas\SimpleDepotApplWS\SimpleDepotAppl\flytta.txt to 
copy
.
       at org.apache.tools.ant.taskdefs.Copy.copySingleFile(Copy.java:561)
       at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:400)
       at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
       at org.apache.tools.ant.Task.perform(Task.java:348)
       at org.apache.tools.ant.Target.execute(Target.java:357)
       at org.apache.tools.ant.Target.performTasks(Target.java:385)
       at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
       at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
       at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
       at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
       at org.apache.tools.ant.Main.runBuild(Main.java:758)
       at org.apache.tools.ant.Main.startAnt(Main.java:217)
       at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
       at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Total time: 0 seconds

Best Regards,
Niklas




What can you do with the new Windows Live? Find out
check out the rest of the Windows Live™.
More than mail–Windows Live™ goes way beyond your inbox.
More than messages
_________________________________________________________________
Show them the way! Add maps and directions to your party invites.
http://www.microsoft.com/windows/windowslive/events.aspx

Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate   http://sourceforge.net/projects/jplate
Chief Architect JavaPIM  http://sourceforge.net/projects/javapim

Architect Keros          http://sourceforge.net/projects/keros

_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx

Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate   http://sourceforge.net/projects/jplate
Chief Architect JavaPIM  http://sourceforge.net/projects/javapim

Architect Keros          http://sourceforge.net/projects/keros
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to