Cleaned up java agent loading to fully support other (TestNG) extensions. Closes #2
This commit is contained in:
parent
2cd4074880
commit
a89eb59043
4 changed files with 10 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
|||
bld.downloadExtensionJavadoc=false
|
||||
bld.downloadExtensionSources=true
|
||||
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.4
|
||||
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.5
|
||||
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
||||
bld.downloadLocation=
|
||||
bld.version=1.9.0
|
||||
|
|
|
@ -17,6 +17,8 @@ public class ExamplesBuild extends Project {
|
|||
name = "Examples";
|
||||
version = version(0, 1, 0);
|
||||
|
||||
javaRelease = 17;
|
||||
|
||||
downloadSources = true;
|
||||
autoDownloadPurge = true;
|
||||
|
||||
|
|
|
@ -34,9 +34,10 @@ public class JacocoReportOperationBuild extends Project {
|
|||
public JacocoReportOperationBuild() {
|
||||
pkg = "rife.bld.extension";
|
||||
name = "JacocoReportOperation";
|
||||
version = version(0, 9, 4);
|
||||
version = version(0, 9, 5);
|
||||
|
||||
javaRelease = 17;
|
||||
|
||||
downloadSources = true;
|
||||
autoDownloadPurge = true;
|
||||
repositories = List.of(MAVEN_CENTRAL, RIFE2_RELEASES);
|
||||
|
|
|
@ -203,16 +203,12 @@ public class JacocoReportOperation extends AbstractOperation<JacocoReportOperati
|
|||
}
|
||||
|
||||
if (execFiles.isEmpty()) {
|
||||
// project.testOperation().fromProject(project).javaOptions().javaAgent(
|
||||
// Path.of(project.libBldDirectory().getPath(), "org.jacoco.agent-"
|
||||
// + JaCoCo.VERSION.substring(0, JaCoCo.VERSION.lastIndexOf('.')) + "-runtime.jar").toFile(),
|
||||
// "destfile=" + destFile.getPath());
|
||||
project.testOperation().fromProject(project).javaOptions().add("-javaagent:" +
|
||||
Path.of(project.libBldDirectory().getPath(), "org.jacoco.agent-"
|
||||
+ JaCoCo.VERSION.substring(0, JaCoCo.VERSION.lastIndexOf('.')) + "-runtime.jar")
|
||||
+ "=destfile=" + destFile.getPath());
|
||||
var testOperation = project.testOperation().fromProject(project);
|
||||
testOperation.javaOptions().javaAgent(Path.of(project.libBldDirectory().getPath(),
|
||||
"org.jacoco.agent-" + JaCoCo.VERSION.substring(0, JaCoCo.VERSION.lastIndexOf('.'))
|
||||
+ "-runtime.jar").toFile(), "destfile=" + destFile.getPath());
|
||||
try {
|
||||
project.testOperation().execute();
|
||||
testOperation.execute();
|
||||
} catch (InterruptedException | ExitStatusException e) {
|
||||
throw new IOException(e);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue