ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 45739] Problems with BaseDir when the ant is started as Java library from Java Application
Date Fri, 05 Sep 2008 09:06:20 GMT

--- Comment #10 from Stefan Bodewig <>  2008-09-05 02:06:20 PST ---
(In reply to comment #8)
> > Yes, user.dir may be read in some places but neither is directly related to
> > setting the basedir.
> I am not agree with that again. The true is that when I set this value my
> problem is solved which means that somewhere user.dir is used for setting of
> basedir.

That somewhere most likely is the Java class library when it it asked to
resolve File(".").

(In reply to comment #9)

> The build xml file is not full. Place one file inside like that:

Oh yes, it is.  It shows that basedir is set correctly.

>     <scp file="test.txt" todir="${username}:${password}@${host}:/home/bc"/>

If you really need that, OK.  Same as before

x.xml now is

<project basedir=".">
  <scp file="x.xml" todir="stefan:PASS@HOST:/home/stefan"/>

C:\Temp>dir x.xml
 Volume in Laufwerk C: hat keine Bezeichnung.
 Volumeseriennummer: 1027-F564

 Verzeichnis von C:\Temp

Datei nicht gefunden

C:\Temp>c:\j2sdk1.4.2_18\bin\java.exe -classpath
nt\lib\optional\jsch-0.1.29.jar Test ..\x.xml
user.dir is C:\Temp
args[0] is ..\x.xml
Buildfile: C:\x.xml
     [echo] C:\Temp
     [echo] C:\
      [scp] Connecting to HOST:22
      [scp] done.

Total time: 2 seconds

The "Datei nicht gefunden" as response to "dir" above means "file not found"
- have to live with a German OS, sorry - and shows that scp would have failed
if the file was resolved according to user.dir.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message