Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo committed Nov 21, 2024
1 parent 5791754 commit cf359a7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*/
package org.apache.maven.plugins.checkstyle;

import javax.inject.Named;

import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
Expand Down Expand Up @@ -452,7 +454,8 @@ public abstract class AbstractCheckstyleReport extends AbstractMavenReport {

protected ByteArrayOutputStream stringOutputStream;

public AbstractCheckstyleReport(ResourceManager locator, CheckstyleExecutor checkstyleExecutor, I18N i18n) {
public AbstractCheckstyleReport(
ResourceManager locator, @Named("default") CheckstyleExecutor checkstyleExecutor, I18N i18n) {
this.locator = locator;
this.checkstyleExecutor = checkstyleExecutor;
this.i18n = i18n;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.apache.maven.plugins.checkstyle;

import javax.inject.Inject;
import javax.inject.Named;

import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.ResolutionScope;
Expand All @@ -32,8 +33,6 @@
* A reporting task that performs Checkstyle analysis and generates an aggregate
* HTML report on the violations that Checkstyle finds in a multi-module reactor
* build.
*
*
*/
@Mojo(
name = "checkstyle-aggregate",
Expand All @@ -43,7 +42,8 @@
public class CheckstyleAggregateReport extends AbstractCheckstyleReport {

@Inject
public CheckstyleAggregateReport(ResourceManager locator, CheckstyleExecutor checkstyleExecutor, I18N i18n) {
public CheckstyleAggregateReport(
ResourceManager locator, @Named("default") CheckstyleExecutor checkstyleExecutor, I18N i18n) {
super(locator, checkstyleExecutor, i18n);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.apache.maven.plugins.checkstyle;

import javax.inject.Inject;
import javax.inject.Named;

import java.io.File;
import java.util.List;
Expand All @@ -45,7 +46,8 @@
public class CheckstyleReport extends AbstractCheckstyleReport {

@Inject
public CheckstyleReport(ResourceManager locator, CheckstyleExecutor checkstyleExecutor, I18N i18n) {
public CheckstyleReport(
ResourceManager locator, @Named("default") CheckstyleExecutor checkstyleExecutor, I18N i18n) {
super(locator, checkstyleExecutor, i18n);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ public class CheckstyleViolationCheckMojo extends AbstractMojo {
/**
* @since 2.5
*/
protected CheckstyleExecutor checkstyleExecutor;
protected final CheckstyleExecutor checkstyleExecutor;

@Inject
public CheckstyleViolationCheckMojo(final @Named("default") CheckstyleExecutor checkstyleExecutor) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public class LicenseResourceManager extends DefaultResourceManager {
@Inject
public LicenseResourceManager(Map<String, ResourceLoader> resourceLoaders) {
super(resourceLoaders);
this.resourceLoaders = resourceLoaders;
}

@Override
Expand Down

0 comments on commit cf359a7

Please sign in to comment.