Skip to content

Commit 8987bfa

Browse files
authored
Merge pull request #27 from sbabcoc/pr/migrate-to-ossrh-staging-api
Migrate to OSSRH Staging API; upgrade deps
2 parents b91f378 + b3332ff commit 8987bfa

11 files changed

+303
-148
lines changed

pom.xml

Lines changed: 32 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,18 @@
2727
<properties>
2828
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2929
<maven.compiler.release>8</maven.compiler.release>
30-
<settings.version>3.0.7</settings.version>
31-
<jsch.version>0.2.24</jsch.version>
32-
<commons-io.version>2.18.0</commons-io.version>
33-
<guava.version>33.4.6-jre</guava.version>
30+
<settings.version>3.0.10</settings.version>
31+
<jsch.version>2.27.2</jsch.version>
32+
<commons-io.version>2.20.0</commons-io.version>
3433
<java-utils.version>3.4.1</java-utils.version>
3534
<testng.version>7.5.1</testng.version>
36-
<compiler-plugin.version>3.10.1</compiler-plugin.version>
37-
<surefire-plugin.version>3.0.0-M7</surefire-plugin.version>
38-
<source-plugin.version>3.2.1</source-plugin.version>
39-
<javadoc-plugin.version>3.4.0</javadoc-plugin.version>
40-
<gpg-plugin.version>3.0.1</gpg-plugin.version>
41-
<staging-plugin.version>1.6.13</staging-plugin.version>
42-
<release-plugin.version>3.0.0-M6</release-plugin.version>
35+
<compiler-plugin.version>3.14.0</compiler-plugin.version>
36+
<surefire-plugin.version>3.5.3</surefire-plugin.version>
37+
<source-plugin.version>3.3.1</source-plugin.version>
38+
<javadoc-plugin.version>3.11.2</javadoc-plugin.version>
39+
<gpg-plugin.version>3.2.8</gpg-plugin.version>
40+
<staging-plugin.version>1.7.0</staging-plugin.version>
41+
<release-plugin.version>3.1.1</release-plugin.version>
4342
<skipSigning>true</skipSigning>
4443
</properties>
4544

@@ -53,129 +52,56 @@
5352
<distributionManagement>
5453
<snapshotRepository>
5554
<id>ossrh</id>
56-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
55+
<url>>https://ossrh-staging-api.central.sonatype.com/content/repositories/snapshots</url>
5756
</snapshotRepository>
5857
<repository>
5958
<id>ossrh</id>
60-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
59+
<url>https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/</url>
6160
</repository>
6261
</distributionManagement>
6362

64-
<dependencyManagement>
65-
<dependencies>
66-
<dependency>
67-
<groupId>com.github.mwiede</groupId>
68-
<artifactId>jsch</artifactId>
69-
<version>${jsch.version}</version>
70-
</dependency>
71-
<dependency>
72-
<groupId>commons-io</groupId>
73-
<artifactId>commons-io</artifactId>
74-
<version>${commons-io.version}</version>
75-
</dependency>
76-
<dependency>
77-
<groupId>com.google.guava</groupId>
78-
<artifactId>guava</artifactId>
79-
<version>${guava.version}</version>
80-
</dependency>
81-
<dependency>
82-
<groupId>com.nordstrom.tools</groupId>
83-
<artifactId>java-utils</artifactId>
84-
<version>${java-utils.version}</version>
85-
</dependency>
86-
<dependency>
87-
<groupId>com.nordstrom.tools</groupId>
88-
<artifactId>settings</artifactId>
89-
<version>${settings.version}</version>
90-
</dependency>
91-
<dependency>
92-
<groupId>org.testng</groupId>
93-
<artifactId>testng</artifactId>
94-
<version>${testng.version}</version>
95-
</dependency>
96-
</dependencies>
97-
</dependencyManagement>
98-
9963
<dependencies>
10064
<dependency>
10165
<groupId>com.github.mwiede</groupId>
10266
<artifactId>jsch</artifactId>
67+
<version>${jsch.version}</version>
10368
</dependency>
10469
<dependency>
10570
<groupId>commons-io</groupId>
10671
<artifactId>commons-io</artifactId>
107-
</dependency>
108-
<dependency>
109-
<groupId>com.google.guava</groupId>
110-
<artifactId>guava</artifactId>
72+
<version>${commons-io.version}</version>
11173
</dependency>
11274
<dependency>
11375
<groupId>com.nordstrom.tools</groupId>
11476
<artifactId>java-utils</artifactId>
77+
<version>${java-utils.version}</version>
11578
</dependency>
11679
<dependency>
11780
<groupId>com.nordstrom.tools</groupId>
11881
<artifactId>settings</artifactId>
82+
<version>${settings.version}</version>
11983
</dependency>
12084
<dependency>
12185
<groupId>org.testng</groupId>
12286
<artifactId>testng</artifactId>
87+
<version>${testng.version}</version>
12388
<scope>test</scope>
12489
</dependency>
12590
</dependencies>
12691

