Recommend adding a feature to configure custom Maven parameters.
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### Description
In the "Tools -> Options -> Java Tab -> Maven Tab" settings, it is not possible to set custom temporary variables or JVM parameters for Maven; we recommend adding this feature. In a Windows environment, the default system encoding is GBK. When you open a class in NetBeans and run it, and the output contains Chinese characters, the Chinese text in the console appears as garbled characters. There are two ways to avoid garbled characters: Method 1: Add the variable `JAVA_TOOL_OPTIONS` to the system environment variables or `maven.bat`, with the value `-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -Dconsole.encoding=UTF-8`. Method 2: Run the class once, then click the “Re-run with different parameters” button on the left side of the console and set the value of the `exec.vmArgs` option to `-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -Dconsole.encoding=UTF-8`. However, neither of these methods is ideal. The first method affects the entire system, while the second requires reconfiguring the setting every time the class is run, which is extremely inconvenient.
### Use case/motivation
_No response_
### Related issues
_No response_
### Are you willing to submit a pull request?
No
Contributor guide
Research direction
Start in Tools → Options → Java → Maven and trace how Maven run settings are stored and passed to executions. Done means users can persist custom temporary variables or JVM parameters for Maven, including the encoding parameters described in the issue, without reconfiguring each run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100