2011-10-18 21 views
1

Ivyを使用してSpring BatchとSpring Frameworkをダウンロードしようとしています。 ivy.xmlでIvyでSpringフレームワークの依存関係が解決されない

依存性:

<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:私はant resolveを実行すると

... 
<ivy:settings file="ivysettings.xml"/> 
... 
<target name="resolve" description="retrieve dependencies with ivy"> 
    <ivy:retrieve/> 
</target>  

私は、次を得る:

[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've used this page

答えて

1

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は、デフォルトのアイビーです)。

次を使用して、1を作成する場合:

<ivysettings> 
    <settings defaultResolver="central"/> 
    <resolvers> 
     <ibiblio name="central" m2compatible="true"/> 
    </resolvers> 
</ivysettings> 
関連する問題