ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "D'Elia, Kevin" <Kevin.D'>
Subject help with network drives and classpaths
Date Tue, 11 Dec 2001 21:23:48 GMT
    I have a problem when trying to use a network drive to access class
files.  Here's the code from the build.xml:
    Note: network_drive is passed in on command line
  <property name="was_lib" value="${network_drive}:/AppServer/lib"/>
. other lines in the file (init, etc.)
  <target name="connect" depends="init">
 <!-- Connect to where the library files are located -->
 <exec executable="net" >
  <arg line="use ${network_drive}: \\server1\ <file://\\server1\>
directory2" />
 <exec executable="net" >
  <arg line="use Z: \\server2\ <file://\\server2\> directory2" />
  <target name="compile" depends="connect">
    <!-- Compile the java code from ${source} into ${classes} -->
    <javac srcdir="${source}"
  <target name="disconnect" >
 <!-- Clean up from earlier connections -->
 <exec executable="net" >
  <arg line="use ${network_drive}: /delete" />
 <exec executable="net" >
  <arg line="use Z: /delete" />
  <target name="backup" depends="compile">
  <target name="build" depends="backup">
  <target name="deploy" depends="disconnect">
    <!-- rest of target "deploy" -->
I'm on Windows NT 4.0SP6...the problem is this:  I can connect all right,
but when the disconnect task runs, I get a message about opened and search
paths which are still in use and the disconnect task items fail (no
disconnect)...I have tracked this down to being a problem with the fact that
the networked drives are referenced in the classpath setting for javac, and
Ant is holding on to that so that when I try to disconnect, it thinks that I
still have need for these connections - which I don't..I have tried several
different ways to get around this (build.sysclasspath, antcall, ant
-verbose) but I haven't seen anything useful, nor has anything
do I get around this seeming restriction?
Thanks in advance to all who respond..
Kevin D'Elia

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message