Skip to content

Commit df8d831

Browse files
committed
build: add maven publishing and fix some Javadoc issues
1 parent 211debc commit df8d831

File tree

5 files changed

+93
-2
lines changed

5 files changed

+93
-2
lines changed

publishing-build.gradle

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
2+
apply plugin: 'maven-publish'
3+
apply plugin: 'signing'
4+
5+
// Configure these in your $USER_HOME/.gradle/gradle.properties
6+
if (!project.hasProperty("sonatypeUsername")) {
7+
ext.sonatypeUsername = ''
8+
}
9+
if (!project.hasProperty("sonatypePassword")) {
10+
ext.sonatypePassword = ''
11+
}
12+
13+
task javadocJar(type: Jar) {
14+
classifier = 'javadoc'
15+
from javadoc
16+
}
17+
18+
task sourcesJar(type: Jar) {
19+
classifier = 'sources'
20+
from sourceSets.main.allSource
21+
}
22+
23+
artifacts {
24+
archives javadocJar, sourcesJar
25+
}
26+
27+
publishing {
28+
publications {
29+
mavenJava(MavenPublication) {
30+
pom {
31+
name = "${project.group}:${project.name}"
32+
description = "${project.description}"
33+
url = 'https://github.com/netmikey/testprocesses'
34+
licenses {
35+
license {
36+
name = 'The Apache License, Version 2.0'
37+
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
38+
}
39+
}
40+
developers {
41+
developer {
42+
name = 'Mike Meessen'
43+
44+
}
45+
}
46+
scm {
47+
connection = 'scm:git:git://github.com/netmikey/testprocesses.git'
48+
developerConnection = 'scm:git:ssh://github.com:netmikey/testprocesses.git'
49+
url = 'https://github.com/netmikey/testprocesses'
50+
}
51+
}
52+
53+
from components.java
54+
artifact(sourcesJar)
55+
artifact(javadocJar)
56+
57+
versionMapping {
58+
usage('java-api') {
59+
fromResolutionOf('runtimeClasspath')
60+
}
61+
usage('java-runtime') {
62+
fromResolutionResult()
63+
}
64+
}
65+
}
66+
}
67+
68+
repositories {
69+
maven {
70+
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
71+
credentials {
72+
username sonatypeUsername
73+
password sonatypePassword
74+
}
75+
}
76+
}
77+
}
78+
79+
signing {
80+
useGpgCmd()
81+
sign publishing.publications.mavenJava
82+
}

testprocesses-core/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ plugins {
33
}
44

55
apply plugin: 'io.spring.dependency-management'
6+
apply from: new File(rootProject.projectDir, 'publishing-build.gradle')
67

78
dependencyManagement {
89
imports {

testprocesses-core/src/main/java/io/github/netmikey/testprocesses/TestProcessDefinitionBy.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ public class TestProcessDefinitionBy<T extends TestProcessDefinition> {
4141
* @param testProcessDefinitionClass
4242
* The concrete {@link TestProcessDefinition} implementation
4343
* class.
44+
* @param <C>
45+
* The concrete {@link TestProcessDefinition} type.
4446
* @return The {@link TestProcessDefinitionBy} reference to the clazz.
4547
*/
4648
public static <C extends TestProcessDefinition> TestProcessDefinitionBy<C> clazz(
@@ -55,6 +57,8 @@ public static <C extends TestProcessDefinition> TestProcessDefinitionBy<C> clazz
5557
*
5658
* @param testProcessDefinition
5759
* The {@link TestProcessDefinition} instance.
60+
* @param <I>
61+
* The concrete {@link TestProcessDefinition} type.
5862
* @return The {@link TestProcessDefinitionBy} reference to the instance.
5963
*/
6064
public static <I extends TestProcessDefinition> TestProcessDefinitionBy<I> instance(I testProcessDefinition) {

testprocesses-core/src/main/java/io/github/netmikey/testprocesses/TestProcessesRegistry.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ public class TestProcessesRegistry {
5555
* started.
5656
* @param startStrategy
5757
* The {@link StartStrategy} to be used.
58+
* @param <T>
59+
* The concrete type of the {@link TestProcessDefinition}.
5860
*/
5961
public <T extends TestProcessDefinition> void start(TestProcessDefinitionBy<T> processDefinitionBy,
6062
StartStrategy startStrategy) {
@@ -380,6 +382,8 @@ private <T extends TestProcessDefinition> T retrieve(TestProcessDefinitionBy<T>
380382
* @return The {@link RunningTestProcess} or {@link Optional#empty()} if no
381383
* process has been started that matches the specified
382384
* {@link TestProcessDefinitionBy} reference.
385+
* @param <T>
386+
* The concrete type of the {@link TestProcessDefinition}.
383387
*/
384388
public <T extends TestProcessDefinition> Optional<RunningTestProcess<T>> retrieveRunningProcess(
385389
TestProcessDefinitionBy<T> testProcessDefinitionBy) {

testprocesses-core/src/main/java/io/github/netmikey/testprocesses/utils/Tailer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
* <li>Using one of the static helper methods:
4848
* <ul>
4949
* <li>{@link Tailer#create(File, TailerListener)}</li>
50-
* <li>{@link Tailer#create(File, TailerListener, long)}</li>
51-
* <li>{@link Tailer#create(File, TailerListener, long, boolean)}</li>
50+
* <li>{@link Tailer#create(File, TailerListener, long, long)}</li>
51+
* <li>{@link Tailer#create(File, TailerListener, long, long, boolean)}</li>
5252
* </ul>
5353
* </li>
5454
* <li>Using an {@link java.util.concurrent.Executor}</li>

0 commit comments

Comments
 (0)