Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

cyclic dependency error in maven

 
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
author & internet detective
Posts: 40200
816
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you get rid of the cyclical dependency? Introduce Module C as a jar packaged artifact that contains the common classes.
 
S Majumder
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Posts: 40200
816
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
    Bookmark Topic Watch Topic
  • New Topic