openjfx / javafx-maven-plugin

Maven plugin to run JavaFX 11+ applications
Apache License 2.0
371 stars 59 forks source link

Path exceptions are excluded from generated classpath despite includePathExceptionsInClasspath is set #162

Open martinleim opened 1 year ago

martinleim commented 1 year ago

I have been building an application which has JAR dependencies that do not declare a module descriptor. The application itself is non-modular as well (this is important, see below). When running my application with javafx:run, the plugin tries to determine automatic module names for all the dependencies, but it fails at some of them. As a result, these dependencies are missing in the classpath.

I understand that's why the configuration switch includePathExceptionsInClasspath has been introduced (see #18). Unfortunately, after activating this switch, the dependencies were still missing from classpath.

I found out that the code that adds the path exceptions is only executed if the JavaFX app itself is modular. Is this intentional or has there been an oversight?

Since making my app modular is not an option for me (it would be possible, but would involve rebundling external JARs, which I want to avoid), I have created a fork where I always add the path exceptions to classpath, no matter if the app is modular or not. Is there an interest in integrating this change? If yes, then you can merge this PR: https://github.com/openjfx/javafx-maven-plugin/pull/163

amischler commented 11 months ago

Same issue here. It could be great to see that PR merged.