Skip to content

Commit

Permalink
replace surefire argline
Browse files Browse the repository at this point in the history
Move argline property replacement after surefire config extraction
  • Loading branch information
hcoles committed Jan 22, 2024
1 parent 66e1597 commit 9defbc4
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,16 @@ public ReportOptions convert() {
removeExcludedDependencies(classPath);

ReportOptions option = parseReportOptions(classPath);
return updateFromSurefire(option);
ReportOptions withSureFire = updateFromSurefire(option);

// Null check here is a bad unit testing artifact, should never be null in real life
ReportOptions effective = withSureFire != null ? withSureFire : option;

// argline may contain surefire style properties that require expanding
if (effective.getArgLine() != null) {
effective.setArgLine(this.replacePropertyExpressions(option.getArgLine()));
}
return effective;

}

Expand Down Expand Up @@ -196,7 +205,7 @@ private ReportOptions parseReportOptions(final List<String> classPath) {
data.addChildJVMArgs(this.mojo.getJvmArgs());
}
if (this.mojo.getArgLine() != null) {
data.setArgLine(replacePropertyExpressions(this.mojo.getArgLine()));
data.setArgLine(this.mojo.getArgLine());
}

data.setMutators(determineMutators());
Expand Down

0 comments on commit 9defbc4

Please sign in to comment.