Spring Mavenリポジトリ

Spring Mavenリポジトリ

1. 概要

この記事では、プロジェクトでSpringアーティファクトを使用するときに使用するMavenリポジトリを示します。the Spring wikiのリポジトリの完全なリストを参照してください。 以前のSpringSourceアーティファクト管理インフラストラクチャはmaven.springframework.orgでしたが、これは非推奨になり、より強力なrepo.spring.ioが採用されました。

2. Mavenリリース

すべてのGA /リリースアーティファクトはMavenCentralに公開されるため、リリースのみが必要な場合は、pomに新しいリポジトリを追加する必要はありません。 ただし、何らかの理由でCentralが使用できない場合は、カスタムのbrowsableMaven repository available for Spring Releasesもあります。


    
        repository.spring.release
        Spring GA Repository
        http://repo.spring.io/release
    

Springアーティファクトのバージョン管理ルールはon the project wikiで説明されています。

マイルストーンとスナップショットはMaven Centralに直接公開されないため、独自のリポジトリがあります。

3. Mavenのマイルストーンとリリース候補

マイルストーンとRCの場合、次のリポジトリをpomに追加する必要があります。


    
        repository.spring.milestone
        Spring Milestone Repository
        http://repo.spring.io/milestone
    

このリポジトリが定義されると、プロジェクトはSpringmilestone dependenciesの使用を開始できます。


    org.springframework
    spring-core
    4.2.0.RC3

4. Mavenスナップショット

マイルストーンと同様に、Springスナップショットはカスタムリポジトリでホストされます。


    
        repository.spring.snapshot
        Spring Snapshot Repository
        http://repo.spring.io/snapshot
    

pomでリポジトリを有効にすると、プロジェクトはSpringスナップショットの使用を開始できます。


    org.springframework
    spring-core
    4.2.5.BUILD-SNAPSHOT

そしてさらに:


    org.springframework
    spring-core
    4.3.0.BUILD-SNAPSHOT

スナップショットリポジトリもbrowsedにできるようになりました。

5. SpringOSGIのMavenリポジトリ

OSGI互換のSpringアーティファクトは、SpringSourceEnterprise Bundle Repository、つまりEBRで維持されます。 これらのリポジトリには、Spring Framework全体の有効なOSGIバンドルとライブラリ、およびこれらのライブラリの完全な依存関係セットが含まれています。 バンドルの場合:


    com.springsource.repository.bundles.release
    SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases
    http://repository.springsource.com/maven/bundles/release



    com.springsource.repository.bundles.external
    SpringSource Enterprise Bundle Repository - External Bundle Releases
    http://repository.springsource.com/maven/bundles/external

また、OSGI互換ライブラリの場合:


    com.springsource.repository.libraries.release
    SpringSource Enterprise Bundle Repository - SpringSource Library Releases
    http://repository.springsource.com/maven/libraries/release


    com.springsource.repository.libraries.external
    SpringSource Enterprise Bundle Repository - External Library Releases
    http://repository.springsource.com/maven/libraries/external

注:SpringSource EBR is now read-onlyおよびそれ以降のSpring Framework3.2.xリリースはそこで公開されません。

6. 結論

この記事では、リリース候補、マイルストーン、スナップショットを使用するために、pomでSpring固有のMavenリポジトリを設定するための実用的な情報について説明します。