Summary: | Full Build triggered when using class folder on classpath and custom builder | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Paul Klicnik <pklicnik> | ||||||
Component: | Core | Assignee: | Kent Johnson <kent_johnson> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | major | ||||||||
Priority: | P3 | CC: | david_audel, ernest, haggarty, kathy, Olivier_Thomann | ||||||
Version: | 3.5 | ||||||||
Target Milestone: | 3.5 M7 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Paul Klicnik
2009-03-25 11:34:30 EDT
Increasing severity because of problems this is causing in consuming products So just to be clear, you're adding Project2 as a ClassFolder & not a dependent project ? And neither Project1 or Project2 have any source or bin folders ? (In reply to comment #2) > So just to be clear, you're adding Project2 as a ClassFolder & not a dependent > project ? > Yes, correct. Adding Project2 as a class folder causes the problem. The problem does not occur when it's listed as a dependent project. > And neither Project1 or Project2 have any source or bin folders ? > I guess I should have been more clear here. When I say that Project1 and Project2 are regular java projects, I mean that both projects have at least one java class file. A simple 'HelloWorld' class will be sufficient (only main() with System.out.println). Note that this problem occurs even if Project1 doesn't require any classes from Project2. You could create the HelloWorld class in Project1 and keep Project2 completely empty (no class files) - the problem can be reproduced simply by adding the Project2 class folder. "the problem can be reproduced simply by adding the Project2 class folder." But you're not adding the bin folder of Project2 as a .class folder, you're adding the project itself... and not as a dependent project, as intended. Why? (I'm not saying we shouldn't detect this setup) The obvious easy change is to add the dependent project AS a dependent project. (In reply to comment #4) > "the problem can be reproduced simply by adding the Project2 class folder." > > But you're not adding the bin folder of Project2 as a .class folder, you're > adding the project itself... and not as a dependent project, as intended. > > Why? (I'm not saying we shouldn't detect this setup) > > > The obvious easy change is to add the dependent project AS a dependent project. > For no reason other than it came up during testing. I do agree with you that the test case I outlined is not the most intuitive way to create a project dependency, but I do think it's a valid configuration. As such, we need to be able to handle this scenario. Like I mentioned before, creating a project dependency (in the Java Build Path -> Projects tab) does not cause the problem. We're just trying to cover ourselves in situations where the user adds the class folder. Created attachment 129882 [details]
Proposed patch
Paul, please try this 1 line change to see if it fixes your case.
The change detects when the class folder is just a project & treats it as an output folder.
thx
Patch looks good. Thanks Kent Created attachment 129892 [details]
Proposed patch and testcase
Fix and test released for 3.5M7 Verified for 3.5M7 (Verified by reporter) |