How to use the ivy local repository as a maven respository

有些话、适合烂在心里 提交于 2019-12-10 18:27:40

问题


The ivy local repository is in ~/.ivy2, and I'd like to use it as my local maven respoitory. Is there any easy way like setting to do it ?


回答1:


I suspect what you're trying to do is share ivy's cache, not it's local repository. Files are placed in ivy's repository by calling the publish task. Ivy has a clear storage distinction between these file types:

~/.ivy2/cache
~/.ivy2/local

Maven on the other hand mixes up both file types under the following directory:

~/.m2/repository

It would be a lot simpler to optimize your caching by installing a Maven repository manager like Nexus and configuring Maven and Ivy to use it. Nexus is a very efficient java process and simple to setup on your development machine.

Finally if you are determined to share caches, you could attempt to use the caches directive in the ivy settings file. It has "ivyPattern" and "artifactPattern" directives which suggest one can customize how the cached files are stored. To make this work you'll have to customize ivy. Maven has no flexibility in this area.



来源:https://stackoverflow.com/questions/15737335/how-to-use-the-ivy-local-repository-as-a-maven-respository

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!