Skip to content

Commit 8b51df9

Browse files
committed
Update JavaDoc and prepare version 1.0.0
1 parent 21793ca commit 8b51df9

35 files changed

+299
-148
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -617,10 +617,14 @@ System Stubs is built with Appveyor: [![Build status](https://ci.appveyor.com/ap
617617

618618
## Release Guide
619619

620-
* Select a new version according to the
620+
* Move the snapshot version number if necessary using
621621
[Semantic Versioning 2.0.0 Standard](http://semver.org/).
622-
* Set the new version in `pom.xml` and in the `Installation` section of
623-
this readme.
624-
* Commit the modified `pom.xml` and `README.md`.
625-
* Run `mvnw clean deploy` with JDK 8.
626-
* Add a tag for the release: `git tag system-stubs-X.X.X`
622+
* With `gpg` installed
623+
* With env variables
624+
- `JAVA_HOME` set to JDK8
625+
- `GPG_TTY=$(tty)`
626+
- `GPG_AGENT_INFO`
627+
* With the nexus credentials set in the `.m2/settings.xml`
628+
* Run `mvn -Prelease-sign-artifacts clean -Dgpg.passphrase=<passphrase> release:prepare release:perform -f pom.xml`
629+
* Update the installation guide in the README
630+
* Push a new version to the README

pom.xml

Lines changed: 159 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>uk.org.webcompere</groupId>
66
<artifactId>system-stubs-parent</artifactId>
7-
<version>0.0.1</version>
7+
<version>1.0.0-SNAPSHOT</version>
88
<packaging>pom</packaging>
99

1010
<name>System Stubs Parent</name>
@@ -19,10 +19,20 @@
1919
</license>
2020
</licenses>
2121

22+
<developers>
23+
<developer>
24+
<name>Ashley Frieze</name>
25+
<email>[email protected]</email>
26+
<organization>webcompere.org.uk</organization>
27+
<organizationUrl>https://github.com/webcompere</organizationUrl>
28+
</developer>
29+
</developers>
30+
2231
<scm>
2332
<connection>scm:git:git://github.com/webcompere/system-stubs.git</connection>
2433
<developerConnection>scm:git:[email protected]:webcompere/system-stubs.git</developerConnection>
2534
<url>https://github.com/webcompere/system-stubs/</url>
35+
<tag>system-stubs-parent-1.0.0</tag>
2636
</scm>
2737

2838
<modules>
@@ -31,12 +41,24 @@
3141
<module>system-stubs-jupiter</module>
3242
</modules>
3343

44+
<properties>
45+
<version.maven-scm-provider-gitexe>1.11.2</version.maven-scm-provider-gitexe>
46+
<gpg.passphrase>providedfromoutside</gpg.passphrase>
47+
<version.maven-gpg-plugin>1.6</version.maven-gpg-plugin>
48+
<version.maven-javadoc-plugin>3.2.0</version.maven-javadoc-plugin>
49+
<version.maven-source-plugin>3.2.1</version.maven-source-plugin>
50+
<version.maven-deploy-plugin>3.0.0-M1</version.maven-deploy-plugin>
51+
<version.nexus-staging-maven-plugin>1.6.8</version.nexus-staging-maven-plugin>
52+
<version.maven-release-plugin>3.0.0-M1</version.maven-release-plugin>
53+
<version.maven-compiler-plugin>3.8.1</version.maven-compiler-plugin>
54+
</properties>
55+
3456
<dependencyManagement>
3557
<dependencies>
3658
<dependency>
3759
<groupId>uk.org.webcompere</groupId>
3860
<artifactId>system-stubs-core</artifactId>
39-
<version>0.0.1</version>
61+
<version>1.0.0-SNAPSHOT</version>
4062
</dependency>
4163

4264
<dependency>
@@ -91,6 +113,15 @@
91113
<build>
92114
<pluginManagement>
93115
<plugins>
116+
<plugin>
117+
<groupId>org.apache.maven.plugins</groupId>
118+
<artifactId>maven-compiler-plugin</artifactId>
119+
<version>${version.maven-compiler-plugin}</version>
120+
<configuration>
121+
<source>1.8</source>
122+
<target>1.8</target>
123+
</configuration>
124+
</plugin>
94125
<plugin>
95126
<groupId>org.apache.maven.plugins</groupId>
96127
<artifactId>maven-surefire-plugin</artifactId>
@@ -162,39 +193,135 @@
162193
</execution>
163194
</executions>
164195
</plugin>
196+
197+
<plugin>
198+
<groupId>org.apache.maven.plugins</groupId>
199+
<artifactId>maven-source-plugin</artifactId>
200+
<version>${version.maven-source-plugin}</version>
201+
<executions>
202+
<execution>
203+
<id>attach-sources</id>
204+
<goals>
205+
<goal>jar</goal>
206+
</goals>
207+
</execution>
208+
</executions>
209+
</plugin>
210+
<plugin>
211+
<groupId>org.apache.maven.plugins</groupId>
212+
<artifactId>maven-javadoc-plugin</artifactId>
213+
<version>${version.maven-javadoc-plugin}</version>
214+
<configuration>
215+
<encoding>UTF-8</encoding>
216+
</configuration>
217+
<executions>
218+
<execution>
219+
<id>attach-javadoc</id>
220+
<goals>
221+
<goal>jar</goal>
222+
</goals>
223+
</execution>
224+
</executions>
225+
</plugin>
226+
<plugin>
227+
<artifactId>maven-deploy-plugin</artifactId>
228+
<version>${version.maven-deploy-plugin}</version>
229+
<executions>
230+
<execution>
231+
<id>default-deploy</id>
232+
<phase>deploy</phase>
233+
<goals>
234+
<goal>deploy</goal>
235+
</goals>
236+
</execution>
237+
</executions>
238+
</plugin>
239+
<plugin>
240+
<groupId>org.sonatype.plugins</groupId>
241+
<artifactId>nexus-staging-maven-plugin</artifactId>
242+
<version>${version.nexus-staging-maven-plugin}</version>
243+
<extensions>true</extensions>
244+
<configuration>
245+
<serverId>ossrh</serverId>
246+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
247+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
248+
</configuration>
249+
</plugin>
250+
<plugin>
251+
<groupId>org.apache.maven.plugins</groupId>
252+
<artifactId>maven-release-plugin</artifactId>
253+
<version>${version.maven-release-plugin}</version>
254+
<configuration>
255+
<localCheckout>true</localCheckout>
256+
<pushChanges>false</pushChanges>
257+
</configuration>
258+
<dependencies>
259+
<dependency>
260+
<groupId>org.apache.maven.scm</groupId>
261+
<artifactId>maven-scm-provider-gitexe</artifactId>
262+
<version>${version.maven-scm-provider-gitexe}</version>
263+
</dependency>
264+
</dependencies>
265+
</plugin>
266+
<plugin>
267+
<groupId>org.apache.maven.plugins</groupId>
268+
<artifactId>maven-site-plugin</artifactId>
269+
<version>3.9.1</version>
270+
</plugin>
165271
</plugins>
166272
</pluginManagement>
167273
</build>
168274

169-
<!-- <profiles>-->
170-
<!-- <profile>-->
171-
<!-- <id>nonrelease</id>-->
172-
<!-- <activation>-->
173-
<!-- <activeByDefault>true</activeByDefault>-->
174-
<!-- </activation>-->
175-
<!-- <build>-->
176-
<!-- <plugins>-->
177-
<!-- <plugin>-->
178-
<!-- <groupId>org.apache.maven.plugins</groupId>-->
179-
<!-- <artifactId>maven-gpg-plugin</artifactId>-->
180-
<!-- <configuration>-->
181-
<!-- <skip>true</skip>-->
182-
<!-- </configuration>-->
183-
<!-- </plugin>-->
184-
<!-- </plugins>-->
185-
<!-- </build>-->
186-
<!-- </profile>-->
187-
<!-- <profile>-->
188-
<!-- <id>release</id>-->
189-
<!-- <build>-->
190-
<!-- <plugins>-->
191-
<!-- <plugin>-->
192-
<!-- <groupId>org.apache.maven.plugins</groupId>-->
193-
<!-- <artifactId>maven-gpg-plugin</artifactId>-->
194-
<!-- </plugin>-->
195-
<!-- </plugins>-->
196-
<!-- </build>-->
197-
<!-- </profile>-->
198-
<!-- </profiles>-->
275+
<distributionManagement>
276+
<snapshotRepository>
277+
<id>ossrh</id>
278+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
279+
</snapshotRepository>
280+
<repository>
281+
<id>ossrh</id>
282+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
283+
</repository>
284+
</distributionManagement>
285+
286+
<issueManagement>
287+
<system>Github</system>
288+
<url>https://github.com/webcompere/system-stubs/issues</url>
289+
</issueManagement>
290+
291+
<ciManagement>
292+
<system>AppVeyor</system>
293+
<url>https://ci.appveyor.com/project/ashleyfrieze/system-stubs</url>
294+
</ciManagement>
295+
296+
<profiles>
297+
<!-- GPG Signature on release -->
298+
<profile>
299+
<id>release-sign-artifacts</id>
300+
<activation>
301+
<property>
302+
<name>performRelease</name>
303+
<value>true</value>
304+
</property>
305+
</activation>
306+
<build>
307+
<plugins>
308+
<plugin>
309+
<groupId>org.apache.maven.plugins</groupId>
310+
<artifactId>maven-gpg-plugin</artifactId>
311+
<version>${version.maven-gpg-plugin}</version>
312+
<executions>
313+
<execution>
314+
<id>sign-artifacts</id>
315+
<phase>verify</phase>
316+
<goals>
317+
<goal>sign</goal>
318+
</goals>
319+
</execution>
320+
</executions>
321+
</plugin>
322+
</plugins>
323+
</build>
324+
</profile>
325+
</profiles>
199326

200327
</project>

system-stubs-core/pom.xml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<parent>
66
<groupId>uk.org.webcompere</groupId>
77
<artifactId>system-stubs-parent</artifactId>
8-
<version>0.0.1</version>
8+
<version>1.0.0-SNAPSHOT</version>
99
<relativePath>../</relativePath>
1010
</parent>
1111

1212
<artifactId>system-stubs-core</artifactId>
13-
<version>0.0.1</version>
13+
<version>1.0.0-SNAPSHOT</version>
1414
<packaging>jar</packaging>
1515

1616
<name>System Stubs Core</name>
@@ -66,6 +66,20 @@
6666
<groupId>com.github.spotbugs</groupId>
6767
<artifactId>spotbugs-maven-plugin</artifactId>
6868
</plugin>
69+
70+
<!-- For release -->
71+
<plugin>
72+
<groupId>org.apache.maven.plugins</groupId>
73+
<artifactId>maven-gpg-plugin</artifactId>
74+
</plugin>
75+
<plugin>
76+
<groupId>org.apache.maven.plugins</groupId>
77+
<artifactId>maven-source-plugin</artifactId>
78+
</plugin>
79+
<plugin>
80+
<groupId>org.apache.maven.plugins</groupId>
81+
<artifactId>maven-javadoc-plugin</artifactId>
82+
</plugin>
6983
</plugins>
7084
</build>
7185

system-stubs-core/src/main/java/uk/org/webcompere/systemstubs/SystemStubs.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,7 @@ public static String tapSystemOutNormalized(ThrowingRunnable throwingRunnable) t
590590
* Get a tap for System out to use with {@link SystemOut#execute}
591591
*
592592
* @return the {@link SystemOut} object to use
593+
* @since 1.0.0
593594
*/
594595
public static SystemOut withTapSystemOut() {
595596
return new SystemOut();
@@ -600,6 +601,7 @@ public static SystemOut withTapSystemOut() {
600601
* shared {@link Output} for asserting against
601602
*
602603
* @return the {@link SystemErrAndOut} to use with {@link SystemErrAndOut#execute}
604+
* @since 1.0.0
603605
*/
604606
public static SystemErrAndOut withTapSystemErrAndOut() {
605607
return new SystemErrAndOut();
@@ -611,6 +613,7 @@ public static SystemErrAndOut withTapSystemErrAndOut() {
611613
*
612614
* @param output the shared target to direct the logging to
613615
* @return the {@link SystemErrAndOut} to use with {@link SystemErrAndOut#execute}
616+
* @since 1.0.0
614617
*/
615618
public static SystemErrAndOut withSystemErrAndOut(Output output) {
616619
return new SystemErrAndOut(output);
@@ -625,6 +628,7 @@ public static SystemErrAndOut withSystemErrAndOut(Output output) {
625628
* @param throwingRunnable the code under test
626629
* @return the {@link String} of the text written to the output - non null
627630
* @throws Exception on error in the code under test
631+
* @since 1.0.0
628632
*/
629633
public static String tapSystemErrAndOut(ThrowingRunnable throwingRunnable) throws Exception {
630634
SystemErrAndOut tappedSystem = withTapSystemErrAndOut();
@@ -682,6 +686,7 @@ public static EnvironmentVariables withEnvironmentVariable(String name, String v
682686
* @param value value of first environment variable
683687
* @param values pairs of name/values (must be even number of entries)
684688
* @return an {@link EnvironmentVariables} object for further use
689+
* @since 1.0.0
685690
*/
686691
public static EnvironmentVariables withEnvironmentVariables(String name, String value, String... values) {
687692
return new EnvironmentVariables(name, value, values);
@@ -691,6 +696,7 @@ public static EnvironmentVariables withEnvironmentVariables(String name, String
691696
* Create a blank {@link EnvironmentVariables} object
692697
*
693698
* @return empty {@link EnvironmentVariables} for adding values to
699+
* @since 1.0.0
694700
*/
695701
public static EnvironmentVariables withEnvironmentVariables() {
696702
return new EnvironmentVariables();
@@ -705,6 +711,7 @@ public static EnvironmentVariables withEnvironmentVariables() {
705711
* @return the result of the callable
706712
* @throws Exception on error in any of the resources or the callable
707713
* @see Resources#execute(Callable, TestResource...)
714+
* @since 1.0.0
708715
*/
709716
public static <T> T execute(Callable<T> callable, TestResource... resources) throws Exception {
710717
return Resources.execute(callable, resources);
@@ -717,6 +724,7 @@ public static <T> T execute(Callable<T> callable, TestResource... resources) thr
717724
* @param resources resources to set up around it
718725
* @throws Exception on error in any of the resources or the runnable
719726
* @see Resources#execute(Callable, TestResource...)
727+
* @since 1.0.0
720728
*/
721729
public static void execute(ThrowingRunnable runnable, TestResource... resources) throws Exception {
722730
Resources.execute(runnable.asCallable(), resources);

system-stubs-core/src/main/java/uk/org/webcompere/systemstubs/ThrowingRunnable.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* Code that can be executed by one of the methods of {@link SystemStubs}.
99
* This code may throw an {@link Exception}. Therefore we cannot use
1010
* {@link Runnable}.
11+
* @since 1.0.0
1112
*/
1213
public interface ThrowingRunnable {
1314
/**
@@ -38,6 +39,7 @@ default Callable<Void> asCallable() {
3839
* Convert a lambda of type runnable to Callable
3940
* @param runnable a runnable that can be converted
4041
* @return a {@link Callable}
42+
* @since 1.0.0
4143
*/
4244
static Callable<Void> asCallable(ThrowingRunnable runnable) {
4345
return runnable.asCallable();

0 commit comments

Comments
 (0)