Skip to content

[MCOMPILER-347] Set Xcludes in config passed to actual compiler #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}

}