ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Coral Featherstone <>
Subject creating dirs when they dont exist
Date Thu, 29 May 2003 10:39:07 GMT
Hi All,
I've combed the archives but I just can't seem to find a solution.

I need to create directories if they don't exist.
Mkdir fails if the directory does exists. Not calling mkdir makes several
other tasl fail (jar, ear etc)

I've tried
   <target name="checkdir.bck">
  	<available file="${BACKUP_DEST}" property="checkdir.bck.isElusive"/>
  <target name="mkdir.bck" depends="checkdir.bck"
   	<mkdir dir="${BACKUP_DEST}"/>

But obviously checkdir.bck.isElusive never gets set
Ive tried
 <target name="checkdir.webdoc">
      	<pathconvert pathsep="${path.separator}" dirsep="${file.separator}"
property="checkdir.webdoc.isElusive" refid="emptyfileset"/>
      <condition >
          <equals arg1="${emptyfileset}" arg2=""/>
  <target name="mkdir.webdoc" depends="checkdir.webdoc"

This works for files not directories and pathconvert fails when the
directory is missing.

<touch> doesn't work because sometimes there is more that one directory in
the hierarchy that is missing

Am I missing something obvious???

View raw message