这是我的pom.xml
(片段):
...
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>[3.0,)</version>
</dependency>
...
这是
mvn
告诉我的:Couldn't find a version in [3.2.0.cr2, 3.2.0.ga, 3.3.1.ga] to match range [3.0,)
为什么?
最佳答案
Hibernate使用的旧X.Y.Z.ga
命名方案(有关新的JBoss约定,请参阅this page)没有遵循Maven的格式,因此可能无法与版本比较算法配合使用。引用Version number rules:
该算法在Dependency Mediation and Conflict Resolution中进行了详细说明:
总结:
[0.0.0-3.0,)
范围来愚弄Maven。 实际上,我的建议是根本不使用版本范围,因为它们对可复制的版本不利。
也可以看看