【发布时间】:2015-05-06 13:04:12
【问题描述】:
我有两个 Maven 项目。一个人应该依赖于另一个人。两者都有 pom.xml 文件。当我搜索存储库时,它会看到本地项目并自动添加。
我添加时的 pom.xml 条目:
<dependencies>
<dependency> // for another dependency, an external jar
<groupId>..</groupId>
<artifactId>..</artifactId>
<version>...</version>
</dependency>
<dependency> // the one for other project which I want to add as dependency
<groupId>..</groupId>
<artifactId>..</artifactId>
<version>..</version>
</dependency>
</dependencies>
但是对该项目的引用看不到这些类。是否有一些特定的方法可以做到这一点,而不是从存储库添加?
【问题讨论】:
-
你的 pom.xml 看起来怎么样?
-
我添加了,请查收。
标签: java eclipse maven dependencies dependency-management