aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes recursive dependency!? (circular dependency) - Resolved Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "recursive dependency!? (circular dependency) - Resolved" Watch "recursive dependency!? (circular dependency) - Resolved" New topic
Author

recursive dependency!? (circular dependency) - Resolved

Douglas Mendonça
Greenhorn

Joined: Feb 16, 2009
Posts: 5
I have this situation:

Module A
Module B

I can't compile Module A with <javac> because some class have a dependey with Module B, and I can't compile Module B before because some class have a dependey with Module A.

And now??
Is there a solution??

ps: sorry may bad english
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31079
    
163

Douglas,
Two main choices:
1) Compile them at the same time into one result
2) Cleaner - get rid of the circular dependency by moving the lower level code to a third jar


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Douglas Mendonça
Greenhorn

Joined: Feb 16, 2009
Posts: 5
Jeanne Boyarsky wrote:Douglas,
Two main choices:
1) Compile them at the same time into one result
2) Cleaner - get rid of the circular dependency by moving the lower level code to a third jar


Thanks a lot Jeanne, I choice number one. Here my solution:

1 - I compile the two Module at same time:

2 - I generated the jar without the classes of Module B

3 - With the jar of Module A it is easy, just put the jar in the classpath of ModuleB compilation.

Thanks a lot one more time.

ps: sorry may very bad english
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: recursive dependency!? (circular dependency) - Resolved