Community
Participate
Working Groups
Project A is setup to use the ANT builder and builds without problem. Project B uses the JDT builder and depends on project A. When I initially setup project B, I get the following error in the problems view: "The project cannot be built until its prerequisite A is built. Cleaning and building all projects is recommended" So I did clean all the projects, which triggered a complete rebuild. Project A built without problem again, but project B still has the error.
Whenever the JavaBuilder builds a project, it produces a build state that tells dependent projects what has changed. Since Project A is build by Ant instead, we don't have the necessary build state to build Project B. You have 2 options: - build all of your projects that dependent on project A with Ant - change Project B to import A's bin/output folder as a class folder (see Properties -> Java Builder Path -> Libraries -> Add Class Folder).
I have been working with the second solution for a while, and now with the first, but I think Eclipse should handle this situation more elegantly. I see two solutions: - Don't allow a project to depend on a non JDT-built project - Provide more configuration options to the ANT builder (or to the project dependency entry) so that the user can tell eclipse where is(are) the output folder(s). And eclipse should be able to determine if an ant build succeeded or failed (I think it already can) The current behaviour is quite misleading.
I strongly agree that the current behaviour is not satisfactory. People will waste time trying to understand what is going on, like Guillaume and I did, and will conclude eclipse is buggy. I don't think WORKSFORME is an appropriate resolution. A minimal solution would be to detect this situation (project with JDT builder depending on project with no JDT builder) and display an appropriate message. Actually, I think in this case it would make sense to just assume the non-JDT build succeeded, and go on with the current project. At least, when there are no errors, the whole build will succeed, which is the most important. If it fails, well, there will be some indication of the reason. Detecting if the build actually succeeded would be neat, but much less critical. Please, reopen this bug, I cannot do that. The severity could be changed to enhancement.
Also see related bug 76025. I mentionned there a solution which would benefit to arbitrary build scripts (i.e. non Java, non AspectJ). It could still do incremental (unoptimal though as it doesn't know structural changes, but as good as make). Kent - how hard would it be to do this ?
We will now build projects that depend on other Java projects without a build state (we'll assume that the Ant build was successful). Any changes to .class files will get propagated to dependent types. Added BuildpathTests.testMissingBuilder()
Verified for 3.2 M5 using build I20060214-0010