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

Bug 274842

Summary: J2EEArtifactExportOperation no longer forces a build before export
Product: [WebTools] WTP Java EE Tools Reporter: Carl Anderson <ccc>
Component: jst.j2eeAssignee: Carl Anderson <ccc>
Status: CLOSED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: major    
Priority: P3 CC: david_williams, john.arthorne
Version: 3.1   
Target Milestone: 3.1 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 274838    
Bug Blocks:    

Description Carl Anderson CLA 2009-05-04 11:00:52 EDT
So bug 261225 is the culprit here.  The problem is that Project.internalBuild() now checks the following:

This is a targetted optimization for the case where autobuild is on, the 
client is invoking incremental build, and all builders on a given project respond to auto-build. A build should not be needed in this case.


The problem is that J2EEArtifactExportOperation.runNecessaryBuilders() calls out to Project.build(), which calls to Project.internalBuild(), which in the past would do the Java build (and possibly other builds) for us on demand, waiting for it to finish.  Now, due to this optimization, J2EEArtifactExportOperation calls Project.build(), which calls Project.internalBuild(), which calls Project.shouldBuild(), which returns false, and so we export before the Java build occurs, without .class files.
Comment 1 Carl Anderson CLA 2009-05-04 11:02:15 EDT
EMF hit this same bug and is tracking it with bug 274769
Comment 2 John Arthorne CLA 2009-05-04 11:58:13 EDT
Changing dependency to the platform bug that is causing this problem.
Comment 3 John Arthorne CLA 2009-05-04 13:25:41 EDT
Please see my recent comments in bug 274769. In particular see bug 274769 comment 9 that describes a workaround, and bug 274769 comment 8 that describes a potential problem with your code if you are building a single project without building all prerequisites.
Comment 4 David Williams CLA 2009-05-04 16:07:15 EDT
Note, the suggested work arounds didn't work for us (seemed to cause a hang?). 

We have been unable to reproduce (so far) with normal "end user behavior", but we know of adopters that do a lot of programmatic builds behind the scenes that might be impacted. 

Our current plan, ugly as it is, is to declare M7 with 260 Junit failures and let adopters or higher level projects that depend on WTP come forward and let them request it be fixed in Platform if they need it. 



Comment 5 Carl Anderson CLA 2009-05-05 09:07:19 EDT
This should be fixed in Eclipse 3.5 RC1, but keeping this bug open to make sure the JUnits are indeed fixed.
Comment 6 Carl Anderson CLA 2009-05-21 12:24:52 EDT
The JUnits are fixed.
Comment 7 Carl Anderson CLA 2009-05-21 12:25:16 EDT
Closing.