Skip to content

Commit

Permalink
refactor: Tone down Maven plugin's output (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet authored Oct 7, 2024
1 parent d7ce1a1 commit 0744c60
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,15 @@ public static void disable() {
@Inject
public DetectExtension(final Logger logger) {
this.logger = logger;
this.detector = new Detector(new DefaultSystemPropertyOperations(), new DefaultFileOperations(), logger::info);
this.detector = new Detector(new DefaultSystemPropertyOperations(), new DefaultFileOperations(), logger::debug);
}

@Override
public void afterSessionStart(MavenSession session) throws MavenExecutionException {
if (!disable) {
logger.info(
"The os-detector Maven 3 extension is registered, OS and CPU architecture properties will be provided.");
}
injectProperties(session);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ public class DetectPropertyContributor implements PropertyContributor {

@Override
public void contribute(Map<String, String> map) {
logger.info(
"The os-detector Maven 4 extension is registered, OS and CPU architecture properties will be provided.");
DetectExtension.disable();

final Properties props = new Properties();
props.putAll(map);

final Detector detector =
new Detector(new SimpleSystemPropertyOperations(map), new SimpleFileOperations(), logger::info);
new Detector(new SimpleSystemPropertyOperations(map), new SimpleFileOperations(), logger::debug);
detector.detect(props, getClassifierWithLikes(map));
}

Expand Down

0 comments on commit 0744c60

Please sign in to comment.