Skip to content

Commit d541b12

Browse files
authored
Add SFTP config for publishing (#76)
1 parent 1951723 commit d541b12

File tree

2 files changed

+22
-17
lines changed

2 files changed

+22
-17
lines changed

.github/workflows/CI.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
distribution: 'adopt'
2727
cache: maven
2828
- name: Build with Maven
29-
run: mvn -B clean install
29+
run: mvn -B clean install
3030
## Only on push event, publish on geosolutions maven repo
3131
publish:
3232
runs-on: ubuntu-latest
@@ -44,7 +44,12 @@ jobs:
4444
server-username: MAVEN_USERNAME
4545
server-password: MAVEN_PASSWORD
4646
- name: Publish package
47-
run: mvn -B clean install deploy
47+
run: |
48+
# Setup SSH keys for SFTP
49+
mkdir -p ~/.ssh
50+
# add geo-solutions.it to known hosts to avoid prompts
51+
ssh-keyscan -H maven.geo-solutions.it >> ~/.ssh/known_hosts
52+
mvn -B clean install deploy
4853
env:
4954
MAVEN_USERNAME: ${{ secrets.GS_MAVEN_USERNAME }}
5055
MAVEN_PASSWORD: ${{ secrets.GS_MAVEN_PASSWORD }}

pom.xml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@
66
<version>1.6-SNAPSHOT</version>
77
<name>http_proxy</name>
88
<url>https://maven.apache.org</url>
9-
9+
1010
<!-- The SCM -->
1111
<scm>
1212
<connection>scm:git:[fetch=]git@github.com:geosolutions-it/http-proxy.git[push=]git@github.com:geosolutions-it/http-proxy.git</connection>
1313
<tag>master</tag>
1414
<url>https://github.com/geosolutions-it/http-proxy</url>
1515
</scm>
16-
16+
1717
<distributionManagement>
1818
<!-- GeoSolutions Repository -->
1919
<repository>
2020
<uniqueVersion>false</uniqueVersion>
2121
<id>geosolutions</id>
22-
<url>ftp://maven.geo-solutions.it</url>
22+
<url>sftp://maven.geo-solutions.it</url>
2323
</repository>
2424
</distributionManagement>
25-
25+
2626
<build>
2727
<plugins>
2828
<plugin>
@@ -41,7 +41,7 @@
4141
<configuration>
4242
<skip>false</skip>
4343
</configuration>
44-
</plugin>
44+
</plugin>
4545

4646
<plugin>
4747
<groupId>org.apache.maven.plugins</groupId>
@@ -78,7 +78,7 @@
7878
</execution>
7979
</executions>
8080
</plugin>
81-
81+
8282
<plugin>
8383
<groupId>org.apache.maven.plugins</groupId>
8484
<artifactId>maven-deploy-plugin</artifactId>
@@ -102,7 +102,7 @@
102102
</configuration>
103103
</execution>
104104
</executions>
105-
</plugin>
105+
</plugin>
106106

107107
<plugin>
108108
<groupId>org.apache.maven.plugins</groupId>
@@ -132,7 +132,7 @@
132132
<webAppSourceDirectory>${project.build.directory}/${project.artifactId}-${project.version}</webAppSourceDirectory>
133133
</configuration>
134134
</plugin>
135-
135+
136136
<!-- versioning -->
137137
<plugin>
138138
<groupId>org.apache.maven.plugins</groupId>
@@ -147,8 +147,8 @@
147147
<extensions>
148148
<extension>
149149
<groupId>org.apache.maven.wagon</groupId>
150-
<artifactId>wagon-ftp</artifactId>
151-
<version>1.0-beta-7</version>
150+
<artifactId>wagon-ssh</artifactId>
151+
<version>3.5.3</version>
152152
</extension>
153153
</extensions>
154154
</build>
@@ -292,7 +292,7 @@
292292
<groupId>commons-io</groupId>
293293
<artifactId>commons-io</artifactId>
294294
</dependency>
295-
295+
296296
<dependency>
297297
<groupId>commons-codec</groupId>
298298
<artifactId>commons-codec</artifactId>
@@ -310,9 +310,9 @@
310310
<scope>test</scope>
311311
</dependency>
312312

313-
<dependency>
314-
<groupId>org.mortbay.jetty</groupId>
315-
<artifactId>jetty-servlet-tester</artifactId>
313+
<dependency>
314+
<groupId>org.mortbay.jetty</groupId>
315+
<artifactId>jetty-servlet-tester</artifactId>
316316
<scope>test</scope>
317317
</dependency>
318318

@@ -328,7 +328,7 @@
328328
<artifactId>wiremock-jre8-standalone</artifactId>
329329
<scope>test</scope>
330330
</dependency>
331-
331+
332332
</dependencies>
333333

334334
<repositories>

0 commit comments

Comments
 (0)