Maven 依赖插件下载 POM 而不是 tar.gz

Maven dependency plugin downloads POM instead of tar.gz

我有两个模块:

  module 1: builds as .tar.gz with assembly plugin (type declared as 'pom' in its pom.xml)

  module 2: needs to depend on the .tar.gz from the module above but always pulls the pom from the nexus instead.

有什么技巧吗?我在我的 Nexus 上正确地看到了我的 .tar.gz ,它只是模块 2 从不适合它,总是只是下载 POM。

我终于找到问题了。如果我查看关系的元数据 (maven-metadata.xml)

我看到我的 .tar.gz 带有来自 Maven 程序集插件 ID 的分类器标签(来自外部程序集 xml 的那个)。

我在依赖插件配置中有这个,但在我的 pom.xml 的实际依赖部分中并​​不低。一旦我在这里也添加了分类器标签,一切都按预期工作。