title: maven cyclic dependency resolution
body: <p>Can anyone please help to resolve this cyclic dependency error within my application. </p>
  
  <p>Here is my case: I have 2 classes which need to communicate with each other based on decider value but those 2 classes stay in different modules If I try to add dependency among those that lead to Cyclic Dependency error. </p>
  
  <p>A Sample functionality I'm planning would be similar to this</p>
  
  <pre><code>class A {
      void funA() {
          System.out.print("Module A");
      }
  
      void Validate() {
          boolean decider = true; // if true indicates belongs to Class A else B
          if (decider) {
              funA();
          } else {
              B b = new B();
              b.funB();
          }
      }
  
      private class B {
          void funB() {
              System.out.print("Module B");
          }
  
          void Validate() {
              boolean decider = false;// if true indicates belongs to Class A else B
              if (decider) {
                  funB();
              } else {
                  A a = new A();
                  a.funA();
              }
          }
      }
  }
  </code></pre>
  
  <p><strong><em>ClassA</em></strong> stays within <strong><em>ModuleA</em></strong> and <strong><em>ClassB</em></strong> stays within <strong><em>ModuleB</em></strong>, How can i achieve above functionality even by creating a new module and moving common functionality</p>