11package org .hibernate .search .develocity .plugins ;
22
33import java .util .Map ;
4+ import java .util .regex .Pattern ;
45
56import org .hibernate .search .develocity .GoalMetadataProvider ;
67import org .hibernate .search .develocity .SimpleConfiguredPlugin ;
@@ -12,6 +13,8 @@ public class SurefireConfiguredPlugin extends SimpleConfiguredPlugin {
1213
1314 private static final String SUREFIRE_ENVIRONMENT_VARIABLES = "environmentVariables" ;
1415
16+ private static final Pattern TEST_INDEXES_PATTERN = Pattern .compile ( "(^|/)test-indexes($|/)" );
17+
1518 @ Override
1619 protected String getPluginName () {
1720 return "maven-surefire-plugin" ;
@@ -56,10 +59,16 @@ private void configureEnvironmentVariables(GoalMetadataProvider.Context context)
5659 value = "" ;
5760 }
5861 if ( value .startsWith ( context .metadata ().getSession ().getExecutionRootDirectory () ) ) {
59- inputs .fileSet ( keyForDevelocity , value , fileSet -> {
60- fileSet .normalizationStrategy (
61- MojoMetadataProvider .Context .FileSet .NormalizationStrategy .RELATIVE_PATH );
62- } );
62+ if ( TEST_INDEXES_PATTERN .matcher ( "test-indexes" ).find () ) {
63+ // Lucene indexes used in tests -- we don't care about these.
64+ inputs .ignore ( keyForDevelocity );
65+ }
66+ else {
67+ inputs .fileSet ( keyForDevelocity , value , fileSet -> {
68+ fileSet .normalizationStrategy (
69+ MojoMetadataProvider .Context .FileSet .NormalizationStrategy .RELATIVE_PATH );
70+ } );
71+ }
6372 }
6473 else {
6574 inputs .property ( keyForDevelocity , value );
0 commit comments