ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
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
https://issues.apache.org/bugzilla/show_bug.cgi?id=45739





--- Comment #10 from Stefan Bodewig <bodewig@apache.org>  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 Test.java as before

x.xml now is

<project basedir=".">
  <echo>${user.dir}</echo>
  <echo>${basedir}</echo>
  <scp file="x.xml" todir="stefan:PASS@HOST:/home/stefan"/>
</project>

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
.;..\OSS\ant\build\lib\ant.jar;
..\OSS\ant\build\lib\ant-launcher.jar;..\OSS\ant\build\lib\ant-jsch.jar;..\OSS\a
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.

BUILD SUCCESSFUL
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: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message