无法在 Maven 本地存储库中看到 Maven 下载的 jar 内部依赖项

Not able to see maven downloaded jar inner dependencies in maven local repository

我有一个 maven jar,我需要在其中修改部分代码,所以我从 git 下载了源代码,它包含如下所示的内部依赖关系。

<dependency>
  <groupId>com.consol.citrus</groupId>
  <artifactId>citrus-test-support</artifactId>
  <version>${project.version}</version>
  <scope>test</scope>
</dependency>

在将源代码导入到 eclipse 后,我发现了诸如缺少依赖项之类的错误(如上所示缺少依赖项)。通过使用我在 Maven 存储库中搜索的工件 ID,但无法找到它。但是当我提到 maven jar(源代码作为我项目中的 maven 依赖项)时,它显示了依赖 heirachy 中缺少的依赖项。我不知道我在哪里失踪。有人可以帮忙吗

这里是 eclipse 错误 error : missing artifact id

的屏幕截图

这里是传递依赖中依赖的屏幕截图:

我认为以下内容可以满足您的目的:

<!-- https://mvnrepository.com/artifact/com.consol.citrus/citrus-core -->
<dependency>
    <groupId>com.consol.citrus</groupId>
    <artifactId>citrus-core</artifactId>
    <version>3.0.0-M1</version>
</dependency>

citrus-test-support 模块是一个开发内部模块,因此它不会像您已经提到的那样发布到 Maven Central。

因此,为了在您的本地计算机上使用它进行开发,您需要从头开始构建它。由于您已经从 git 克隆了源代码,因此您可以在本地构建所有内容:

mvn install

这将在本地构建所有工件,包括内部开发模块,例如 citrus-test-support