gpt4 book ai didi

java - IntelliJ : Reference another module from a Maven module not working

转载 作者:行者123 更新时间:2023-12-01 15:10:07 25 4
gpt4 key购买 nike

当我创建一个标准 Java 模块并引用其中的另一个模块(文件 - 项目结构 - 模块 - 添加..)时,我可以使用引用模块中的包。

但是,当我从 Maven 模块引用模块时,我无法访问引用模块中的包。这是错误的行为还是我错过了什么?

谢谢。

最佳答案

通过手动输入 Maven 模块的依赖关系来引用 eq 来实现此功能。

<dependencies>
<dependency>
<groupId>BusinessLogic</groupId>
<artifactId>BusinessLogic</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
</dependencies>

关于java - IntelliJ : Reference another module from a Maven module not working,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12443533/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com