12792
<build>
128-
<pluginManagement>
129-
<plugins>
130-
<plugin>
131-
<groupId>org.apache.maven.plugins</groupId>
132-
<artifactId>maven-compiler-plugin</artifactId>
133-
<version>${compiler-plugin.version}</version>
134-
</plugin>
135-
<plugin>
136-
<groupId>org.apache.maven.plugins</groupId>
137-
<artifactId>maven-surefire-plugin</artifactId>
138-
<version>${surefire-plugin.version}</version>
139-
</plugin>
140-
<plugin>
141-
<groupId>org.apache.maven.plugins</groupId>
142-
<artifactId>maven-source-plugin</artifactId>
143-
<version>${source-plugin.version}</version>
144-
</plugin>
145-
<plugin>
146-
<groupId>org.apache.maven.plugins</groupId>
147-
<artifactId>maven-javadoc-plugin</artifactId>
148-
<version>${javadoc-plugin.version}</version>
149-
</plugin>
150-
<plugin>
151-
<groupId>org.apache.maven.plugins</groupId>
152-
<artifactId>maven-gpg-plugin</artifactId>
153-
<version>${gpg-plugin.version}</version>
154-
</plugin>
155-
<plugin>
156-
<groupId>org.sonatype.plugins</groupId>
157-
<artifactId>nexus-staging-maven-plugin</artifactId>
158-
<version>${staging-plugin.version}</version>
159-
</plugin>
160-
<plugin>
161-
<groupId>org.apache.maven.plugins</groupId>
162-
<artifactId>maven-release-plugin</artifactId>
163-
<version>${release-plugin.version}</version>
164-
</plugin>
165-
</plugins>
166-
</pluginManagement>
16793
<plugins>
16894
<plugin>
169-
<groupId>org.apache.maven.plugins</groupId>
17095
<artifactId>maven-compiler-plugin</artifactId>
96+
<version>${compiler-plugin.version}</version>
17197
</plugin>
17298
<plugin>
173-
<groupId>org.apache.maven.plugins</groupId>
17499
<artifactId>maven-surefire-plugin</artifactId>
100+
<version>${surefire-plugin.version}</version>
175101
</plugin>
176102
<plugin>
177-
<groupId>org.apache.maven.plugins</groupId>
178103
<artifactId>maven-source-plugin</artifactId>
104+
<version>${source-plugin.version}</version>
179105
<executions>
180106
<execution>
181107
<id>attach-sources</id>
@@ -186,8 +112,8 @@
186112
</executions>
187113
</plugin>
188114
<plugin>
189-
<groupId>org.apache.maven.plugins</groupId>
190115
<artifactId>maven-javadoc-plugin</artifactId>
116+
<version>${javadoc-plugin.version}</version>
191117
<executions>
192118
<execution>
193119
<id>attach-javadocs</id>
@@ -198,8 +124,8 @@
198124
</executions>
199125
</plugin>
200126
<plugin>
201-
<groupId>org.apache.maven.plugins</groupId>
202127
<artifactId>maven-gpg-plugin</artifactId>
128+
<version>${gpg-plugin.version}</version>
203129
<executions>
204130
<execution>
205131
<id>sign-artifacts</id>
@@ -218,16 +144,24 @@
218144
<plugin>
219145
<groupId>org.sonatype.plugins</groupId>
220146
<artifactId>nexus-staging-maven-plugin</artifactId>
147+
<version>${staging-plugin.version}</version>
221148
<extensions>true</extensions>
149+
<dependencies>
150+
<dependency>
151+
<groupId>io.github.x-stream</groupId>
152+
<artifactId>mxparser</artifactId>
153+
<version>1.2.1</version>
154+
</dependency>
155+
</dependencies>
222156
<configuration>
223157
<serverId>ossrh</serverId>
224-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
158+
<nexusUrl>https://ossrh-staging-api.central.sonatype.com/</nexusUrl>
225159
<autoReleaseAfterClose>true</autoReleaseAfterClose>
226160
</configuration>
227161
</plugin>
228162
<plugin>
229-
<groupId>org.apache.maven.plugins</groupId>
230163
<artifactId>maven-release-plugin</artifactId>
164+
<version>${release-plugin.version}</version>
231165
<configuration>
232166
<autoVersionSubmodules>true</autoVersionSubmodules>
233167
<useReleaseProfile>false</useReleaseProfile>

