views:

6810

answers:

5

I've just installed Maven2 for the first time.

By default it pulls down a few useful jars into a local project: jakarta-commons, junit etc.

I wanted to pull in the latest Spring release (2.5.6 at the time of writing). But the online repositories I looked at (iBiblio and Maven) only had much older versions of Spring libraries.

Are there any other repositories that are kept up to date? What is the best practice here; can we maintain them ourselves? I would be prepared to help out maintaining this stuff!

+1  A: 

http://mirrors.ibiblio.org/pub/mirrors/maven2/org/springframework/spring-core/

It looks like spring 2.5.6 is present.

I would recommend adding Jboss's repo though, if you like using stuff such as hibernate. In my experience things gets updated there much quicker than in the main maven repo.

Blake Pettersson
Won't there be issue of performance. For downloading a jar maven will try to download same from each repository specified. In case of maven central repository this issue is not faced but i agree that central maven is not updated regularly especially Springframework.
Maddy.Shik
+6  A: 

Actually I think you are way better of if you use the spring enterprise repository.

http://www.springsource.com/repository/

There is not only the spring distribution available, but also many other libraries, with correct dependencies to each other (which is not the case for the official maven repositories!). Further, it is also an OBR, so every library is also already an OSGI bundle!

<repository>
    <id>com.springsource.repository.bundles.release
    </id>
    <name>SpringSource Enterprise Bundle Repository -
        SpringSource Bundle Releases</name>
    <url>http://repository.springsource.com/maven/bundles/release
    </url>
    <releases>
        <enabled>true</enabled>
        <updatePolicy>daily</updatePolicy>
        <checksumPolicy>warn</checksumPolicy>
    </releases>
</repository>
<repository>
    <id>com.springsource.repository.bundles.external
    </id>
    <name>SpringSource Enterprise Bundle Repository -
        External Bundle Releases</name>
    <url>http://repository.springsource.com/maven/bundles/external
    </url>
    <releases>
        <enabled>true</enabled>
        <updatePolicy>daily</updatePolicy>
        <checksumPolicy>warn</checksumPolicy>
    </releases>
</repository>
<repository>
    <id>com.springsource.repository.libraries.release
    </id>
    <name>SpringSource Enterprise Bundle Repository -
        SpringSource Library Releases</name>
    <url>http://repository.springsource.com/maven/libraries/release
    </url>
    <releases>
        <enabled>true</enabled>
        <updatePolicy>daily</updatePolicy>
        <checksumPolicy>warn</checksumPolicy>
    </releases>
</repository>
<repository>
    <id>com.springsource.repository.libraries.external
    </id>
    <name>SpringSource Enterprise Bundle Repository -
        External Library Releases</name>
    <url>http://repository.springsource.com/maven/libraries/external
    </url>
    <releases>
        <enabled>true</enabled>
        <updatePolicy>daily</updatePolicy>
        <checksumPolicy>warn</checksumPolicy>
    </releases>
</repository>
Mauli
+2  A: 

http://repository.springsource.com/maven/............. is not a valid URL.

+1  A: 

Try this: https://s3browse.springsource.com/browse/repository.springsource.com/maven

The other url does not work because it is in reality an Amazon S3 "bucket" that is not easily readable for humans. Very easy for software though :)

Jeff Caddel
+1  A: 

Just follow this article: Obtaining Spring 3 Artifacts with Maven

Iker Jimenez