Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 330502

Summary: Ant can't read "antlib.xml" from JAR added to Ant's runtime, if the JAR is updated while the workspace is running
Product: [Eclipse Project] Platform Reporter: Isaac Shabtay <isaac>
Component: AntAssignee: Platform-Ant-Inbox <platform-ant-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: 1983-01-06, sarika.sinha
Version: 4.1Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Isaac Shabtay CLA 2010-11-17 13:56:57 EST
Build Identifier: 20100617-1415

May seem too long for a summary but that's the shortest I could do.

Steps to reproduce:

1) Create a general project containing:

   *) A JAR file containing an antlib

   *) An Ant buildfile that reads uses the JAR by reading the antlib through a "taskdef" clause

2) Add the JAR to Ant's runtime (Window -> Preferences -> Ant -> Runtime -> Global Entries).

3) Run your buildfile, things should run normally.

4) Update the JAR file somehow (in my case, what I do is invoke an Ant build that rebuilds the JAR and places the resulting file in exactly the same location).

5) Attempts to run your buildfile again.

What I get in this stage is:

Unable to find jar:file:<path-to-my-jar>!<path-to-my-antlib>

I did some skim investigation. It seems like, on Windows, Eclipse maintains an open file handle to each JAR file being added to the "Global Entries" pane. I'm suspecting that refreshing this file makes Ant use an outdated handle, then breaking.

Reproducible: Always
Comment 1 Eclipse Genie CLA 2019-11-05 12:02:28 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Sarika Sinha CLA 2019-11-05 20:42:22 EST
Someone interested in fixing this?