Skip to content

Commit 859010b

Browse files
authored
Migrate to OSSRH Staging API; upgrade deps/plugins (#41)
1 parent 24f7fb4 commit 859010b

8 files changed

Lines changed: 190 additions & 90 deletions

File tree

pom.xml

Lines changed: 29 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@
3131
<logback.version>1.3.15</logback.version>
3232
<slf4j.version>2.0.17</slf4j.version>
3333
<testng.version>7.5.1</testng.version>
34-
<compiler-plugin.version>3.10.1</compiler-plugin.version>
35-
<surefire-plugin.version>3.0.0-M7</surefire-plugin.version>
36-
<source-plugin.version>3.2.1</source-plugin.version>
37-
<javadoc-plugin.version>3.4.0</javadoc-plugin.version>
38-
<gpg-plugin.version>3.0.1</gpg-plugin.version>
39-
<staging-plugin.version>1.6.13</staging-plugin.version>
40-
<release-plugin.version>3.0.0-M6</release-plugin.version>
34+
<compiler-plugin.version>3.14.0</compiler-plugin.version>
35+
<surefire-plugin.version>3.5.3</surefire-plugin.version>
36+
<source-plugin.version>3.3.1</source-plugin.version>
37+
<javadoc-plugin.version>3.11.2</javadoc-plugin.version>
38+
<gpg-plugin.version>3.2.8</gpg-plugin.version>
39+
<staging-plugin.version>1.7.0</staging-plugin.version>
40+
<release-plugin.version>3.1.1</release-plugin.version>
4141
<apache-derby.version>10.14.2.0</apache-derby.version>
4242
<skipSigning>true</skipSigning>
4343
</properties>
@@ -52,129 +52,65 @@
5252
<distributionManagement>
5353
<snapshotRepository>
5454
<id>ossrh</id>
55-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
55+
<url>>https://ossrh-staging-api.central.sonatype.com/content/repositories/snapshots</url>
5656
</snapshotRepository>
5757
<repository>
5858
<id>ossrh</id>
59-
<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>
6060
</repository>
6161
</distributionManagement>
6262

63-
<dependencyManagement>
64-
<dependencies>
65-
<dependency>
66-
<groupId>ch.qos.logback</groupId>
67-
<artifactId>logback-classic</artifactId>
68-
<version>${logback.version}</version>
69-
</dependency>
70-
<dependency>
71-
<groupId>ch.qos.logback</groupId>
72-
<artifactId>logback-core</artifactId>
73-
<version>${logback.version}</version>
74-
</dependency>
75-
<dependency>
76-
<groupId>org.slf4j</groupId>
77-
<artifactId>slf4j-api</artifactId>
78-
<version>${slf4j.version}</version>
79-
</dependency>
80-
<dependency>
81-
<groupId>org.testng</groupId>
82-
<artifactId>testng</artifactId>
83-
<version>${testng.version}</version>
84-
</dependency>
85-
<dependency>
86-
<groupId>org.apache.derby</groupId>
87-
<artifactId>derby</artifactId>
88-
<version>${apache-derby.version}</version>
89-
</dependency>
90-
</dependencies>
91-
</dependencyManagement>
92-
9363
<dependencies>
9464
<dependency>
9565
<groupId>ch.qos.logback</groupId>
9666
<artifactId>logback-classic</artifactId>
67+
<version>${logback.version}</version>
9768
<scope>test</scope>
9869
</dependency>
9970
<dependency>
10071
<groupId>ch.qos.logback</groupId>
10172
<artifactId>logback-core</artifactId>
73+
<version>${logback.version}</version>
10274
<scope>test</scope>
10375
</dependency>
10476
<dependency>
10577
<groupId>org.slf4j</groupId>
10678
<artifactId>slf4j-api</artifactId>
79+
<version>${slf4j.version}</version>
10780
<scope>test</scope>
10881
</dependency>
10982
<dependency>
11083
<groupId>org.testng</groupId>
11184
<artifactId>testng</artifactId>
85+
<version>${testng.version}</version>
11286
<scope>test</scope>
11387
</dependency>
11488
<dependency>
11589
<groupId>org.apache.derby</groupId>
11690
<artifactId>derby</artifactId>
91+
<version>${apache-derby.version}</version>
11792
<scope>test</scope>
11893
</dependency>
11994
</dependencies>
12095

12196
<build>
122-
<pluginManagement>
123-
<plugins>
124-
<plugin>
125-
<groupId>org.apache.maven.plugins</groupId>
126-
<artifactId>maven-compiler-plugin</artifactId>
127-
<version>${compiler-plugin.version}</version>
128-
</plugin>
129-
<plugin>
130-
<groupId>org.apache.maven.plugins</groupId>
131-
<artifactId>maven-surefire-plugin</artifactId>
132-
<version>${surefire-plugin.version}</version>
133-
</plugin>
134-
<plugin>
135-
<groupId>org.apache.maven.plugins</groupId>
136-
<artifactId>maven-source-plugin</artifactId>
137-
<version>${source-plugin.version}</version>
138-
</plugin>
139-
<plugin>
140-
<groupId>org.apache.maven.plugins</groupId>
141-
<artifactId>maven-javadoc-plugin</artifactId>
142-
<version>${javadoc-plugin.version}</version>
143-
</plugin>
144-
<plugin>
145-
<groupId>org.apache.maven.plugins</groupId>
146-
<artifactId>maven-gpg-plugin</artifactId>
147-
<version>${gpg-plugin.version}</version>
148-
</plugin>
149-
<plugin>
150-
<groupId>org.sonatype.plugins</groupId>
151-
<artifactId>nexus-staging-maven-plugin</artifactId>
152-
<version>${staging-plugin.version}</version>
153-
</plugin>
154-
<plugin>
155-
<groupId>org.apache.maven.plugins</groupId>
156-
<artifactId>maven-release-plugin</artifactId>
157-
<version>${release-plugin.version}</version>
158-
</plugin>
159-
</plugins>
160-
</pluginManagement>
16197
<plugins>
16298
<plugin>
163-
<groupId>org.apache.maven.plugins</groupId>
16499
<artifactId>maven-compiler-plugin</artifactId>
100+
<version>${compiler-plugin.version}</version>
165101
</plugin>
166102
<plugin>
167-
<groupId>org.apache.maven.plugins</groupId>
168103
<artifactId>maven-surefire-plugin</artifactId>
104+
<version>${surefire-plugin.version}</version>
169105
<configuration>
170106
<jdkToolchain>
171107
<version>${maven.compiler.release}</version>
172108
</jdkToolchain>
173109
</configuration>
174110
</plugin>
175111
<plugin>
176-
<groupId>org.apache.maven.plugins</groupId>
177112
<artifactId>maven-source-plugin</artifactId>
113+
<version>${source-plugin.version}</version>
178114
<executions>
179115
<execution>
180116
<id>attach-sources</id>
@@ -185,8 +121,8 @@
185121
</executions>
186122
</plugin>
187123
<plugin>
188-
<groupId>org.apache.maven.plugins</groupId>
189124
<artifactId>maven-javadoc-plugin</artifactId>
125+
<version>${javadoc-plugin.version}</version>
190126
<executions>
191127
<execution>
192128
<id>attach-javadocs</id>
@@ -197,8 +133,8 @@
197133
</executions>
198134
</plugin>
199135
<plugin>
200-
<groupId>org.apache.maven.plugins</groupId>
201136
<artifactId>maven-gpg-plugin</artifactId>
137+
<version>${gpg-plugin.version}</version>
202138
<executions>
203139
<execution>
204140
<id>sign-artifacts</id>
@@ -217,16 +153,24 @@
217153
<plugin>
218154
<groupId>org.sonatype.plugins</groupId>
219155
<artifactId>nexus-staging-maven-plugin</artifactId>
156+
<version>${staging-plugin.version}</version>
220157
<extensions>true</extensions>
158+
<dependencies>
159+
<dependency>
160+
<groupId>io.github.x-stream</groupId>
161+
<artifactId>mxparser</artifactId>
162+
<version>1.2.1</version>
163+
</dependency>
164+
</dependencies>
221165
<configuration>
222166
<serverId>ossrh</serverId>
223-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
167+
<nexusUrl>https://ossrh-staging-api.central.sonatype.com/</nexusUrl>
224168
<autoReleaseAfterClose>true</autoReleaseAfterClose>
225169
</configuration>
226170
</plugin>
227171
<plugin>
228-
<groupId>org.apache.maven.plugins</groupId>
229172
<artifactId>maven-release-plugin</artifactId>
173+
<version>${release-plugin.version}</version>
230174
<configuration>
231175
<autoVersionSubmodules>true</autoVersionSubmodules>
232176
<useReleaseProfile>false</useReleaseProfile>

src/main/java/com/nordstrom/common/base/StackTrace.java

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,46 @@
44
* Throwable created purely for the purposes of reporting a stack trace.
55
*
66
* This is not an Error or an Exception and is not expected to be thrown or caught.
7-
* This <a href='https://blog.vanillajava.blog/2021/12/unusual-java-stacktrace-extends.html'>blog post</a> provided the
8-
* original implementation.
7+
* This <a href='https://blog.vanillajava.blog/2021/12/unusual-java-stacktrace-extends.html'>blog post</a>
8+
* provided the original implementation.
99
* @author <a href='https://github.com/peter-lawrey'>Peter K Lawrey</a>
1010
*/
11-
1211
public class StackTrace extends Throwable {
1312

1413
private static final long serialVersionUID = -3623586250962214453L;
1514

15+
/**
16+
* Constructor for <b>StackTrace</b> with default message ("stack trace")
17+
*/
1618
public StackTrace() {
1719
this("stack trace");
1820
}
1921

22+
/**
23+
* Constructor for <b>StackTrace</b> with specified message.
24+
*
25+
* @param message stack trace message
26+
*/
2027
public StackTrace(String message) {
2128
this(message, null);
2229
}
2330

31+
/**
32+
* Constructor for <b>StackTrace</b> with specified message and cause.
33+
*
34+
* @param message stack trace message
35+
* @param cause stack trace cause
36+
*/
2437
public StackTrace(String message, Throwable cause) {
2538
super(message + " on " + Thread.currentThread().getName(), cause);
2639
}
2740

41+
/**
42+
* Static factory to capture a stack trace for the specified thread.
43+
*
44+
* @param t thread for which stack trace should be captured
45+
* @return {@link StackTrace} object with a string representing the thread as its message
46+
*/
2847
public static StackTrace forThread(Thread t) {
2948
if (t == null) return null;
3049

src/main/java/com/nordstrom/common/clazz/CustomClassLoader.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ public class CustomClassLoader extends ClassLoader {
1616

1717
private final URL[] pathUrls;
1818

19+
/**
20+
* Constructor for <b>CustomClassLoader</b> instances.
21+
*
22+
* @param classpath class path for this class loader
23+
*/
1924
public CustomClassLoader(String classpath) {
2025
pathUrls = Arrays.stream(classpath.split(File.pathSeparator)).map(entry -> {
2126
try {

src/main/java/com/nordstrom/common/file/OSInfo.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,28 @@ public static String arch() {
132132
* This enumeration defines the default set of operating system mappings.
133133
*/
134134
public enum OSType implements OSProps {
135+
/**
136+
* OS type: <b>Windows</b><br>
137+
* pattern: <b>(?i).*win.*</b>
138+
*/
135139
WINDOWS("(?i).*win.*"),
140+
141+
/**
142+
* OS type: <b>Macintosh</b><br>
143+
* pattern: <b>(?i).*mac.*</b>
144+
*/
136145
MACINTOSH("(?i).*mac.*"),
146+
147+
/**
148+
* OS type: <b>Unix</b><br>
149+
* pattern: <b>(?i).*(?:nix|nux|aix).*</b>
150+
*/
137151
UNIX("(?i).*(?:nix|nux|aix).*"),
152+
153+
/**
154+
* OS type: <b>Solaris</b><br>
155+
* pattern: <b>(?i).*sunos.*</b>
156+
*/
138157
SOLARIS("(?i).*sunos.*");
139158

140159
OSType(String pattern) {

src/main/java/com/nordstrom/common/file/PathUtils.java

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,60 @@ private PathUtils() {
7070
* This enumeration contains methods to help build proxy subclass names and select reports directories.
7171
*/
7272
public enum ReportsDirectory {
73-
73+
/**
74+
* SureFire test class pattern #1<br>
75+
* pattern: <b>(Test)(.*)</b><br>
76+
* folder: <b>surefire-reports</b>
77+
*/
7478
SUREFIRE_1("(Test)(.*)", SUREFIRE_PATH),
79+
80+
/**
81+
* SureFire test class pattern #2<br>
82+
* pattern: <b>(.*)(Test)</b><br>
83+
* folder: <b>surefire-reports</b>
84+
*/
7585
SUREFIRE_2("(.*)(Test)", SUREFIRE_PATH),
86+
87+
/**
88+
* SureFire test class pattern #3<br>
89+
* pattern: <b>(.*)(Tests)</b><br>
90+
* folder: <b>surefire-reports</b>
91+
*/
7692
SUREFIRE_3("(.*)(Tests)", SUREFIRE_PATH),
93+
94+
/**
95+
* SureFire test class pattern #4<br>
96+
* pattern: <b>(.*)(TestCase)</b><br>
97+
* folder: <b>surefire-reports</b>
98+
*/
7799
SUREFIRE_4("(.*)(TestCase)", SUREFIRE_PATH),
100+
101+
/**
102+
* FailSafe test class pattern #1<br>
103+
* pattern: <b>(IT)(.*)</b><br>
104+
* folder: <b>failsafe-reports</b>
105+
*/
78106
FAILSAFE_1("(IT)(.*)", FAILSAFE_PATH),
107+
108+
/**
109+
* FailSafe test class pattern #2<br>
110+
* pattern: <b>(.*)(IT)</b><br>
111+
* folder: <b>failsafe-reports</b>
112+
*/
79113
FAILSAFE_2("(.*)(IT)", FAILSAFE_PATH),
114+
115+
/**
116+
* FailSafe test class pattern #3<br>
117+
* pattern: <b>(.*)(ITCase)</b><br>
118+
* folder: <b>failsafe-reports</b>
119+
*/
80120
FAILSAFE_3("(.*)(ITCase)", FAILSAFE_PATH),
121+
122+
/**
123+
* Artifact test class pattern<br>
124+
* pattern: <b>.*</b><br>
125+
* folder: <b>artifact-capture</b>
126+
*/
81127
ARTIFACT(".*", "artifact-capture");
82128

83129
private final String regex;

0 commit comments

Comments
 (0)