sdedic opened a new pull request #2731:
URL: https://github.com/apache/netbeans/pull/2731
The need originated from LSP server, where the client wants to pass explicit
arguments for executed application. As it turned out, this feature is generally
handy in other scenarios, too.
In addition, Maven project support provides all nice pieces just in a single
`exec.args` property suitable directly for `exec:exec` plugin: this is a pain
for custom setups, which could eventually accept VM arguments and app
parameters from the IDE (LSP server) but cannot extract them from the single
command line.
The idea is to run the project action using `Lookups.executeWith()` and
supply the lower layers with instructions how to modify the execution
environment. @jtulach it may be also possible to use `context` parameter of
`ProjectActionProvider.invokeAction()` ?
Here's the summary of changes:
- `ExplicitProcessParameters` immutable holder + builder API introduced in
`extexecution` module. Serves as an instruction to modify process arguments,
must be processed by the executor.
- Maven executor refactored "a bit".
- VM arguments and program arguments are now defined as properties; they are
visible in Maven POM, too. `exec.args` now references the other properties.
- `RunJarPanel` logic extracted to a helper class, unit tests written.
- JAR packaging processing now combines POM or action mapping parameters
with `ExplicitProcessArguments` to produce the result.
During the course, I've fixed some tests in Maven that lacked test data.
I also caught a race condition in Maven project implementation: if the
project uses interpolated `packaging` attribute (i.e. `${packaging}`), that
non-interpolated value will appear in the project and screws up the project
Lookup contents: checkers for the real packaging will not be included, only
afer 1st run. Fixed by forcing a reload after the real POM model is loaded by
`MavenEmbedder`.
In this PR, just Maven support jar packaging is changed. I'd like to apply
similar change to Gradle projects, but would probably need help from @lkishalmi
.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists