ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill.J.Fell...@mail.sprint.com
Subject RE: UNC paths
Date Wed, 11 Jul 2001 23:10:44 GMT
For what it's worth, all of the following tests work on my machine

C:\>java -version
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)

C:\>ant -version
Ant version 1.3 compiled on May 3 2001

<?xml version="1.0"?>
<project name="Ant" default="main" basedir=".">
  <property name="src" value="." />
  <property name="unc" value="\\spr121015\bin" />
  <property name="cnu" value="//spr121015/bin" />
  <target name="main" depends="unc, varUnc, cnu, varCnu" />

  <target name="unc">
     <copy file=".\build.xml" todir="${unc}" />
  </target>

  <target name="varUnc">
     <copy file=".\build.xml" todir="\\spr121015\bin" />
  </target>

  <target name="cnu">
     <copy file=".\build.xml" todir="${cnu}" />
  </target>

  <target name="varCnu">
     <copy file=".\build.xml" todir="//spr121015/bin" />
  </target>
</project>


-----Original Message-----
From: shankar [mailto:shankar@intruvert.com]
Sent: Wednesday, July 11, 2001 5:55 PM
To: ant-user
Cc: shankar; holtdl
Subject: RE: UNC paths


Again, the answer depends on whether you (or rather, the task in 
question) are interpreting that path inside Java code, or if you are 
spawning a shell to do something with that path.
The default shell (CMD.EXE) on Windows NT insists on seeing the UNC 
path with backslashes () only. I.e. it only wants \host.
On the other hand, inside the kernel, NT is perfectly happy with both 
*forward* and backward slashes. So a "UNC" path of the form 
//host/resource/path is quite usable from within applications, or even 
alternate shells. 
You can see this for yourself, by just opening a UNC of the form 
"//host/resource/path" as a FileInputStream, and reading its contents..
However, *some* of the Ant tasks seem to spawn a native shell to do 
their work (don't quite know which yet), and those may not work with 
forward-slashed UNCs. But most tasks should work just fine.
(If you are passing in UNCs to ant from the command line on Windows NT, 
you can *still* use forward-slashes. CMD.EXE is only picky about its 
own direct file or path arguments - arguments sent to spawned children 
can contain forward slashes..)
> -----Original Message----- 
> From: Matt Lyon [mailto:matt@stargus.com] 
> Sent: Wednesday, July 11, 2001 12:58 PM 
> To: ant-user@jakarta.apache.org 
> Cc: holtdl@yahoo.com 
> Subject: UNC paths 
> 
> 
> Diane, 
> 
> Thanks for the response. 
> 
> I do have another question, however. I noticed that in an  
> earlier post you 
> had asked if Ant knows how to handle UNC path conventions, 
> like a "\" in 
> paths: 
> 
> http://marc.theaimsgroup.com/?l=ant-user&m=97241025908510&w=2 
> 
> Did you ever get an answer on that? 
> 
> I am trying to specify a UNC path for the destdir parameter 
> in my javadoc 
> task, but Ant appears to just be ignoring the first slash in 
> the UNC path 
> and bonking. I could write an ftp task to handle uploading 
> the javadocs to 
> the remote machine, but I am just being lazy and looking for 
> an easy way to 
> do it. Since cmd.exe (a.k.a. the good ol' DOS prompt window) does not 
> support UNC paths, it's no surprise that Ant doesn't either. 
> Just curious... 
> 
> Cheers, 
> 
> Matt 
> 
> -----Original Message----- 
> From: Diane Holt [mailto:holtdl@yahoo.com] 
> Sent: Wednesday, July 11, 2001 12:56 PM 
> To: ant-user@jakarta.apache.org 
> Subject: Re: Formatting HTML text using javadoc "bottom" parameter 
> 
> 
> --- Matt Lyon <matt@stargus.com> wrote: 
> > bottom="<i>Copyright ) 2000 Dummy Corp. All Rights Reserved.</i>">

> 
> The example has been corrected in CVS. See: 
> http://jakarta.apache.org/cvsweb/index.cgi/jakarta-ant/docs/ma 
nual/CoreTasks 
/javadoc.html?rev=1.10&content-type=text/vnd.viewcvs-markup 
Click on "(as text)" to see the formatted file. 
Diane 
===== 
(holtdl@yahoo.com) 



__________________________________________________ 
Do You Yahoo!? 
Get personalized email addresses from Yahoo! Mail 
http://personal.mail.yahoo.com/ 


Mime
View raw message