Skip to content

Commit

Permalink
provide working directory to scanner context
Browse files Browse the repository at this point in the history
  • Loading branch information
DirkMahler committed Feb 7, 2024
1 parent 5eac30e commit 560ec4f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ public void execute(MojoExecutionContext mojoExecutionContext) throws MojoExecut
private void scan(MojoExecutionContext mojoExecutionContext, Store store) {
MavenProject mavenProject = mojoExecutionContext.getCurrentModule();
MavenConfiguration configuration = mojoExecutionContext.getConfiguration();
File workingDirectory = mavenProject.getBasedir();
File outputDirectory = mojoExecutionContext.getOutputDirectory();
PluginRepository pluginRepository = mojoExecutionContext.getPluginRepository();
ScannerPluginRepository scannerPluginRepository = pluginRepository.getScannerPluginRepository();
ScannerContext scannerContext = new ScannerContextImpl(pluginRepository.getClassLoader(), store, outputDirectory);
ScannerContext scannerContext = new ScannerContextImpl(pluginRepository.getClassLoader(), store, workingDirectory, outputDirectory);
Scanner scanner = new ScannerImpl(configuration.scan(), scannerContext, scannerPluginRepository);
scannerContext.push(MavenSession.class, mojoExecutionContext.getMavenSession());
scannerContext.push(DependencyGraphBuilder.class, dependencyGraphBuilder);
Expand Down

0 comments on commit 560ec4f

Please sign in to comment.