Bug 226735 - Referenced library goes missing after editing .classpath and full rebuild
Summary: Referenced library goes missing after editing .classpath and full rebuild
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M7   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-11 14:04 EDT by Brian Young CLA
Modified: 2008-04-29 06:58 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Young CLA 2008-04-11 14:04:24 EDT
Build ID:  I20080330-1350

Steps To Reproduce:
- Start Eclipse Windows with a new workspace
- Create a Java project called TestProject
- In Windows file explorer copy a jar file into TestProject folder.  Let us call the jar file testLib.jar
- Right mouse click TestProject in the Package Explorer and select Build Path > Configure Build Path
- Under the Libraries tab press "Add external jars..." and select testLib.jar and save
- Note that testLib.jar gets added in the Package Explorer under "Reference Libraries" area
- In Windows file explorer change the name of testLib.jar to be testLib-2.jar
- Using Windows notepad, edit the .classpath file and change the reference to testLib.jar to be testLib-2.jar and save
- Select Project > Clean to performe a full build
- Note that the Reference Libraries shows up as empty


More information:
I have reproduced this in Eclipse 3.2.2 as well as 3.3
Comment 1 Jerome Lanneluc CLA 2008-04-15 11:46:06 EDT
Clean is a builder operation. It doesn't refresh resources modified externally to the workspace. If you press F5 after you edited the .classpath file, then testLib-2.jar appears under Referenced Libraries.

Closing. Please reopen if I missed something.
Comment 2 Maxime Daniel CLA 2008-04-29 06:58:32 EDT
Agreed. The same is true if, for example, you copy the source file of a missing class to the appropriate directory using the underlying tools (say the explorer, or a plain COPY command) and you do not refresh before clean-building: the class is still missing, because as long as the newly copied resource is unknown to the workspace, it remains unnoticed by builders.

Verified for 3.4 M7 using build I20080427-2000.