Hi All
I'm new to ant.. I have a build file that does this to start with
[target name="init"]
[property name="Jars" value="../../camsjar" /]
[property name="Src" value="../src" /]
[property name="Dest" value="../../deploycams/camsclasses" /]
[property name="DeployDir" value="../../deploycams" /]
[/target]
[target name="mkdir" depends="init"]
[delete dir="${Jars}" /]
[mkdir dir="${Jars}" /]
[mkdir dir="${Dest}"/]
[mkdir dir="${DeployDir}" /]
[/target]
[target name="build" depends="mkdir"]
[javac srcdir="${Src}/java" destdir="${Dest}"]
[classpath]
[pathelement location="/jdk1.3/jre/lib/ext/classes12.zip"/]
[pathelement location="${Src}" /]
[/classpath]
[/javac]
[/target]
(The xml tages have been changed to [ and ])
The build fails on the delete dir in the mkdir section.. It says :
init:
mkdir:
[delete] Deleting directory C:\cvs\work\camsjar
[delete] Deleting C:\cvs\work\camsjar\cams.jar
BUILD FAILED
C:\cvs\work\cams\bin\..\deployment\build.xml:13: Unable to delete file C:\cvs\wo
rk\camsjar\cams.jar
at org.apache.tools.ant.taskdefs.Delete.removeDir(Delete.java:348)
at org.apache.tools.ant.taskdefs.Delete.execute(Delete.java:290)
at org.apache.tools.ant.Task.perform(Task.java:217)
at org.apache.tools.ant.Target.execute(Target.java:184)
at org.apache.tools.ant.Target.performTasks(Target.java:202)
at org.apache.tools.ant.Project.executeTarget(Project.java:601)
at org.apache.tools.ant.Project.executeTargets(Project.java:560)
at org.apache.tools.ant.Main.runBuild(Main.java:454)
at org.apache.tools.ant.Main.start(Main.java:153)
at org.apache.tools.ant.Main.main(Main.java:176)
Total time: 1 second
ie, if the jar file (that a previous run of ant created when it ran by manually
deleting the Jar directory) exists, it cannot delete it.
I'm running ant 1.4.1 on Win NT with jdk1.3
Any help would be appreciated.. Basically what I need is to delete all previously
deployed directories, create the directories and then build with ant.
Thanks (yes.. in advance)
- Mak
_____________________________________________________________
Get email for your site ---> http://www.everyone.net
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>