【问题标题】:Problems with Eclipse and m2eclipseEclipse 和 m2eclipse 的问题
【发布时间】:2011-02-27 08:08:14
【问题描述】:

要使用最新版本的休眠(版本 3.6.1),我参考 guideJboss repository URL 添加到我的项目 POM 文件中。然后我去Maven Repositories View 重建这个存储库的索引。

重建后,使用 m2eclipse 的 POM GUI 编辑器添加依赖项时仍然无法搜索 hibernate core 3.6.1 版本,并且在浏览存储库时在org.hibernate 节点中也找不到 hibernate-core 3.6.1使用 Maven Repositories View 添加的 Jboss 存储库的树。但是,当我直接使用浏览器(在https://repository.jboss.org/nexus/content/repositories/releases/org/hibernate/hibernate-core/)浏览添加的Jboss存储库时,我可以找到3.6.1版本

为什么 m2eclipse 中的存储库树的内容与使用浏览器的不同? 这里发生了什么以及如何使 m2eclipse 也获得 3.6.1 版本?

这是在我的 pom.xml 中添加的存储库设置

<repositories>
        <repository>
            <id>repository.jboss.org</id>
            <name>JBoss Repository</name>
            <url>http://repository.jboss.org/nexus/content/groups/public-jboss</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
 </repositories>

【问题讨论】:

    标签: eclipse hibernate m2eclipse


    【解决方案1】:

    在屏幕截图中我看到了repo1.maven.org,但你需要https://repository.jboss.org/nexus/content/repositories/releases/。我的项目中使用 m2eclipse 也有 Hibernate 的 3.6.1-Final,获取它没有问题。如果您定义了指向 jboss 存储库的 &lt;repository&gt;,请检查您的 pom.xml

    请贴上你pom.xml的来源,如果拿不到好像有错误。

    【讨论】:

    • 嗨,蒂姆,这些截图是针对问题 2 的,它们不是我的设置。为避免混淆,我针对该问题提出了一个新问题。我粘贴了我的 pom.xml ,它最初指向 http://repository.jboss.org/nexus/content/groups/public-jboss 。我已尝试更改为您建议的 URL,重建索引,但仍然无法获取 Hibernate 的 3.6.1-Final。我在存储库树中看到的最新版本是 3.6.0.CR2
    • 你能给我新问题的链接吗?但是用浏览器浏览到https://repository.jboss.org/nexus/content/groups/public-jboss/org/hibernate/hibernate-core/ 有3.6.1-Final 版本。所以,很奇怪,它似乎不是从这个存储库中获取的,或者没有正确更新。
    猜你喜欢
    • 1970-01-01
    • 2011-08-01
    • 2010-12-21
    • 2011-07-23
    • 1970-01-01
    • 2012-08-15
    • 2011-04-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多