maven pom依赖私库
有时候依赖某些jar包以后,pom文件会报错,表示找不到这个资源,可能这个资源已经不存在了,不过更有可能是这个资源不在中央库,这时候就需要指定远程库,也就是私库。
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-geojson</artifactId>
<version>12.0</version>
</dependency>
比如上面用到的这个geotools,直接引入就会报错,需要加上以下这些
<repository>
<id>osgeo</id>
<name>Open Source Geospatial Foundation Repository</name>
<url>http://download.osgeo.org/webdav/geotools/</url>
</repository>
- id:开源空间信息基金会简称,id是镜像的唯一标识
- name:仓库名
- url:镜像的url链接地址