Skip to content

Commit

Permalink
[MCOMPILER-347] Set Xcludes in config passed to actual compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
pzygielo committed Mar 12, 2022
1 parent be9b5ed commit f619280
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,10 @@ else if ( CompilerConfiguration.CompilerReuseStrategy.ReuseSame.getStrategy().eq

compilerConfiguration.setModulepathEntries( getModulepathElements() );

compilerConfiguration.setIncludes( getIncludes() );

compilerConfiguration.setExcludes( getExcludes() );

Map<String, String> effectiveCompilerArguments = getCompilerArguments();

String effectiveCompilerArgument = getCompilerArgument();
Expand Down Expand Up @@ -1482,6 +1486,10 @@ private Set<File> getCompileSources( Compiler compiler, CompilerConfiguration co
return compileSources;
}

protected abstract Set<String> getIncludes();

protected abstract Set<String> getExcludes();

/**
* @param compilerConfiguration
* @param compiler
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,18 @@ public void execute()
}
}

@Override
protected Set<String> getIncludes()
{
return includes;
}

@Override
protected Set<String> getExcludes()
{
return excludes;
}

@Override
protected void preparePaths( Set<File> sourceFiles )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,4 +497,16 @@ protected boolean isTestCompile()
return true;
}

@Override
protected Set<String> getIncludes()
{
return testIncludes;
}

@Override
protected Set<String> getExcludes()
{
return testExcludes;
}

}

0 comments on commit f619280

Please sign in to comment.