-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to populate module path with all maven dependencies #91
Comments
If I get it correctly, you need a configuration in the plugin which can be used to identify if all the dependency needs to be on the module-path while using javafx:run and javafx:jlink goals. We have a similar issues #72 which helps to run an application on the classpath. May be its better to update the PR #73 to introduce a config which can be used to either accept classpath or modulepath or both (default). @betanzos Do you have any thoughts on this? |
That's it.
And something to set
Or maybe to some arbitrary value. I'm not sure if it's currently possible to add a service provider to the module graph with the plugin:
This could replace the
|
I am trying to fuse #72 and #91 by introducing one additional configuration. Due to a lack of a better name, I call it
The options are self explanatory and helps to run an application by switching dependencies to either MODULEPATH or CLASSPATH. Changes are available at Feedback is appreciated. |
I have opened PR #92 to make it easier to review the changes |
What is exactly the DEFAULT runtimePath ? Put all modules from the reconstructed graph in the module path and the rest in the class path ? I have tested and it seems to work well for the run goal, but there is an issue with the jlink goal: the command line arguments specified in
doesn't appli to jlink, and the modules added to the module path are not added to the jlink image. What about adding another set of |
The way this new configuration works is by defining a
|
It has a Your change adds the needed modules to the module path, but that's not enough :
They need to be brought into the module graph, either from module-info Is there something still unclear ? |
Maybe I should precise what
|
Hi @HGuillemet , Thank you for the comment with JEP. I wasn't aware of this JVM option :) Do you have a sample against which I can run some tests? |
@HGuillemet Does #92 work for you? |
As explained above, it works but there is still something missing to configure I have built a sample test case, attached to this message.
With a jdk 9+, run So we need the ability to add the modules in the module path to the root set during jlink, and it could be nice, if not complicated, to add a 4th option to |
Hi @HGuillemet, If we use |
That's why I wrote above:
As for patching the jar of dependencies to add module-info, that would be nice, but I guess you can leave that to moditect. Also I'm realizing than |
The reason why So, now any I have introduced a new parameter |
Tested and works well. BTW, this plugin becomes less and less specific to JavaFX. Do you have plan to reorganize things ? |
One additional request : the maven |
Hi @HGuillemet , Do you need a scope which can be used at compile time but not to be used during runtime? |
Sorry for this late answer. Forget my last message: the |
This issue is close to Issue 89.
If I understand well, the javafx-maven-plugin reconstructs the module graph from the module-infos and populated the module path only with the
required
modules. That's a good behaviour in the majority of cases.But if the application needs modules that are determined dynamically by maven dependency system and cannot be added statically in module-info, this doesn't work. We would need to add all maven dependencies to the module path and use, e.g, the special
--add-modules ALL-MODULE-PATH
command line argument.This concerns both run and jlink goals.
Could you consider adding this option ?
EDIT: The Apache
maven-jlink-plugin
has this option (but not the one that reads the module-info). Unfortunately the development of this plugin seems to have stopped.The text was updated successfully, but these errors were encountered: