Summary: | [buildpath] "java build path" jar fentries are "lost" without re-import | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Peter Kennard <peterk> | ||||||
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> | ||||||
Status: | VERIFIED DUPLICATE | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | P3 | CC: | Olivier_Thomann, peterk | ||||||
Version: | 3.4 | ||||||||
Target Milestone: | 3.5 M2 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Peter Kennard
2008-08-30 20:47:15 EDT
Step 7 made the errors go away for me. Note that step 6 will not refresh external jars. It will just delete the contents of the output folders. So do you have more details on how to reproduce this problem? Maybe attaching an example project with an example ant script that reproduces the problem would help. Created attachment 112520 [details]
zip file of repeatable test case
see comment in bug - zip file contains workspace and projects which will reproduce the problem.
Sorry, but I still cannot reproduce. Here are the steps I followed: 1. Unzipped zip file from comment 2 to "C:\" 2. Started SDK I20080617-2000 with "-data C:\bug245779workspace" 3. Selected both projects and hit refresh (F5) 4. Noted that "pktest" had 2 build path errors: Description Resource Path Location Type Project 'pktest' is missing required library: 'C:\Tomcat6.0\lib\catalina-ant.jar' pktest Build path Build Path Problem Project 'pktest' is missing required library: 'C:\Tomcat6.0\lib\servlet-api.jar' pktest Build path Build Path Problem 5. Within the Package Explorer, expanded "airoJars" and deleted all .jar and .zip files 6. Selected "pktest" and hit refresh (F5) 7. Noted that "pktest" had several build path errors because of the deleted jars 8. Unzipped all .zip and .jar files from "bug245779workspace\airoJars\" to "C:\bug245779workspace\airoJars" 9. In Package Explorer, selected "pktest" and hit refresh (F5) 10. Noted that the errors from step 7 were gone Can you please follow accurately those steps and tell me if you can reproduce? If your steps are different, what is the difference? Pardon missing classpath items. They must have been from CATALINA_HOME From eclipse, you have to, - unzip the test workspace. - before youopen the workspce externally from eclipse so you can re-import the project using eclipse via "subclipse" and not alter the state of the unzipped workspace, (pardon: delete the existing ".svn" directory) and check the project "airoJars" into subversion. - delete the unzipped workspace and unzip it again if you checked in the project "airoJars" using eclipse/subclipse or in-situ from command line. - After opening the freshly unzipped original workspace with a succesful build, in the package explorer, right click on the project "airoJars" and "delete" the *PROJECT* from the workspace. (as opposed to deleting only it's contents), make sure the "delete project contents from disk" check box is selected. - now "clean" all projects (you will get missing library errors) - close eclipse. - re-open eclipse and re-open the workspace you will now get "missing required library" errors after the build. - *Import* the project "airoJars" from Subversion using eclipse/subclipse. (from where you previously checked it in) ie: right click on package explorer->Import, SVN->"Checkout project from SVN" (it will import and put the project "airoJars" back to where it was) - At this point refresh and clean will not clear the missing required library errors. NOTE: it was only by following this exact sequence I was able to reliably replicate the funky state where a rebuild will not clear the errors with this culled out version of our workspace. Sorry Peter, I keep re-reading your explanations but I don't see how I can reproduce the problem. So could you please start from the steps I gave you in comment 3, and tell me if those steps reproduce the problem for you. If they don't, please rewrite those steps so that I can reproduce the problem. Created attachment 113005 [details]
Improved reproduceable sample with no inital build errors
see added comment on how to reproduce bug
> Sorry, but I still cannot reproduce. Here are the steps I followed: > Can you please follow accurately those steps and tell me if you can reproduce? > If your steps are different, what is the difference? I attached a second zip file where the initial error has been corrected. The only difference is I added the missing jar file so there are no initial build errors. On differences to reproduce See below edited procedure: > 1. Unzipped zip file from comment 2 to "C:\" > 2. Started SDK I20080617-2000 with "-data C:\bug245779workspace" > 3. Selected both projects and hit refresh (F5) > 4. Noted that "pktest" had 2 build path errors: > Description Resource Path Location Type > Project 'pktest' is missing required library: > 'C:\Tomcat6.0\lib\catalina-ant.jar' pktest Build path Build > Path Problem > Project 'pktest' is missing required library: > 'C:\Tomcat6.0\lib\servlet-api.jar' pktest Build path Build > Path Problem #4 has been corrected with the new zip file. > 5. Within the Package Explorer, expanded "airoJars" and deleted all .jar and > zip files Step #5 should be: #5a From the package explorer, highlight the project airoJars and *right click* on the project airoJars. #5b from the resulting popup context menu select "X Delete" a confirmation requestor will come up. #5c select the checkbox [x] Delete project contents from disk (cannot be undone) #5d Click [OK] > 6. Selected "pktest" and hit refresh (F5) > 7. Noted that "pktest" had several build path errors because of the deleted > jars At this point with above procedure the project airoJars does not exist, and the "problems" window shows the (10) required libraries not found errors. > 8. Unzipped all .zip and .jar files from "bug245779workspace\airoJars\" to > "C:\bug245779workspace\airoJars" NO - do not do this - Step #8 should be #8a - Right click on package explorer #8b - Select "Import" a resultant requestor pops up. #8c - Select "General->Existing projects into workspace" #8d - click [Next] a resultant requestor pops up #8e - Select "(*) Select Archive File" #8f - browse to and select the zip file you unpacked the sample workspace from. "C:\bug245779example2.zip" #8g - In the project window select *ONLY* the project "airoJars" and click on "Finish" > 9. In Package Explorer, selected "pktest" and hit refresh (F5) > 10. Noted that the errors from step 7 were gone At this point all the required jar files are present on the file system, but instead of #10 the libraries are not found even after repeated refresh and rebuild operations and afre closing and reopening eclipse. Note: there are other scenarios that have caused this to occur but the delete and re-import procedure always causes the problem here. Peter K. (In reply to comment #7) Thanks Peter. I was able to reproduce with those steps. The good news is that it is fixed with 3.5M2 (ie. I can no longer reproduce with I20080918-0100). After more investigation, it appears that the fix for bug 244849 actually fixed this problem (ie. without the fix for bug 244849, I can reproduce the problem, but with the fix for bug 244849, I cannot reproduce the problem). So I'm closing this bug as a dup of bug 244849. *** This bug has been marked as a duplicate of bug 244849 *** This is good it has been one of those things like windows rearraging icons :) After step 10, no errors are reported. Verified for 3.5M3 using I20081027-1800 |