0

I have two modules and one parent in my application. - parent - module A (with classA1 and classA2) - module B (with classB1 and classB2)

I need to use classA1&2 in the module B and classB1&2 in the module A. I know want is a the cyclical exception but how can I try to do what I want...

parent: pom.xml

<modules>
    <module>../moduleA</module>
    <module>../moduleB</module>
</modules>

moduleA: pom.xml

<dependencies>
    <dependency>
        <groupId>com.test</groupId>
        <artifactId>moduleB</artifactId>
    </dependency>
</dependencies>

moduleB: pom.xml

 <dependencies>
        <dependency>
            <groupId>com.test</groupId>
            <artifactId>moduleA</artifactId>
        </dependency>
    </dependencies>

Thanks for your help

BOLuck
  • 1
  • You need to either extract some common part from A and B to a separate module, or combine modules A and B into a single module. – Alex Shesterov Oct 31 '17 at 16:04

1 Answers1

0

You can always create a third module containing these two classes and use it in both modules.

Jakub Moravec
  • 181
  • 1
  • 10