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()); } 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; }