src/main/java/com/nordstrom/remote/RemoteChannelClosedException.java

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/main/java/com/nordstrom/remote/RemoteChannelInstantiationException.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,37 @@
22

33
import com.jcraft.jsch.JSchException;
44

5+
/**
6+
* This exception is thrown when an attempt to open a new channel fails.
7+
*/
58
public class RemoteChannelInstantiationException extends RuntimeException {
69

710
private static final long serialVersionUID = -3799742998512527137L;
811

12+
/**
13+
* Constructor for a new "remote channel instantiation" exception with
14+
* the specified cause.
15+
*
16+
* @param cause the cause (which is saved for later retrieval by the
17+
* {@link #getCause()} method). (A {@code null} value is
18+
* permitted, and indicates that the cause is nonexistent or
19+
* unknown.)
20+
*/
921
public RemoteChannelInstantiationException(JSchException cause) {
1022
super(cause);
1123
}
1224

25+
/**
26+
* Constructor for a new "remote channel instantiation" exception with
27+
* the specified message and cause.
28+
*
29+
* @param message the detail message (which is saved for later retrieval
30+
* by the {@link #getMessage()} method).
31+
* @param cause the cause (which is saved for later retrieval by the
32+
* {@link #getCause()} method). (A {@code null} value is
33+
* permitted, and indicates that the cause is nonexistent or
34+
* unknown.)
35+
*/
1336
public RemoteChannelInstantiationException(String message, JSchException cause) {
1437
super(message, cause);
1538
}

src/main/java/com/nordstrom/remote/RemoteConfig.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
import com.nordstrom.automation.settings.SettingsCore;
1010

11+
/**
12+
* This class declares settings and methods used to configure the <b>JSch</b> library.
13+
*/
1114
public class RemoteConfig extends SettingsCore<RemoteConfig.RemoteSettings> {
1215

1316
private static final String SETTINGS_FILE = "remote.properties";
@@ -19,6 +22,14 @@ public class RemoteConfig extends SettingsCore<RemoteConfig.RemoteSettings> {
1922
private static final int KILO = 2 ^ 10;
2023
private static final int BUFFER_SIZE = 100 * KILO;
2124

25+
/**
26+
* This enumeration declares the settings that enable you to control the parameters
27+
* that configure the <b>JSch</b> library.
28+
* <p>
29+
* Each setting is defined by a constant name and System property key. Many settings
30+
* also define default values. Note that all of these settings can be overridden via
31+
* the {@code remote.properties} file and System property declarations.
32+
*/
2233
public enum RemoteSettings implements SettingsCore.SettingsAPI {
2334
/** name: <b>remote.ssh.key.name</b> <br> default: <b>id_rsa</b> */
2435
SSH_KEY_NAME("remote.ssh.key.name", "id_rsa"),
@@ -119,6 +130,11 @@ public Path getKeyPath() {
119130
return null;
120131
}
121132

133+
/**
134+
* Get the path to the current user's SSH folder.
135+
*
136+
* @return user SSH folder path (i.e. - "{@code ~/.ssh}")
137+
*/
122138
public Path getSshFolderPath() {
123139
return Paths.get(System.getProperty("user.home"), ".ssh");
124140
}

src/main/java/com/nordstrom/remote/RemoteCredentialsUnspecifiedException.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
package com.nordstrom.remote;
22

3+
/**
4+
* This exception is thrown when no credentials are specified for a 'new channel' request.
5+
*/
36
public class RemoteCredentialsUnspecifiedException extends RuntimeException {
47

58
private static final long serialVersionUID = 2233125767260432607L;
69

10+
/**
11+
* Constructor for a new "remote credentials unspecified" exception.
12+
*/
713
public RemoteCredentialsUnspecifiedException() {
814
super("Neither password nor private key were specified");
915
}

0 commit comments

Comments
 (0)