【问题标题】:Introduces to cycle in the graph [duplicate]在图中引入循环[重复]
【发布时间】:2018-04-12 20:56:48
【问题描述】:

我的应用程序中有两个模块和一个父模块。 - 父母 - 模块 A(具有 A1 类和 A2 类) - 模块 B(带有 classB1 和 classB2)

我需要在模块 B 中使用 classA1&2,在模块 A 中使用 classB1&2。 我知道想要是一个周期性的例外,但我怎样才能尝试做我想做的事......

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>

感谢您的帮助

【问题讨论】:

  • 您需要从 A 和 B 中提取一些公共部分到一个单独的模块中,或者将模块 A 和 B 合并到一个模块中。

标签: java jakarta-ee pom.xml


【解决方案1】:

您始终可以创建包含这两个类的第三个模块并在两个模块中使用它。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-11-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-29
    • 2018-08-15
    • 2016-12-15
    相关资源
    最近更新 更多