Community
Participate
Working Groups
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?
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.
... 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?
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.