From 83fcf454f5179ce065197cca0bd5dc3181853e5a Mon Sep 17 00:00:00 2001 From: Christoph Pirkl Date: Thu, 8 Feb 2024 08:40:49 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Christoph Kuhnke --- .../com/exasol/projectkeeper/MavenProjectCrawlerMojo.java | 2 +- .../sources/analyze/generic/MavenProcessBuilder.java | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/maven-project-crawler/src/main/java/com/exasol/projectkeeper/MavenProjectCrawlerMojo.java b/maven-project-crawler/src/main/java/com/exasol/projectkeeper/MavenProjectCrawlerMojo.java index 85cc9ec6..d257fa98 100644 --- a/maven-project-crawler/src/main/java/com/exasol/projectkeeper/MavenProjectCrawlerMojo.java +++ b/maven-project-crawler/src/main/java/com/exasol/projectkeeper/MavenProjectCrawlerMojo.java @@ -39,7 +39,7 @@ public class MavenProjectCrawlerMojo extends AbstractMojo { // [impl -> dsn~eclipse-prefs-java-version~1] @Override public void execute() { - if (projectsToCrawl == null || projectsToCrawl.isBlank()) { + if (this.projectsToCrawl == null || this.projectsToCrawl.isBlank()) { throw new IllegalArgumentException(ExaError.messageBuilder("E-PK-MPC-64") .message("Property {{property name}} is not defined or empty.", PROPERTY_PROJECTS_TO_CRAWL) .mitigation("Specify property with least one pom file.").toString()); diff --git a/project-keeper/src/main/java/com/exasol/projectkeeper/sources/analyze/generic/MavenProcessBuilder.java b/project-keeper/src/main/java/com/exasol/projectkeeper/sources/analyze/generic/MavenProcessBuilder.java index 56a0cf28..d7024931 100644 --- a/project-keeper/src/main/java/com/exasol/projectkeeper/sources/analyze/generic/MavenProcessBuilder.java +++ b/project-keeper/src/main/java/com/exasol/projectkeeper/sources/analyze/generic/MavenProcessBuilder.java @@ -75,11 +75,6 @@ public SimpleProcess startSimpleProcess() { } private static String getMavenExecutable() { - final OSType osType = new OsCheck().getOperatingSystemType(); - if (osType == OSType.WINDOWS) { - return "mvn.cmd"; - } else { - return "mvn"; - } + return "mvn" + OsCheck.suffix(".cmd"); } }