Skip to content

Commit 045591a

Browse files
committed
Fix detection of empty compilerId
1 parent dddd27c commit 045591a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/java/org/hibernate/search/develocity/scan/BuildScanMetadata.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ public static void addMainMetadata(BuildScanApi buildScanApi) {
4141
public static void addCompilerMetadata(GoalMetadataProvider.Context context) {
4242
var buildScanApi = context.buildScan();
4343
String compilerId = context.configuration().getString( "compilerId" );
44-
if ( !Strings.isBlank( compilerId ) ) {
44+
if ( !Strings.isBlank( compilerId )
45+
// Yes it's weird but it can happen.
46+
&& !"${maven.compiler.compilerId}".equals( compilerId ) ) {
4547
buildScanApi.tag( "compiler-%s".formatted( compilerId ) );
4648
}
4749
}
@@ -58,7 +60,8 @@ public static void addJavaExecutableVersion(GoalMetadataProvider.Context context
5860
}
5961

6062
String goal = context.metadata().getMojoExecution().getGoal();
61-
context.buildScanDeduplicatedValue( "%s.%s.jdk".formatted( plugin, goal ), "Path: %s\nResolved version: %s".formatted( javaExecutable, javaVersion ) );
63+
context.buildScanDeduplicatedValue( "%s.%s.jdk".formatted( plugin, goal ),
64+
"Path: %s\nResolved version: %s".formatted( javaExecutable, javaVersion ) );
6265
}
6366

6467
public static void addFailsafeMetadata(GoalMetadataProvider.Context context) {

0 commit comments

Comments
 (0)