ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niklas Johansson <nic_s...@hotmail.com>
Subject Strange problem: "Could not find file" - but it's for sure there
Date Tue, 27 Jan 2009 22:37:42 GMT







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
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message