views:

480

answers:

2

I'm trying to add JBoss repository to m2eclipse, mainly for Hibernate. It seems to work, but it can't find the latest version of Hibernate (3.5.1), only 3.5.0beta. I looked at some other packages, and they all seem a couple of months behind. What could be causing this? I'm running latest m2eclipse, and i guess latest Eclipse (it just says 20100218-1602, eclipse people think it's funny to not include version in the about dialog), on ubuntu 9.10.

This is my settings.xml

<settings>
<profiles>
    <profile>
        <id>jboss-maven2-release-repository</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>

        <repositories>
            <repository>
                <id>jboss-maven2-release-repository</id>
                <url>http://repository.jboss.org/maven2&lt;/url&gt;
                <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
            </repository>
            <repository>
                <id>jboss-snapshots</id>
                <url>http://snapshots.jboss.org/maven2&lt;/url&gt;
                <releases>
                    <enabled>false</enabled>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </repository>
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <id>jboss-releases</id>
                <url>http://repository.jboss.org/maven2&lt;/url&gt;
                <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
            </pluginRepository>
            <pluginRepository>
                <id>jboss-snapshots</id>
                <url>http://snapshots.jboss.org/maven2&lt;/url&gt;
                <releases>
                    <enabled>false</enabled>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </pluginRepository>
        </pluginRepositories>
    </profile>
</profiles>

A: 

The nexus index is very likely out of date, just add the dependency manually:

<dependencies>
  <dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-core</artifactId>
    <version>3.5.1-Final</version>
  </dependency>
</dependencies>

I wouldn't use a profile but simply add the repository to the pom BTW (but this is a personal choice):

<repositories>
  <repository>
    <id>jboss-public-repository-group</id>
    <name>JBoss Public Repository Group</name>
    <url>http://repository.jboss.org/nexus/content/groups/public&lt;/url&gt;
  </repository>
</repositories>
Pascal Thivent
A: 

Thank you Pascal, but I just figured out what the problem was. JBoss recently switched to nexus, and is no longer updating the old repo (http://repository.jboss.org/maven2)

You can find the new list of repositories here:

https://repository.jboss.org/nexus/index.html#view-repositories

They work fine with m2eclipse (everything is up to date)

Anyways, great job announcing this, JBoss, I just spent 5 hours googling to find the new repo :(

Robert
Well, sure, but if you are spoiled like me, and want your auto-resolve gizmos in m2eclipse to work, you want the new one. It wouldn't hurt to mention that there is a properly indexed new repo on for example http://www.hibernate.org/downloads.html
Robert
I've learned to not rely on Nexus indices, it's just an utopia to think that everybody will provide one (I use online repository search engines). But I admit it's handy when a repository does provide an index.
Pascal Thivent