Ivy 中未解决 Spring 框架依赖关系

发布于 2024-12-10 12:19:49 字数 2263 浏览 0 评论 0原文

我正在尝试使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

勿忘初心 2024-12-17 12:19:49

Spring 库现在通过 Maven Central 发布。这意味着可以使用 Maven 搜索网站找到它们:

这意味着您需要按如下方式声明依赖项:

<dependency org="org.springframework.batch" name="spring-batch-core" rev="2.1.8.RELEASE"/>
<dependency org="org.springframework" name="spring-core" rev="3.0.6.RELEASE"/>

设置文件现在变为可选(Maven Central 是 ivy 默认设置)。

如果您想创建一个,请使用以下命令:

<ivysettings>
    <settings defaultResolver="central"/>
    <resolvers>
        <ibiblio name="central" m2compatible="true"/>
    </resolvers>
</ivysettings>

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:

<dependency org="org.springframework.batch" name="spring-batch-core" rev="2.1.8.RELEASE"/>
<dependency org="org.springframework" name="spring-core" rev="3.0.6.RELEASE"/>

A settings file now becomes optional (Maven Central is an ivy default).

If you want to create one, use the following:

<ivysettings>
    <settings defaultResolver="central"/>
    <resolvers>
        <ibiblio name="central" m2compatible="true"/>
    </resolvers>
</ivysettings>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文