我使用了安装了 Hibernate Tools 的 Eclipse Helios。一切都很好。现在我已经换成Eclipse Kepler了。看起来它还安装了 Hibernate 工具,因为我可以更改为 Hibernate 视角。当我尝试导入旧项目 Hibernate 配置时(如此处所示)。不出现导入 Hibernate 配置文件的选项。这是我的导入对话框的图像:
我认为你也可以通过这种方式实现你所需要的:
希望这会有用!
In my case, I removed <type>pom<type> from the hibernate jar and it worked. Also, please save and update the project.
Which was like this when I copied from Maven repo.
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>6.3.0.Final</version>
<type>pom</type>
</dependency>