개발Story

java에서 GeoSolutions 이라는 maven을 추가하면 동적으로 postgres, geoserver를 컨트롤 할 수 있다.

 

처음이니 설정파일인 pom.xml 설정을 알아보자.

 

여기에 추가하는 version은 23.1을 공통으로 쓸 예정이다.

 

 

1. 공통으로 사용할 버전인 23.1을 프로퍼티로 설정하기.

<properties>

  <geotools.version>23.1</geotools.version>

</properties>

 

2. repository를 설정한다.

<repository>

<id>GeoSolutions</id>
<url>maven.geo-solutions.it/</url>

</repository>

<repository>

<id>osgeo</id>
<name>Open Source Geospatial Foundation Repository</name>

<url>repo.osgeo.org/repository/release/</url>

</repository>

 

3.dependency를 추가한다.

 

  <!--gistools 관련 START -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.30</version>
</dependency>

 

 

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.6.4</version>
<exclusions>
<exclusion>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
</dependency>

 

<dependency>
<groupId>it.geosolutions</groupId>
<artifactId>geoserver-manager</artifactId>
<version>1.7.0</version>
<exclusions>
<exclusion>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>

 

 

<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-shapefile</artifactId>
<version>${geotools.version}</version>
</dependency>

 

<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-main</artifactId>
<version>${geotools.version}</version>
</dependency>

 

<dependency>

<group>org.geotools.jdbc</groupId>

<artifactId>gt-jdbc-postgis</artifactId>
<version>${geotools.version}</version>

</dependency>

 

<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-wfs-ng</artifactId>
<version>${geotools.version}</version>
</dependency>

 

<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-swing</artifactId>
<version>${geotools.version}</version>
<exclusions>
<exclusion>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>

</dependency>

 

<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-epsg-hsql</artifactId>
<version>${geotools.version}</version>
</dependency>

 

<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-geometry</artifactId>
<version>${geotools.version}</version>
</dependency>

 

<dependency>
<groupId>net.postgis</groupId>
<artifactId>postgis-jdbc</artifactId>
<version>2.1.7.2</version>
<exclusions>
<exclusion>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
</dependency>

 

<dependency>

<groupId>org.jsoup</groupId>

<artifactId>jsoup</artifactId>
<version>1.10.1</version>
</dependency>

 

<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-metadata</artifactId>
<version>${geotools.version}</version>
</dependency>

 

<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-opengis</artifactId>
<version>${geotools.version}</version>
</dependency>

 

<dependency>
<groupId>com.vividsolutions</groupId>
<artifactId>jts</artifactId>
<version>1.13</version>
</dependency>
<!--gistools 관련 END -->

 

길다.. 이렇게 환경 끝!

 

 

profile

개발Story

@슬래기

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!