ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Lyon" <m...@stargus.com>
Subject RE: UNC paths
Date Thu, 12 Jul 2001 13:38:47 GMT
Bill,

Thanks for the insight. I can also do a dir on my remote directory, but I
can't actually cd to it from cmd.exe. In any case, I was actually trying to
pass in a UNC path as the destdir parameter of my javadoc task as per the
following example:

<property name="javadoc.destdir" value="\\Dune\root\engdoc\javadoc"/>

<target name="doc">
	  <javadoc packagenames="com.biz.foo.*"
	           sourcepath="${src}"
	           destdir="${javadoc.destdir}"
	           author="true"
	           version="true"
	           use="true"
	           windowtitle="Foo"
	           bottom="Copyright 2001, Biz, Inc. All Rights Reserved."
	        <group title="Foo_Group_1" packages="com.biz.foo"/>
	  </javadoc>
</target>

Ant doesn't dig this; I get some funky error messages like the following:

doc:
ootengdocjavadoc: The filename, directory name, or volume label syntax is
incorrect
  [javadoc] Generating Javadoc
  [javadoc] Javadoc execution
  [javadoc] javadoc: Destination directory not found C:\Dune
  [javadoc] ootengdocjavadoc
  [javadoc] 1 error

...but if I map a network drive to the \\Dune\root\engdoc directory as Drive
(J:) and then set javadoc.destdir to J:\javadoc, it works fine, which is an
acceptable workaround for now. Alternately, I could probably add a <copy/>
task within my "doc" target to upload the javadoc files to the desired
location as well, as per your example below. Now that I think about it,
that's not a bad idea, because it saves me from having to put any evil drive
letters in my buildfile ; )

Cheers,

Matt

-----Original Message-----
From: Bill.J.Fellows@mail.sprint.com
[mailto:Bill.J.Fellows@mail.sprint.com]
Sent: Wednesday, July 11, 2001 6:45 PM
To: ant-user@jakarta.apache.org
Subject: RE: UNC paths


Just out of curiosity, what in regards to UNC is not kosher with the
command prompt?

If I share c:\bin as bin
and then do a dir \\spr121015\bin
it shows me the same info as dir c:\bin

It appears you can get some UNC support at least for the copy task
(which is what your question was about, no?)

<project name="test" default="copy" basedir=".">
  <property name="unc" value="\\spr121015\bin" />

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

  <!--
   I also work
  -->  <target name="copyUnc">
     <copy file=".\build.xml" todir="\\spr121015\bin" />
  </target>

</project>

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

/bill

-----Original Message-----
From: matt [mailto:matt@stargus.com]
Sent: Wednesday, July 11, 2001 3:07 PM
To: ant-user
Cc: matt; holtdl
Subject: FW: UNC paths


Diane,

Feel free to disregard the previous question. I was lacking on caffeine
intake, but the obvious workaround of mapping the network drive and
setting
that as the destdir for javadoc is good enough for now. Since one of
Ant's
best features is it's ability to allow you to work cross-platform, I
can't
imagine there being a lot of desire to add UNC path support.

Cheers,

Matt

-----Original Message-----
From: Matt Lyon [mailto:matt@stargus.com]
Sent: Wednesday, July 11, 2001 3: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


Mime
View raw message