Bug 69062 - build fails when building dependant project which depends on java project with "program" type builder
Summary: build fails when building dependant project which depends on java project wit...
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal with 1 vote (vote)
Target Milestone: 3.1 M2   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-30 14:52 EDT by Roman Dolgov CLA
Modified: 2004-09-16 10:16 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Dolgov CLA 2004-06-30 14:52:20 EDT
I have problem building dependant project.
I've created two simple java projects : 'test1' and 'test2'. 'Test2' is
dependant on 'test1'. 
To build project 'test1' I'm using batch file ('program' type of builder).
To build project 'test2' I am using java builder and in project settings for
'test2' I specify that 'test2' depends on 'test1'.

I got the following error while trying to build 'test2' project :
"The project cannot be built unitl its prerequisite test1 is build ...."

But 'test1' project was built without any problem.

(if I use java builder for project test1 then everything works fine)

Is this a bug?
Comment 1 Kent Johnson CLA 2004-09-07 10:54:45 EDT
No its not.

The Java builder creates a build state for each project, which is used to 
build dependent projects... since you decided not to use the JavaBuilder for 
test1, then why use it for any dependent project?

We won't have the build state for test1 & as a result, we cannot incrementally 
propagate changes to test2, so you're on your own.
Comment 2 Roman Dolgov CLA 2004-09-15 19:06:18 EDT
... why use it for any dependent project?

I have server, which is build by some script, and I use eclipse only for
navigation/edit/remote debug of this server. (it's difficult to build it in
eclipse because of complex custom build script). It basically normal java
project with all libraries setted up and ect, only without any builder
association. So I can use it to edit and navigation and have error warnings in
edtitor and all other nice features.

I also have client, which depends on this server. I can build client in eclipse.
I want client to be dependant on server, so it will pickup all server's
classes/libraries. Otherwise I need duplicate this common classes/libraries for
both projects. 

Is there any better way to avoid classes/libraries duplicaton?
Comment 3 Kent Johnson CLA 2004-09-16 10:16:21 EDT
If project B depends on project A, then we need the build state for A to tell 
us what changed when we build project B. Without it we would need to recompile 
every source file every time.

As for your project setup, why can you not have a common project with the 
shared classes/libraries? Then have 2 projects with specific server & client 
code depend on the common project.