This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30057
    
149

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
 
jQuery in Action, 2nd edition
 
subject: recursive dependency!? (circular dependency) - Resolved
 
Similar Threads
Maven 2.0 test dependencies not found
Unable to resolve dependency at run time.
Spring 3.0.2 and Active MQ 5.4.1 Issues
Unable to create one single jar file in maven with dependencies included inside
Spring MVC JDBC