首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >hibernate- Maven中找不到空间4.3

hibernate- Maven中找不到空间4.3
EN

Stack Overflow用户
提问于 2015-12-07 15:02:49
回答 1查看 3K关注 0票数 3

我想将hibernate-spatialpostgis添加到Maven项目中。

这是我的pom.xml

代码语言:javascript
复制
  <properties>
    <hibernate.version>4.3.6.Final</hibernate.version>
    <hibernate.spatial.version>4.3</hibernate.spatial.version>
    <hibernate.core.version>4.3.6.Final</hibernate.core.version>
    <postgis-jdbc.version>2.2.0</postgis-jdbc.version>
  </properties>

  ...

  <dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-core</artifactId>
    <version>${hibernate.core.version}</version>
  </dependency>
  <dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-entitymanager</artifactId>
    <version>${hibernate-entitymanager.version}</version>
  </dependency>
  <dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-spatial</artifactId>
    <version>${hibernate.spatial.version}</version>
  </dependency>
  <dependency>
    <groupId>org.postgis</groupId>
    <artifactId>postgis-jdbc</artifactId>
    <version>${postgis-jdbc.version}</version>
  </dependency>

entity-managerhibernate-core的引用起作用。但是没有找到hibernate-spatialpostgis-jdbc

org.hibernate:hibernate-spatial:4.3未找到检查Maven模型解决问题的方法。

(postgis-jdbc的错误相同)

如何将这些库包括在我的项目中?

EN

回答 1

Stack Overflow用户

发布于 2015-12-08 08:19:18

hibernate-spatial直到5.0才能在公共maven存储库中使用。您始终可以通过浏览http://mvnrepository.com/ (在本例中为http://mvnrepository.com/artifact/org.hibernate/hibernate-spatial)检查可用的内容。

但是您可以将hibernate空间存储库添加到POM中,其中包含hibernate空间的早期版本:

代码语言:javascript
复制
<project ...>
  ...
  <repositories>
    <repository>
      <id>Hibernate Spatial repo</id>
      <url>http://www.hibernatespatial.org/repository</url>
    </repository>
  </repositories>

</project>

这还包含1.5.2版本中匹配的postgis-jdbc库。

票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34136676

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档