ivysettings.xml:添加本地maven路径 [英] ivysettings.xml: add local maven path

查看:466
本文介绍了ivysettings.xml:添加本地maven路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将本地路径(不是网址)添加到 ivysettings.xml ?我需要添加我的Maven本地存储库(/Users/me/.m2/repository到它。

How to add a local path (not URL) to ivysettings.xml? I need to add my Maven local repository (/Users/me/.m2/repository to it.

谢谢

推荐答案

尝试以下 ivysettings.xml 文件:

<ivysettings>
    <settings defaultResolver="default"/>
    <property name="m2-pattern" value="${user.home}/.m2/repository/[organisation]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]" override="false" />
    <resolvers>
        <chain name="default">
            <filesystem name="local-maven2" m2compatible="true" >
                <artifact pattern="${m2-pattern}"/>
                <ivy pattern="${m2-pattern}"/>
            </filesystem>
            <ibiblio name="central" m2compatible="true"/>
        </chain>
    </resolvers>
</ivysettings>

它包括Maven central in如果本地Maven回购中缺少依赖关系。

It includes Maven central in case the dependency is missing from the local Maven repo.

注意:

重用本地Maven存储库的好处是有限的。常春藤缓存从repostories中检索到的罐子。

The benefits of re-using a local Maven repository are limited. Ivy caches jars retrieved from repostories.

这篇关于ivysettings.xml:添加本地maven路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