From ef6a1408be61f4d5bb1e65f5f1d0f587c23d54f3 Mon Sep 17 00:00:00 2001 From: tvallin Date: Wed, 20 Nov 2024 12:06:04 +0100 Subject: [PATCH] review changes --- .github/workflows/validate.yml | 4 ++-- .../src/main/java/io/helidon/inject/tools/ModuleUtils.java | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index a8038a5c4fe..560aa8a8c95 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -366,7 +366,7 @@ jobs: verify test-results: runs-on: ubuntu-20.04 - needs: [ packaging ] + needs: [ _tests, archetypes, legacy-archetypes, _tck, packaging, _native-image ] name: tests/results steps: - uses: actions/upload-artifact/merge@v4 @@ -375,7 +375,7 @@ jobs: pattern: "tests-*" gate: runs-on: ubuntu-20.04 - needs: [ test-results ] + needs: [ copyright, checkstyle, shellcheck, docs, javadoc, _spotbugs, test-results ] steps: - shell: bash run: | diff --git a/inject/tools/src/main/java/io/helidon/inject/tools/ModuleUtils.java b/inject/tools/src/main/java/io/helidon/inject/tools/ModuleUtils.java index d5d9ad48edd..29aaff42555 100644 --- a/inject/tools/src/main/java/io/helidon/inject/tools/ModuleUtils.java +++ b/inject/tools/src/main/java/io/helidon/inject/tools/ModuleUtils.java @@ -68,8 +68,8 @@ public class ModuleUtils { public static final String APPLICATION_PACKAGE_FILE_NAME = "app-package-name.txt"; static final System.Logger LOGGER = System.getLogger(ModuleUtils.class.getName()); static final String SERVICE_PROVIDER_MODULE_INFO_HBS = "module-info.hbs"; - static final String SRC_MAIN_JAVA_DIR = File.separator + "src" + File.separator + "main" + File.separator + "java"; - static final String SRC_TEST_JAVA_DIR = File.separator + "src" + File.separator + "test" + File.separator + "java"; + static final String SRC_MAIN_JAVA_DIR = "/src/main/java"; + static final String SRC_TEST_JAVA_DIR = "/src/test/java"; static final ModuleInfoItem MODULE_COMPONENT_MODULE_INFO = ModuleInfoItem.builder() .provides(true) .target(ModuleComponent.class.getName()) @@ -354,6 +354,7 @@ public static Optional toSourcePath(Path filePath, * @return the base path */ public static Path toBasePath(String sourcePath) { + sourcePath = sourcePath.replace(File.separator, "/"); int pos = sourcePath.lastIndexOf(SRC_MAIN_JAVA_DIR); if (pos < 0) { pos = sourcePath.lastIndexOf(SRC_TEST_JAVA_DIR);