Ivy 中未解决 Spring 框架依赖关系
我正在尝试使用 Ivy 下载 Spring Batch 和 Spring Framework,但进展还不够。
ivy.xml 中的依赖项:
<dependency org="org.springframework.batch" name="org.springframework.batch.core" rev="2.1.6.RELEASE" />
<dependency org="org.springframework" name="org.springframework.spring-library" rev="3.0.6.RELEASE" />
ivysettings.xml:
<ivysettings>
<settings defaultResolver="chained"/>
<resolvers>
<chain name="chained">
<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>
</chain>
</resolvers>
</ivysettings>
build.xml:
...
<ivy:settings file="ivysettings.xml"/>
...
<target name="resolve" description="retrieve dependencies with ivy">
<ivy:retrieve/>
</target>
当我运行 ant resolve 时,我得到以下信息:
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: UNRESOLVED DEPENDENCIES ::
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: org.springframework#org.springframework.spring-library;3.0.6.RELEASE: not found
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
我做错了什么? 我已使用此页面来获取配置。
I am trying to download Spring Batch and Spring Framework using Ivy, and I'm not getting very far.
Dependencies in ivy.xml:
<dependency org="org.springframework.batch" name="org.springframework.batch.core" rev="2.1.6.RELEASE" />
<dependency org="org.springframework" name="org.springframework.spring-library" rev="3.0.6.RELEASE" />
ivysettings.xml:
<ivysettings>
<settings defaultResolver="chained"/>
<resolvers>
<chain name="chained">
<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>
</chain>
</resolvers>
</ivysettings>
build.xml:
...
<ivy:settings file="ivysettings.xml"/>
...
<target name="resolve" description="retrieve dependencies with ivy">
<ivy:retrieve/>
</target>
When I run ant resolve
I get the following:
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: UNRESOLVED DEPENDENCIES ::
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: org.springframework#org.springframework.spring-library;3.0.6.RELEASE: not found
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
What am I doing wrong? I've used this page for getting the configuration.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Spring 库现在通过 Maven Central 发布。这意味着可以使用 Maven 搜索网站找到它们:
这意味着您需要按如下方式声明依赖项:
设置文件现在变为可选(Maven Central 是 ivy 默认设置)。
如果您想创建一个,请使用以下命令:
Spring libraries are now published via Maven Central. This means they can be found using the Maven search website:
This means you need to declare your dependencies as follows:
A settings file now becomes optional (Maven Central is an ivy default).
If you want to create one, use the following: