This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes cyclic dependency error in maven Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "cyclic dependency error in maven" Watch "cyclic dependency error in maven" New topic
Author

cyclic dependency error in maven

S Majumder
Ranch Hand

Joined: Jun 03, 2009
Posts: 244
Hi All,
I am facing one problem in maven ....
I have Module A and Module B .Some java classes are required in Module B those are actually in Module A.The Module A also depends on Module B.So when am adding the dependency of Module A to Module B am getting cyclic dependency error .Could anybody give me the solution .

Thanks and regards,
Satya
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30130
    
150

Can you get rid of the cyclical dependency? Introduce Module C as a jar packaged artifact that contains the common classes.


[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
S Majumder
Ranch Hand

Joined: Jun 03, 2009
Posts: 244
Hi Jeanne,
Thanks for the reply ... Could you please give some examples / links so that i can try to implement it .

regards,
Satya
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30130
    
150

1) Create a new Maven module
2) Move the classes in module B that A replies on into it
3) Build the new module using "install" (local repository) or "deploy" (if using Nexus)
4) Add your new module as a dependency to project B
5) Build module B using "install" (local repository) or "deploy" (if using Nexus)
6) Add your new module as a dependency to project A
7) Build module A using "install" (local repository) or "deploy" (if using Nexus)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: cyclic dependency error in maven
 
Similar Threads
Unable to resolve dependency to a jar file created by MVN in 1st module.
Spring Application Context in Maven multi-module project
EJB3 deployment error on Jboss5
An odd kind of cyclic dependency - Maven 2
Resolution of cyclic dependencies by javac