gis项目在idea下启动前需要手动安装的包
mvn install:install-file -DgroupId=org.geotools.jdbc -DartifactId=gt-jdbc-oracle -Dversion=18.2 -Dpackaging=jar -Dfile=gt-jdbc-oracle-18.2.jar
mvn install:install-file -DgroupId=org.geotools -DartifactId=gt-main -Dversion=18.2 -Dpackaging=jar -Dfile=gt-main-18.2.jar
mvn install:install-file -DgroupId=org.geotools -DartifactId=gt-opengis -Dversion=18.2 -Dpackaging=jar -Dfile=gt-opengis-18.2.jar
mvn install:install-file -DgroupId=org.geotools -DartifactId=gt-geojson -Dversion=18.2 -Dpackaging=jar -Dfile=gt-geojson-18.2.jar
mvn install:install-file -DgroupId=org.geotools -DartifactId=gt-api -Dversion=18.2 -Dpackaging=jar -Dfile=gt-api-18.2.jar
mvn install:install-file -DgroupId=org.geotools -DartifactId=gt-metadata -Dversion=18.2 -Dpackaging=jar -Dfile=gt-metadata-18.2.jar
mvn install:install-file -DgroupId=org.geotools -DartifactId=gt-cql -Dversion=18.2 -Dpackaging=jar -Dfile=gt-cql-18.2.jar
mvn install:install-file -DgroupId=org.geotools -DartifactId=gt-referencing -Dversion=18.2 -Dpackaging=jar -Dfile=gt-referencing-18.2.jar
pom中需要引入的依赖:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<geotools.version>18.2</geotools.version>
</properties>
<dependencies>
<dependency>
<groupId>com.vividsolutions</groupId>
<artifactId>jts-core</artifactId>
<version>1.14.0</version>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc8</artifactId>
<version>12.2.0.1</version>
</dependency>
<dependency>
<groupId>org.geotools.jdbc</groupId>
<artifactId>gt-jdbc-oracle</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-main</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-opengis</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-geojson</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-api</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-metadata</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-cql</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-referencing</artifactId>
<version>${geotools.version}</version>
</dependency>
</dependencies>
<!-- Gis 远程仓库配置 start -->
<repositories>
<repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net repository</name>
<url>http://download.java.net/maven/2</url>
</repository>
<repository>
<id>osgeo</id>
<name>Open Source Geospatial Foundation Repository</name>
<url>http://download.osgeo.org/webdav/geotools/</url>
</repository>
<repository>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>boundless</id>
<name>Boundless Maven Repository</name>
<url>http://repo.boundlessgeo.com/main</url>
</repository>
</repositories>
<!-- Gis 远程仓库配置 end -->