Skip to content

Commit df049bb

Browse files
committed
feat: move to use Apache Mina SSHD
1 parent eb498c5 commit df049bb

141 files changed

Lines changed: 5731 additions & 38 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ charset = utf-8
99
trim_trailing_whitespace = true
1010
insert_final_newline = true
1111

12+
[*.java]
13+
indent_style = space
14+
indent_size = 4
15+
end_of_line = lf
16+
charset = utf-8
17+
trim_trailing_whitespace = true
18+
insert_final_newline = true
19+
1220
[Jenkinsfile*]
1321
indent_style = space
1422
indent_size = 2

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ buildPlugin(
66
useContainerAgent: false, // TestContainers
77
configurations: [
88
[platform: 'linux', jdk: 21],
9-
[platform: 'windows', jdk: 17],
9+
// [platform: 'windows', jdk: 17],
1010
])

pom.xml

Lines changed: 132 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
<packaging>hpi</packaging>
1414

1515
<name>SSH Build Agents plugin</name>
16-
<url>https://github.com/jenkinsci/ssh-agents-plugin</url>
1716
<description>Allows to launch agents over SSH, using a Java implementation of the SSH protocol</description>
17+
<url>https://github.com/jenkinsci/ssh-agents-plugin</url>
1818

1919
<licenses>
2020
<license>
@@ -24,14 +24,6 @@
2424
</license>
2525
</licenses>
2626

27-
<properties>
28-
<revision>3</revision>
29-
<changelist>999999-SNAPSHOT</changelist>
30-
<jenkins.baseline>2.479</jenkins.baseline>
31-
<jenkins.version>${jenkins.baseline}.3</jenkins.version>
32-
<hpi.compatibleSinceVersion>3.0.0</hpi.compatibleSinceVersion>
33-
</properties>
34-
3527
<developers>
3628
<developer>
3729
<id>stephenconnolly</id>
@@ -80,23 +72,17 @@
8072
<scm>
8173
<connection>scm:git:https://github.com/jenkinsci/ssh-agents-plugin.git</connection>
8274
<developerConnection>scm:git:git@github.com:jenkinsci/ssh-agents-plugin.git</developerConnection>
83-
<url>https://github.com/jenkinsci/ssh-agents-plugin</url>
8475
<tag>${scmTag}</tag>
76+
<url>https://github.com/jenkinsci/ssh-agents-plugin</url>
8577
</scm>
8678

87-
<repositories>
88-
<repository>
89-
<id>repo.jenkins-ci.org</id>
90-
<url>https://repo.jenkins-ci.org/public/</url>
91-
</repository>
92-
</repositories>
93-
94-
<pluginRepositories>
95-
<pluginRepository>
96-
<id>repo.jenkins-ci.org</id>
97-
<url>https://repo.jenkins-ci.org/public/</url>
98-
</pluginRepository>
99-
</pluginRepositories>
79+
<properties>
80+
<revision>3</revision>
81+
<changelist>999999-SNAPSHOT</changelist>
82+
<jenkins.baseline>2.479</jenkins.baseline>
83+
<jenkins.version>${jenkins.baseline}.3</jenkins.version>
84+
<hpi.compatibleSinceVersion>3.0.0</hpi.compatibleSinceVersion>
85+
</properties>
10086

10187
<dependencyManagement>
10288
<dependencies>
@@ -106,14 +92,32 @@
10692
<version>4862.vc32a_71c3e731</version>
10793
<type>pom</type>
10894
<scope>import</scope>
95+
<exclusions>
96+
<exclusion>
97+
<groupId>org.jenkins-ci.plugins</groupId>
98+
<artifactId>trilead-api</artifactId>
99+
</exclusion>
100+
</exclusions>
109101
</dependency>
110102
</dependencies>
111103
</dependencyManagement>
112104

