让ivy不下载源文件和许可证文件
有没有办法配置ivy不下载源&通过ivy.xml 的许可证文件?
我目前正在尝试使用默认的 ivy 存储库 + spring 存储库。我的ivysettings.xml如下:
<?xml version="1.0" encoding="ISO-8859-1"?>
<settings defaultResolver="springSource" />
<include url="${ivy.default.settings.dir}/ivysettings-public.xml" />
<include url="${ivy.default.settings.dir}/ivysettings-shared.xml" />
<include url="${ivy.default.settings.dir}/ivysettings-local.xml" />
<include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml" />
<include url="${ivy.default.settings.dir}/ivysettings-default-chain.xml" />
<resolvers>
<chain name="springSource">
<url name="com.springsource.repository.bundles.release">
<ivy
pattern="http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
<artifact
pattern="http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
</url>
<url name="com.springsource.repository.bundles.external">
<ivy
pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
<artifact
pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
</url>
<ibiblio name="public" m2compatible="true" />
<ibiblio name="shared" m2compatible="true" />
<ibiblio name="local" m2compatible="true" />
<ibiblio name="main-chain" m2compatible="true" />
<ibiblio name="default-chain" m2compatible="true" />
</chain>
</resolvers>
Is there a way to configure ivy not to download sources & license files via ivy.xml ?
I'm currently trying to use default ivy repos + spring repository. my ivysettings.xml is bellow:
<?xml version="1.0" encoding="ISO-8859-1"?>
<settings defaultResolver="springSource" />
<include url="${ivy.default.settings.dir}/ivysettings-public.xml" />
<include url="${ivy.default.settings.dir}/ivysettings-shared.xml" />
<include url="${ivy.default.settings.dir}/ivysettings-local.xml" />
<include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml" />
<include url="${ivy.default.settings.dir}/ivysettings-default-chain.xml" />
<resolvers>
<chain name="springSource">
<url name="com.springsource.repository.bundles.release">
<ivy
pattern="http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
<artifact
pattern="http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
</url>
<url name="com.springsource.repository.bundles.external">
<ivy
pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
<artifact
pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
</url>
<ibiblio name="public" m2compatible="true" />
<ibiblio name="shared" m2compatible="true" />
<ibiblio name="local" m2compatible="true" />
<ibiblio name="main-chain" m2compatible="true" />
<ibiblio name="default-chain" m2compatible="true" />
</chain>
</resolvers>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用ivy配置指定您想要的到依赖项的依赖关系的映射(称为传递依赖项):
不知道您使用的spring是什么版本,本示例下载spring版本3.0:
引用Maven模块配置时参考Maven <强>范围。 Maven 中的默认范围是 compile,但您可以引用任何其他公共范围。
附加说明
我使用的是一个更简单的设置文件:
在我看来 ibiblio 解析器是与远程 Maven 存储库集成的最简单方法。我认为这个令人困惑的名称是历史性的,可以追溯到第一个 Maven 存储库站点的原始名称。您还需要另外指定 m2兼容 属性,因为原始 Maven 1 存储库格式现在几乎未知。
也许有一天,ivy 开发人员将创建一个新的“maven”解析器,让新用户的生活变得更轻松。
Use ivy configurations to specify your desired mapping to the dependencies of your dependencies (Called transitive dependencies):
Don't know what version of spring you're using, this example downloads spring version 3.0:
When referencing a Maven module configurations refer to Maven scopes. The default scope in Maven would be compile, but you can reference any other public scope.
Additional note
I'm using a much simpler settings file:
In my opinion the ibiblio resolver is the easiest way to integrate with a remote Maven repository. I think the confusing name is historical, dating back to the original name of the first Maven repository site. You'll need to additionally specify the m2compatible attribute, since the original Maven 1 repository format is now almost unknown.
Perhaps one day the ivy developers will create a new "maven" resolver that will make life easier for new users.