From 142662fae2626614906195aec8ea49f075f3ea1a Mon Sep 17 00:00:00 2001 From: Martin Leim Date: Fri, 30 Dec 2022 13:07:09 +0100 Subject: [PATCH 1/2] includePathExceptionsInClasspath is respected whether module-info.java exists or not --- src/main/java/org/openjfx/JavaFXBaseMojo.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/openjfx/JavaFXBaseMojo.java b/src/main/java/org/openjfx/JavaFXBaseMojo.java index 4cbf75f..de9c6d7 100644 --- a/src/main/java/org/openjfx/JavaFXBaseMojo.java +++ b/src/main/java/org/openjfx/JavaFXBaseMojo.java @@ -273,10 +273,6 @@ void preparePaths(Path jdkHome) throws MojoExecutionException { resolvePathsResult.getClasspathElements().forEach(file -> classpathElements.add(file.getPath())); resolvePathsResult.getModulepathElements().keySet().forEach(file -> modulepathElements.add(file.getPath())); - if (includePathExceptionsInClasspath) { - resolvePathsResult.getPathExceptions().keySet() - .forEach(file -> classpathElements.add(file.getPath())); - } } else { // non-modular projects pathElements.forEach((k, v) -> { @@ -288,6 +284,11 @@ void preparePaths(Path jdkHome) throws MojoExecutionException { } }); } + + if (includePathExceptionsInClasspath) { + resolvePathsResult.getPathExceptions().keySet() + .forEach(file -> classpathElements.add(file.getPath())); + } } catch (Exception e) { getLog().warn(e.getMessage()); } From 9e88815517084f122241c9281f543a1a436b1591 Mon Sep 17 00:00:00 2001 From: Martin Leim Date: Fri, 30 Dec 2022 13:07:46 +0100 Subject: [PATCH 2/2] Fix path (did not work on Windows) --- src/test/java/org/openjfx/JavaFXRunMojoTestCase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/org/openjfx/JavaFXRunMojoTestCase.java b/src/test/java/org/openjfx/JavaFXRunMojoTestCase.java index e643fce..cf09336 100644 --- a/src/test/java/org/openjfx/JavaFXRunMojoTestCase.java +++ b/src/test/java/org/openjfx/JavaFXRunMojoTestCase.java @@ -160,7 +160,7 @@ protected JavaFXRunMojo getJavaFXRunMojo(File testPom) throws Exception { setVariableValueToObject(mojo, "compilePath", project.getCompileClasspathElements()); setVariableValueToObject(mojo, "session", session); setVariableValueToObject(mojo, "executable", "java"); - setVariableValueToObject(mojo, "basedir", new File(getBasedir(), testPom.getParent())); + setVariableValueToObject(mojo, "basedir", testPom.getParentFile()); return mojo; }