113105
<dependencies>
114106
<dependency>
115-
<groupId>org.jenkins-ci.plugins</groupId>
116-
<artifactId>trilead-api</artifactId>
107+
<groupId>io.jenkins.plugins</groupId>
108+
<artifactId>eddsa-api</artifactId>
109+
</dependency>
110+
<dependency>
111+
<groupId>io.jenkins.plugins.mina-sshd-api</groupId>
112+
<artifactId>mina-sshd-api-common</artifactId>
113+
</dependency>
114+
<dependency>
115+
<groupId>io.jenkins.plugins.mina-sshd-api</groupId>
116+
<artifactId>mina-sshd-api-core</artifactId>
117+
</dependency>
118+
<dependency>
119+
<groupId>io.jenkins.plugins.mina-sshd-api</groupId>
120+
<artifactId>mina-sshd-api-scp</artifactId>
117121
</dependency>
118122
<dependency>
119123
<groupId>org.jenkins-ci.plugins</groupId>
@@ -122,10 +126,26 @@
122126
<dependency>
123127
<groupId>org.jenkins-ci.plugins</groupId>
124128
<artifactId>ssh-credentials</artifactId>
129+
<exclusions>
130+
<exclusion>
131+
<groupId>org.jenkins-ci.plugins</groupId>
132+
<artifactId>trilead-api</artifactId>
133+
</exclusion>
134+
</exclusions>
135+
</dependency>
136+
<!-- TODO remove in future versions -->
137+
<dependency>
138+
<groupId>org.jenkins-ci.plugins</groupId>
139+
<artifactId>trilead-api</artifactId>
140+
</dependency>
141+
<dependency>
142+
<groupId>io.jenkins</groupId>
143+
<artifactId>configuration-as-code</artifactId>
144+
<scope>test</scope>
125145
</dependency>
126146
<dependency>
127-
<groupId>org.jenkins-ci.modules</groupId>
128-
<artifactId>sshd</artifactId>
147+
<groupId>io.jenkins.configuration-as-code</groupId>
148+
<artifactId>test-harness</artifactId>
129149
<scope>test</scope>
130150
</dependency>
131151
<dependency>
@@ -140,22 +160,97 @@
140160
</exclusion>
141161
</exclusions>
142162
</dependency>
143-
<dependency>
144-
<groupId>io.jenkins</groupId>
145-
<artifactId>configuration-as-code</artifactId>
146-
<scope>test</scope>
147-
</dependency>
148-
<dependency>
149-
<groupId>io.jenkins.configuration-as-code</groupId>
150-
<artifactId>test-harness</artifactId>
151-
<scope>test</scope>
152-
</dependency>
153163
<!-- Jupiter/JUnit 5 testcontainers https://java.testcontainers.org/test_framework_integration/junit_5/ -->
154164
<dependency>
155165
<groupId>org.testcontainers</groupId>
156166
<artifactId>junit-jupiter</artifactId>
157167
<version>1.21.1</version>
158168
<scope>test</scope>
159169
</dependency>
170+
<!--
171+
<dependency>
172+
<groupId>org.jenkins-ci.plugins</groupId>
173+
<artifactId>bouncycastle-api</artifactId>
174+
</dependency>-->
160175
</dependencies>
176+
177+
<repositories>
178+
<repository>
179+
<id>repo.jenkins-ci.org</id>
180+
<url>https://repo.jenkins-ci.org/public/</url>
181+
</repository>
182+
</repositories>
183+
184+
<pluginRepositories>
185+
<pluginRepository>
186+
<id>repo.jenkins-ci.org</id>
187+
<url>https://repo.jenkins-ci.org/public/</url>
188+
</pluginRepository>
189+
</pluginRepositories>
190+
<build>
191+
<plugins>
192+
<plugin>
193+
<groupId>com.diffplug.spotless</groupId>
194+
<artifactId>spotless-maven-plugin</artifactId>
195+
<version>2.43.0</version>
196+
<configuration>
197+
<java>
198+
<includes>
199+
<include>src/main/java/io/jenkins/plugins/sshbuildagents/ssh/**/*.java</include>
200+
<include>src/test/java/io/jenkins/plugins/sshbuildagents/ssh/**/*.java</include>
201+
</includes>
202+
<importOrder>
203+
<order>java,javax,org,com,io,hudson,jenkins,\\#</order>
204+
</importOrder>
205+
<removeUnusedImports />
206+
<trimTrailingWhitespace />
207+
<endWithNewline />
208+
<googleJavaFormat>
209+
<version>1.17.0</version>
210+
<style>GOOGLE</style>
211+
<reflowLongStrings>true</reflowLongStrings>
212+
</googleJavaFormat>
213+
<formatAnnotations />
214+
<indent>
215+
<spaces>true</spaces>
216+
<spacesPerTab>4</spacesPerTab>
217+
</indent>
218+
</java>
219+
<encoding>UTF-8</encoding>
220+
</configuration>
221+
<executions>
222+
<execution>
223+
<goals>
224+
<goal>check</goal>
225+
</goals>
226+
</execution>
227+
</executions>
228+
</plugin>
229+
<plugin>
230+
<groupId>org.jenkins-ci.tools</groupId>
231+
<artifactId>maven-hpi-plugin</artifactId>
232+
<configuration>
233+
<loggers>
234+
<hudson.remoting>FINE</hudson.remoting>
235+
<hudson.slaves>FINE</hudson.slaves>
236+
<io.jenkins.plugins.sshbuildagents>FINE</io.jenkins.plugins.sshbuildagents>
237+
<org.apache.sshd.common.io.nio2>FINE</org.apache.sshd.common.io.nio2>
238+
<org.apache.sshd>FINE</org.apache.sshd>
239+
</loggers>
240+
<minimumJavaVersion>${java.level}</minimumJavaVersion>
241+
</configuration>
242+
</plugin>
243+
<plugin>
244+
<artifactId>maven-surefire-plugin</artifactId>
245+
<configuration>
246+
<systemPropertyVariables>
247+
<java.util.logging.config.file>src/test/resources/remoting_logger.properties</java.util.logging.config.file>
248+
<hudson.remoting.Launcher.pingIntervalSec>-1</hudson.remoting.Launcher.pingIntervalSec>
249+
<hudson.slaves.ChannelPinger.pingIntervalSeconds>-1</hudson.slaves.ChannelPinger.pingIntervalSeconds>
250+
<jenkins.test.timeout>-1</jenkins.test.timeout>
251+
</systemPropertyVariables>
252+
</configuration>
253+
</plugin>
254+
</plugins>
255+
</build>
161256
</project>

0 commit comments

Comments
 (0)