-
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 run an application on either CLASSPATH or MODULEPATH #92
Conversation
What is the status of this PR ? Could you merge it ? |
Hi @HGuillemet , Thanks for the reminder. I will have a look at this PR in the coming days and make sure its merged. |
No DEFAULT on RuntimePath:
|
Hi @johanvos This issue has been fixed with the latest commit. |
Hi @HGuillemet , Jose and I are at a standstill about what should happen if the application contains a
For more information, please have a look at the conversation. What are your thoughts for this case? |
IMO, I prefer the option 1 adding a WARNING message informing it. Since the plugin behavior for Something really important is that when there are a module descriptor the compiler will ALWAYS use it. Because of this, the module descriptor must be properly configured. Otherwise we will have compilation errors. |
In fact applications with module descriptors can run on classpath, if they are launched in the old way.
Also, a jar could technically appear in both module and class path, it's the presence of a So to answer your question: 1) is probably better, but I wonder if some configuration like:
won't be clearer and allows more flexibility. |
The plugin already does this, inherently, without giving an option to the user. In the presence of a module descriptor, With this PR adding
The only case, I can imagine, not fulfilled here is when the user wants all dependencies on modulepath, have a module descriptor, and yet run the mainclass from classpath. Adding 3 different configuration options to the plugin for one case is an overkill. @HGuillemet Am I missing any other case(s)? Moreover, 3 different options causes too many non-valid cases to control if all of these options are used together. For example:
or
|
I though you reconstructed the module graph (from the descriptors) and add to the module path the modules that will be brought into the graph by the
Yes, that corresponds to the default of the suggested
Technically, this is valid.
This too. You might as well put all maven dependencies to both classpath and module path. That will cover all cases and won't cause troubles whatever the launch style is, but having huge command lines and maybe uselessly slowing down a bit the process of finding modules and classes. What really matters is what is brought into the module graph with I started to augment your table with all possible cases (presence of descriptor, launch style, class path and module path population), but that's quite complex and not fully determined as long as we don't know what the default/auto behaviour exactly is for each option. Examples of what is not covered by the PR:
I don't know if giving fine-grain control to cover all what can be done with the command line is the way to go. The concerned use cases seem quite rare. But the standstill you were at is the sign that there might be some more natural configuration options that will cover more cases while still having a nice default behaviour that will make 99% of users happy. |
Hi @HGuillemet ,
Previously, the module path was build using the descriptor if one was present. With this PR, if one uses runtimePathOption as MODULEPATH, we put everything on the module-path, irrespective of its presence in the module descriptor. If
I won't do this :)
I am sure there will always be area of improvement. For this PR, my hunch is that we are at a good position and it should be merged as it is. |
src/test/resources/unit/javafxrun-classpath-test/classpath-launcher.xml
Outdated
Show resolved
Hide resolved
…ption is MODULEPATH
@abhinayagarwal If I understand correctly, it seems that the CLASSPATH option allows loading the JavaFX modules themselves on the CLASSPATH? If so, this is not a supported mode. As an FYI, I filed JDK-8256362 to emit a warning to that effect. |
@kevinrushforth Thanks for the information. I will add a warning for the same in the plugin. |
Adds a new configuration to the plugin:
runtimePath
which accepts 3 values:DEFAULT: Switches to the default behaviour of the pluginFixes #72 and #91