Skip to content

Commit bd6e0fa

Browse files
authored
Setup mvn with SFTP (#460)
* Setup mvn with SFTP * Fixed
1 parent 62f1c4d commit bd6e0fa

3 files changed

Lines changed: 13 additions & 12 deletions

File tree

.github/workflows/CI.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ jobs:
5050
server-username: MAVEN_USERNAME
5151
server-password: MAVEN_PASSWORD
5252
- name: Publish package
53-
run: mvn clean install deploy -Ppostgres # published version includes only the postgres drivers. Auditing module is not added to the published version.
53+
run: |
54+
# Setup SSH keys for SFTP
55+
mkdir -p ~/.ssh
56+
# add geo-solutions.it to known hosts to avoid prompts
57+
ssh-keyscan -H maven.geo-solutions.it >> ~/.ssh/known_hosts
58+
mvn clean install deploy -Ppostgres # published version includes only the postgres drivers. Auditing module is not added to the published version.
5459
env:
5560
MAVEN_USERNAME: ${{ secrets.GS_MAVEN_USERNAME }}
5661
MAVEN_PASSWORD: ${{ secrets.GS_MAVEN_PASSWORD }}

pom.xml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
<dependency-check-maven.version>9.0.9</dependency-check-maven.version>
180180
<fmt-maven-plugin.version>2.9.1</fmt-maven-plugin.version>
181181
<directory-maven-plugin.version>0.3.1</directory-maven-plugin.version>
182-
<wagon-ftp.version>2.10</wagon-ftp.version>
182+
<wagon-ssh.version>3.5.3</wagon-ssh.version>
183183
<jacoco-maven-plugin.version>0.8.10</jacoco-maven-plugin.version>
184184
<coveralls-maven-plugin.version>4.1.0</coveralls-maven-plugin.version>
185185
<cobertura-maven-plugin.version>2.7</cobertura-maven-plugin.version>
@@ -201,18 +201,14 @@
201201
<repository>
202202
<uniqueVersion>false</uniqueVersion>
203203
<id>geosolutions</id>
204-
<url>ftp://maven.geo-solutions.it/</url>
204+
<url>sftp://maven.geo-solutions.it/</url>
205205
</repository>
206206
<!-- use the following if you ARE using a snapshot version. -->
207207
<snapshotRepository>
208208
<uniqueVersion>false</uniqueVersion>
209209
<id>geosolutions</id>
210-
<url>ftp://maven.geo-solutions.it/</url>
210+
<url>sftp://maven.geo-solutions.it/</url>
211211
</snapshotRepository>
212-
<site>
213-
<id>demo.geosolutions</id>
214-
<url>scp://demo.geo-solutions.it/var/www/share/javadoc/geostore/${project.version}</url>
215-
</site>
216212
</distributionManagement>
217213

218214
<build>
@@ -390,8 +386,8 @@
390386
<extensions>
391387
<extension>
392388
<groupId>org.apache.maven.wagon</groupId>
393-
<artifactId>wagon-ftp</artifactId>
394-
<version>${wagon-ftp.version}</version>
389+
<artifactId>wagon-ssh</artifactId>
390+
<version>${wagon-ssh.version}</version>
395391
</extension>
396392
</extensions>
397393

src/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@
4343
<repository>
4444
<uniqueVersion>false</uniqueVersion>
4545
<id>geosolutions</id>
46-
<url>ftp://maven.geo-solutions.it/</url>
46+
<url>sftp://maven.geo-solutions.it/</url>
4747
</repository>
4848
<!-- use the following if you ARE using a snapshot version. -->
4949
<snapshotRepository>
5050
<uniqueVersion>false</uniqueVersion>
5151
<id>geosolutions</id>
52-
<url>ftp://maven.geo-solutions.it/</url>
52+
<url>sftp://maven.geo-solutions.it/</url>
5353
</snapshotRepository>
5454
</distributionManagement>
5555

0 commit comments

Comments
 (0)