dev*_*lop 3 java hibernate spatial pom.xml maven
我想将hibernate-spatial
和添加postgis
到我的 Maven 项目中。
这是我的pom.xml
:
<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>
Run Code Online (Sandbox Code Playgroud)
参考entity-manager
和hibernate-core
工作。但是hibernate-spatial
并postgis-jdbc
没有找到:
org.hibernate:hibernate-spatial:4.3 not found 检查 Maven 模型以解决问题。
(同样的错误postgis-jdbc
)
如何在我的项目中包含这些库?
hibernate-spatial
在5.0之前,该库在公共 maven 存储库中不可用。您始终可以通过浏览http://mvnrepository.com/(在本例中为http://mvnrepository.com/artifact/org.hibernate/hibernate-spatial)来检查可用的内容。
但是您可以将 hibernate 空间存储库添加到您的 POM,其中包含 hibernate-spatial 的早期版本:
<project ...>
...
<repositories>
<repository>
<id>Hibernate Spatial repo</id>
<url>http://www.hibernatespatial.org/repository</url>
</repository>
</repositories>
</project>
Run Code Online (Sandbox Code Playgroud)
这也包含postgis-jdbc
版本1.5.2中的匹配库。
归档时间: |
|
查看次数: |
2695 次 |
最近记录: |