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

Maven依赖插件下载POM而不是tar.gz,maven,maven-dependency-plugin,Maven,Maven Dependency Plugin,我有两个模块: 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,只是

我有两个模块:

  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

我终于找到了问题所在。如果我查看nexusmaven-metadata.xml的元数据

我看到my.tar.gz带有一个来自maven程序集插件id的分类器标记,即来自外部程序集xml的分类器标记


我在dependency插件配置中有这个,但在pom的实际dependency部分中没有。一旦我在这里添加了分类器标记,它就会像预期的那样工作。

如何声明依赖关系?您指定类型了吗?是的,我有.tar.gz。我也没有来自构建它的汇编插件作业的分类器。在我看到nexus元数据xml之前,这并不容易确定。有没有一种方法可以通过mvn依赖关系做到这一点:不使用pom的get命令?