Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318160 - Impossible to remove referenced library
Summary: Impossible to remove referenced library
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.8 M7   Edit
Assignee: Jay Arthanareeswaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-28 06:37 EDT by MH CLA
Modified: 2012-04-30 04:37 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MH CLA 2010-06-28 06:37:39 EDT
Build Identifier: 20100617-1415

There is an (old) jar in my Java project as "Referenced Library". I wan't to remove it but the context menu "Delete" function is disabled (ghosted) - even though the project's "Java Build Path" does not have this JAR anymore!

Reproducible: Always

Steps to Reproduce:
1. Remove JAR from Project's "Java Build Path"
2. Try to delete the JAR from the Package Explorer project "Referenced Libraries" node
3.
Comment 1 Jay Arthanareeswaran CLA 2010-06-28 06:41:09 EDT
Does refreshing the project or closing and opening the project help?
Comment 2 Ayushman Jain CLA 2010-06-28 07:43:26 EDT
Jay, a similar bahavior is seen in bug 310764. Referenced libraries continue to show deleted jars. It might help to check if this is the bahaviour in all cases or only for bad JAR files.
Comment 3 Olivier Thomann CLA 2010-06-28 07:49:48 EDT
This should be investigated for 3.6.1.
Comment 4 MH CLA 2010-06-28 15:53:28 EDT
I guess it has something to do with the new feature tha suddenly the JARE as some comment "from class-path of xyz.jar").  I found out, that the whole project doesn't compile anymore when a referenced library has a manifest with a class-path setting that has an entry of a JAR that doesn't exist anymore! I had to change the manifest file (remove the old JAR in the Class-Path), make a JAR of the referenced lib and copy it into my project.

With the former Eclipse version, the manifest Class-Path didn't matter for Eclipse.
Comment 5 Jay Arthanareeswaran CLA 2010-06-29 01:26:51 EDT
Investigating.
Comment 6 Jay Arthanareeswaran CLA 2010-06-29 06:11:33 EDT
(In reply to comment #4)
> I guess it has something to do with the new feature tha suddenly the JARE as
> some comment "from class-path of xyz.jar").  I found out, that the whole
> project doesn't compile anymore when a referenced library has a manifest with a
> class-path setting that has an entry of a JAR that doesn't exist anymore! I had
> to change the manifest file (remove the old JAR in the Class-Path), make a JAR
> of the referenced lib and copy it into my project.
> 
> With the former Eclipse version, the manifest Class-Path didn't matter for
> Eclipse.

If you are not setting source attachment path or avadoc location path for any of the referenced libraries, the behavior should be almost similar to 3.5. I think it would help if you can attach the zipped project to the bugzilla.
Comment 7 Jay Arthanareeswaran CLA 2010-07-15 03:29:42 EDT
Alright, I somewhat misunderstood the problem reported. This is the behavior I am seeing with eclipse 3.6 (build I20100608-0911):

When I add a JAR that references a non-existent JAR via it's MANIFEST to a project's build path, the referenced JAR is not shown in the referenced libraries. However, when I put the referenced JAR in the folder and close/reopen the project, it is included in the package explorer.

I do not see any errors on missing JAR or resultant compilation errors.

Markus, can you please confirm if this behavior is correct?
Comment 8 Jay Arthanareeswaran CLA 2012-04-06 01:54:06 EDT
I gave it another try with 3.8 M6 but don't see any compilation error whatsoever. Runtime error, yes. This is a very old bug and haven't heard from since long. Should it occur again, please reopen.
Comment 9 Srikanth Sankaran CLA 2012-04-30 04:37:35 EDT
Using Build id: I20120429-2000, I could see the behavior described
in comment# 0 only for external jars. For jars that reside inside
the work space, I could see the delete menu item and also use it to
delete the entry concerned.

The delete menu items does appear grayed out for external jars, but
I think that is the right behavior.

Verified for 3.8 M7 using I20120429-2000