You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Lopez, William" <wi...@eds.com> on 2003/05/19 18:51:09 UTC

Jar error

Hello list:

I'm attempting to jar a group of class files after compiling them...my task
is defined as so:

<jar destfile="${tempBOJar}" update="true" index="true">
  <fileset dir="${bo.build.dir}\Reference" includes="**\*.class" /> 
</jar>

..the following error is returned:
BUILD FAILED
file:E:/CM/Projects/NEW_BUILD_PROCESS/EDS_Build/Integration/jm_depend.xml:30
9: Unable to rename old file to temporary file
	at org.apache.tools.ant.taskdefs.Zip.execute(Zip.java:388)
	at org.apache.tools.ant.Task.perform(Task.java:341)
	at org.apache.tools.ant.Target.execute(Target.java:309)
	at org.apache.tools.ant.Target.performTasks(Target.java:336)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
	at org.apache.tools.ant.Main.runBuild(Main.java:609)
	at org.apache.tools.ant.Main.start(Main.java:196)
	at org.apache.tools.ant.Main.main(Main.java:235)


...I'm guessing that the previous task (compile) still has a "hold" of the
jar file (it is used in the classpath element of the compile task). Any tips
greatly appreciated.

Thanks,
-Will

Re: Jar error

Posted by Stefan Bodewig <bo...@apache.org>.
On Mon, 19 May 2003, William Lopez <wi...@eds.com> wrote:

> ...I'm guessing that the previous task (compile) still has a "hold"
> of the jar file (it is used in the classpath element of the compile
> task).

Tip one would be "don't do that" - i.e. modify the jar you used
before.  Tip two would be to "fork" the compile task.

Stefan

Re: Jar error

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
On Tue, 20 May 2003 02:51 am, Lopez, William wrote:
>
> ...I'm guessing that the previous task (compile) still has a "hold" of the
> jar file (it is used in the classpath element of the compile task). Any
> tips greatly appreciated.
>

Probably true but it is unusual to have a jar in the compile classpath for 
which you are compiling the classes. Try leaving the jar out of the compile 
classpath altogether.

Conor