javafx-maven-plugin
javafx-maven-plugin copied to clipboard
"no modules specified" with CLASSPATH option
Hi,
I have a Java 17 application without a module descriptor I would like to build with mvn javafx:jlink. I start the application usually within Eclipse by using --module-path
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.8</version>
<configuration>
<mainClass>org.example.demo.Launcher</mainClass>
<runtimePathOption>CLASSPATH</runtimePathOption>
</configuration>
</plugin>
I can start my application with mvn javafx:run, but I cannot use jlink. I get the error message
[INFO] --- javafx-maven-plugin:0.0.8:jlink (default-cli) @ demo ---
Error: no modules specified to --add-modules
Usage: jlink <options> --module-path <modulepath> --add-modules <module>[,<module>...]
Use --help for a list of possible options
Am I missing something or is it just not possible to use javafx:jlink without module descriptor? If so, the runtimePathOption CLASSPATH should probably not be allowed for the jlink execution.
Thank you and best regards
Nils