4
Ich需要使用Hibernate 4.3.5。但是我的Jboss提供了Hibernate 4.0.1,這是我不需要的。我配置我的pom.xml這樣的:JBoss 7.1 with Hibernate 4.3.5
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<scope>compile</scope>
<version>4.3.5.Final</version>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<artifactId>hibernate-core</artifactId>
<groupId>org.hibernate</groupId>
<scope>compile</scope>
<version>4.3.5.Final</version>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search</artifactId>
<version>5.0.0.Alpha3</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate.common</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>4.0.4.Final</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search</artifactId>
<version>5.0.0.Alpha3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.1.0.Final</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
<scope>compile</scope>
</dependency>
但我注意到了這一點,我的JBoss和Hibernate 4.0.1仍然部署。如果我在Eclipse中檢查我的依賴項,Eclipse告訴我:Hibernate-core:4.3.5 Final [compile] managed:4.2.0 CR1。這裏的「管理」是什麼意思?我如何配置我的jboss,並使用最新的Hibernate版本進行部署?
謝謝!