Support for --module-path dependencies for compatibility with javafx 9+ #60
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In more recent versions of Javafx, the javafx libraries are provided using the module system which was introduced in Java 9. Even when using these dependencies from a project which does not use the module system, it is still required to add the javafx jar files to the
--module-path
instead of the--classpath
.I've proposed an additional optional parameter,
--module-dependencies
which accepts a list of artifact coordinates, of the formgroupId:artifactId:version[:classifier]
. When resolving dependencies, jgo will check if any of the discovered dependencies are located in themodule-dependencies
list. If so, it will place these jar files in a subdirectory of thecache_dir
workspace, namedmodules
. This directory will then be specified as a jvm argument as--module-path ${workspace}/modules
.This is not intended to provide full java module system support, but is intended to provide a mechanism for using dependencies which have been built for use with the module system. This also does not handle all of the possible jvm arguments for module configuration, only the --module-path, since the location of the jar files are otherwise unknown to the user when calling
jgo
. Other Module specific arguments should still be passed into jgo the same as any other JVM argument.