Bug 70288 - AJDT-enabled plugin projects lead to build problems of dependend plugin projects
Summary: AJDT-enabled plugin projects lead to build problems of dependend plugin projects
Status: RESOLVED FIXED
Alias: None
Product: AJDT
Classification: Tools
Component: Core (show other bugs)
Version: 1.1.11   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Helen Beeken CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-17 09:00 EDT by Martin Lippert CLA
Modified: 2004-08-03 11:56 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Lippert CLA 2004-07-17 09:00:45 EDT
AJDT seems to irritate Eclipse build system when AJDT is used for plugin
projects. I have two plugin projects where one is converted into an AJDT
project. The second plugin project requires the AJDT-enabled plugin project. But
Eclipse 3.0 (final) tells me that my second plugin project cannot be built
correctly because the required first plugin project is not built (red cross for
the second plugin project).

Nevertheless the AJDT-enabled plugin project seems to be build correcty (all
aspects are compiled), but Eclipse seems to think that it is not built.
Comment 1 Andrew Clement CLA 2004-07-19 03:24:22 EDT
Helen, can you take a look?  I'm wondering if that work we did on getting
dependent projects to work is playing up when one of the projects is an AJDT
enabled plugin?
thanks.
Comment 2 Helen Beeken CLA 2004-07-21 06:08:06 EDT
The message is coming from the JavaBuilder.getLastState() method which is 
being called from JavaBuilder.isWorthBuilding(). In the case of two plugin 
projects A and B where B depends on A, A is an AspectJ project and B is a java 
project, when B is built the JavaBuilder.isWorthBuilding() method returns 
false because the AspectJ plugin project A has a null state.

This exact problem was seen with dependencies between projects which weren't 
plugin projects. The way it was fixed in this situation was to change the 
project dependency to a class file dependency. This isn't a nice solution for 
plugin projects, but also doesn't work because it fails at runtime.

As I continue to work on this, an immediate workaround is to convert the 
second project to also be an AspectJ project.
Comment 3 Helen Beeken CLA 2004-07-27 11:58:36 EDT
This is all to do with the state file which isn't there. When an AspectJ 
project is created, a javabuild happens which creates the state file. However, 
later on, in the build method for the AJ project, we trash this file. When the 
java builder looks for it, it isn't there, therefore says that a prerequisite 
project needs to be rebuilt before the current one is built.

The fix is not to trash this file, however, the question is whether this means 
that Eclipse keeps trying to do multiple builds (this was mentioned around the 
time we decided to trash the state file and it seemed to stop doing this). 
This bit needs more testing.
Comment 4 Helen Beeken CLA 2004-08-03 11:56:41 EDT
Fix: Have stopped trashing the state.dat file in the build method and there 
seems to be no adverse building effects.

I have also written a junit test which follows the scenario detailed in this 
bug.

I'm therefore closing this bug and the fix will be available in the 1.1.12 
release of AJDT.