For example when using Maven:
<dependency>
<groupId>io.github.zregvart</groupId>
<artifactId>junit-github-reporter</artifactId>
<version>${junit-github-reporter.version}</version>
<scope>test</scope>
</dependency>
Strict dependency checks will find the junit-github-reporter
as unused, then add to Surefire's classpath using this:
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<additionalClasspathElements>
<additionalClasspathElement>${settings.localRepository}/io/github/zregvart/junit-github-reporter/${junit-github-reporter.version}/junit-github-reporter-${junit-github-reporter.version}.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
<dependencies>
<dependency>
<groupId>io.github.zregvart</groupId>
<artifactId>junit-github-reporter</artifactId>
<version>${junit-github-reporter.version}</version>
</dependency>
</dependencies>
</plugin>
To release run:
$ ./mvnw clean deploy -Pbasepom.oss-release