简短的回答是,ivy对与Maven模块关联的其他工件文件的支持非常有限.
我为重复自己而道歉,但最好建议您运行Maven存储库管理器来缓存远程Maven存储库.这避免了在不同格式之间进行折衷的必要性.
这个限制背后的起源
远程Maven POM没有明确列出其模块的工件.可能的分类器值的数量没有限制….可以做出的唯一假设是模块可能包含额外的“javadoc”或“sources”工件. (在开源项目中很常见).
classifier: The classifier allows to distinguish artifacts that were
built from the same POM but differ in their content. It is some
optional and arbitrary string that – if present – is appended to the
artifact name just after the version number.
As a motivation for this element,consider for example a project that
offers an artifact targeting JRE 1.5 but at the same time also an
artifact that still supports JRE 1.4. The first artifact could be
equipped with the classifier jdk15 and the second one with jdk14 such
that clients can choose which one to use.
Another common use case for classifiers is the need to attach
secondary artifacts to the project’s main artifact. If you browse the
Maven central repository,you will notice that the classifiers sources
and javadoc are used to deploy the project source code and API docs
along with the packaged class files.
常春藤存储库的工作方式不同.模块的常春藤文件有一个明确列出模块内容的publications section.
为了更深入地了解常春藤如何解释Maven存储库,我建议以下发布.
以下示例使用retrieve任务将下载的依赖项写入所需的存储库格式.结果是缺少校验和文件,但这可能无关紧要.
├── build.xml
├── ivy.xml
└── target
└── repo
└── org
└── jogamp
└── jogl
├── jogl-all
│ └── 2.1.5-01
│ ├── jogl-all-2.1.5-01.jar
│ ├── jogl-all-2.1.5-01-javadoc.jar
│ ├── jogl-all-2.1.5-01-natives-android-armv6.jar
│ ├── jogl-all-2.1.5-01-natives-linux-amd64.jar
│ ├── jogl-all-2.1.5-01-natives-linux-armv6hf.jar
│ ├── jogl-all-2.1.5-01-natives-linux-armv6.jar
│ ├── jogl-all-2.1.5-01-natives-linux-i586.jar
│ ├── jogl-all-2.1.5-01-natives-macosx-universal.jar
│ ├── jogl-all-2.1.5-01-natives-solaris-amd64.jar
│ ├── jogl-all-2.1.5-01-natives-solaris-i586.jar
│ ├── jogl-all-2.1.5-01-natives-windows-amd64.jar
│ ├── jogl-all-2.1.5-01-natives-windows-i586.jar
│ └── jogl-all-2.1.5-01-sources.jar
└── jogl-all-main
└── 2.1.5-01
├── jogl-all-main-2.1.5-01.jar
├── jogl-all-main-2.1.5-01-javadoc.jar
└── jogl-all-main-2.1.5-01-sources.jar
的ivy.xml
笔记:
>需要明确列出要下载的每个所需工件.如上所述,只能假设“javadoc”和“sources”分类器.
build.xml文件