Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Cyclical Dependenices
Cyclical Dependenices [message #163088] Mon, 07 June 2004 17:05 Go to next message
Eclipse UserFriend
Originally posted by: thomasnagsahima.hotmail.com

I have several projects, the problem is that most depend on each other.
For example, Project A depends on Project B but the reverse is also true,
B requires classes in A.

I tried setting the Required Projects but Eclipse (M9) tells me it's got
cyclical dependencies and will not compile. So I tried using the Source
Folder but can not see my other project in that. I then tried using a
Class Folder, but when I do so it converts my java files to class files
and I can no longer edit the java files.

I think the solution may lay in exporting all my code into a single
directory, importing that and then slicing it up using the Source Folder
filters for the different projects. So I ask the experts, what should I
be doing? For the record, I can't get rid of the cyclical dependencies.
Re: Cyclical Dependenices [message #163120 is a reply to message #163088] Tue, 08 June 2004 04:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: thomas_maeder.ch.ibm.com

Source folders are the way to go. I suggest you use one source folder
per "project". The notion of project is quite different from other IDEs,
which has it's up- and downsides.

Thomas

Thomas Nagashima wrote:
> I have several projects, the problem is that most depend on each other.
> For example, Project A depends on Project B but the reverse is also true,
> B requires classes in A.
>
> I tried setting the Required Projects but Eclipse (M9) tells me it's got
> cyclical dependencies and will not compile. So I tried using the Source
> Folder but can not see my other project in that. I then tried using a
> Class Folder, but when I do so it converts my java files to class files
> and I can no longer edit the java files.
>
> I think the solution may lay in exporting all my code into a single
> directory, importing that and then slicing it up using the Source Folder
> filters for the different projects. So I ask the experts, what should I
> be doing? For the record, I can't get rid of the cyclical dependencies.
>
Re: Cyclical Dependenices [message #163128 is a reply to message #163088] Tue, 08 June 2004 06:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hcs33.egon.gyaloglo.hu

Hi,

If you want to compile projects with circular dependencies you can do the
following:
- Properties->Java->Compiler->Build Path: set 'Circular dependencies' to
warning (instead of error)
- Properties->Build Order: you can define how many cyclic compilation step
is necessary (default: 10)

After setting the first option Eclipse should compile both projects.

HTH,
Regards,
Csaba

"Thomas Nagashima" <thomasnagsahima@hotmail.com> wrote in message
news:ca2lat$vcc$1@eclipse.org...
> I have several projects, the problem is that most depend on each other.
> For example, Project A depends on Project B but the reverse is also true,
> B requires classes in A.
>
> I tried setting the Required Projects but Eclipse (M9) tells me it's got
> cyclical dependencies and will not compile. So I tried using the Source
> Folder but can not see my other project in that. I then tried using a
> Class Folder, but when I do so it converts my java files to class files
> and I can no longer edit the java files.
>
> I think the solution may lay in exporting all my code into a single
> directory, importing that and then slicing it up using the Source Folder
> filters for the different projects. So I ask the experts, what should I
> be doing? For the record, I can't get rid of the cyclical dependencies.
>
Re: Cyclical Dependenices [message #163374 is a reply to message #163128] Wed, 09 June 2004 07:20 Go to previous messageGo to next message
Eclipse UserFriend
Indeed, we added support to tolerate cycles in 2.1. By default, the support
is disabled, as this is generally considered as evil practice <g>.

"Horv
Re: Cyclical Dependenices [message #163593 is a reply to message #163374] Wed, 09 June 2004 18:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: thomasnagashima.hotmail.com

Thanks to everybody for their answers!
Re: Cyclical Dependenices [message #163639 is a reply to message #163120] Thu, 10 June 2004 04:07 Go to previous message
Eclipse UserFriend
*I didn't understand quite clearly why mess with source folders and
change existing projects layout? We have used quite well required
project dependency, also used maven for generating eclipse classpath.

Cyclic project dependency means that you have serious flaws in project
design and you better fix it ASAP!



Thomas Mäder wrote:
> Source folders are the way to go. I suggest you use one source folder
> per "project". The notion of project is quite different from other IDEs,
> which has it's up- and downsides.
>
> Thomas
>
> Thomas Nagashima wrote:
>
>> I have several projects, the problem is that most depend on each
>> other. For example, Project A depends on Project B but the reverse is
>> also true,
>> B requires classes in A.
>>
>> I tried setting the Required Projects but Eclipse (M9) tells me it's got
>> cyclical dependencies and will not compile. So I tried using the Source
>> Folder but can not see my other project in that. I then tried using a
>> Class Folder, but when I do so it converts my java files to class files
>> and I can no longer edit the java files.
>>
>> I think the solution may lay in exporting all my code into a single
>> directory, importing that and then slicing it up using the Source Folder
>> filters for the different projects. So I ask the experts, what should I
>> be doing? For the record, I can't get rid of the cyclical dependencies.
>>
Previous Topic:project assert Compliance and Classfiles?
Next Topic:refactoring API for plugins
Goto Forum:
  


Current Time: Mon Nov 10 10:46:39 EST 2025

Powered by FUDForum. Page generated in 0.07524 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top