---
# System prepended metadata

title: 'Note: deploy to our archive'
tags: [h2beaver]

---

###### tags: `h2beaver`

# Note: deploy to our archive

我們今天來設定一下本週進度

1. 把 https://h2-gitlab.pointing.tw/h2beaver/ 下的三個專案， maven repo 改指到 h2-archiva.pointing.tw, 並可以順利 deploy
2. 建立這次需要的 repos (groupId & artifactId 再確認）


我們先來完成這個 task 吧
把 https://h2-gitlab.pointing.tw/h2beaver/ 下的三個專案， maven repo 改指到 h2-archiva.pointing.tw, 並可以順利 deploy
就是把 pom 裡的 distributionManagement, 原來是 http://localhost:8088 的都改成 https://h2-archiva.pointing.tw
理論上不會遇到什麼問題才對 (but who knows...)

----

## Edit pom.xml
- `river-yilan-vector/pom.xml` and `terrain-taiwan-raster_20m/pom.xml`
```xml=
  <distributionManagement>
    <repository>
      <id>archiva.internal</id>
      <name>Internal Release Repository</name>
      <!-- <url>http://localhost:8088/repository/internal/</url> -->
      <url>https://h2-archiva.pointing.tw/repository/internal/</url>
    </repository>
    <snapshotRepository>
      <id>archiva.snapshots</id>
      <name>Internal Snapshot Repository</name>
      <!-- <url>http://localhost:8088/repository/snapshots/</url> -->
      <url>https://h2-archiva.pointing.tw/repository/snapshots/</url>    
    </snapshotRepository>
  </distributionManagement>
```
- `catchment-yilan-vector/pom.xml` 
```xml=
  <repositories>
    <repository>
      <id>archiva.internal</id>
      <name>Internal Release Repository</name>
      <!-- <url>http://localhost:8088/repository/internal/</url> -->
      <url>https://h2-archiva.pointing.tw/repository/internal/</url>
      <snapshots>
          <enabled>false</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>archiva.snapshots</id>
      <name>Internal Snapshot Repository</name>
      <!-- <url>http://localhost:8088/repository/snapshots/</url> -->
      <url>https://h2-archiva.pointing.tw/repository/snapshots/</url> 
      <snapshots>
          <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
  <distributionManagement>
    <repository>
      <id>archiva.internal</id>
      <name>Internal Release Repository</name>
      <!-- <url>http://localhost:8088/repository/internal/</url> -->
      <url>https://h2-archiva.pointing.tw/repository/internal/</url> 
    </repository>
    <snapshotRepository>
      <id>archiva.snapshots</id>
      <name>Internal Snapshot Repository</name>
      <!-- <url>http://localhost:8088/repository/snapshots/</url> -->
      <url>https://h2-archiva.pointing.tw/repository/snapshots/</url> 
    </snapshotRepository>
  </distributionManagement>
```
## Edit h2.xml
Modify `catchment-yilan-vector/assembly/h2.xml` to uncomment `<dependencySets>`
## mvn install
DO `mvn install` in:
- river-yilan-vector-master
    - SUCCESS
- terrain-taiwan-raster_20m
    - SUCCESS
- catchment-yilan-vector
    - SUCCESS
## mvn deploy
DO `mvn deploy` in:
- catchment-yilan-vector
    - SUCCESS
- terrain-taiwan-raster_20m
    - SUCCESS
- river-yilan-vector-master
    - SUCCESS
## Check on https://h2-archiva.pointing.tw/repository/snapshots/h2beaver/
Inside
- catchment-yilan-vector	 	 
- river-yilan-vector	 	 
- terrain-taiwan-raster_20m	

, there are some corresponding time-stamp .
