GitPopcorn opened a new issue, #883: URL: https://github.com/apache/maven-mvnd/issues/883
The same problem has been solved as issue #567, but don't know why it now appears again. Here is my console output when test, you can see the platform encoding can not be changed with command line argument "-Dfile.encoding" or "-DjvmArgs". No enviroment variable like `MVN_OPTS` or `JAVA_TOOLS_OPTIONS` affects. And the same arguments in `~/.m2/mvnd.properties` will not work either. ``` E:\>"E:\choco\mvndaemon\maven-mvnd-0.8.2-windows-amd64\bin\mvnd.exe" -v mvnd 0.8.2 windows-amd64 native client (2bba2d6a4d3a5012ddf9f1f42a22784cad4011e3) Terminal: org.jline.terminal.impl.jansi.win.JansiWinSysTerminal Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) Maven home: E:\choco\mvndaemon\maven-mvnd-0.8.2-windows-amd64\mvn Java version: 19, vendor: Oracle Corporation, runtime: D:\Program Files\Java\jdk-19 Default locale: zh_CN, platform encoding: UTF-8 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" E:\>"E:\choco\mvndaemon\maven-mvnd-0.8.2-windows-amd64\bin\mvnd.exe" -Dfile.encoding=GBK -v mvnd 0.8.2 windows-amd64 native client (2bba2d6a4d3a5012ddf9f1f42a22784cad4011e3) Terminal: org.jline.terminal.impl.jansi.win.JansiWinSysTerminal Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) Maven home: E:\choco\mvndaemon\maven-mvnd-0.8.2-windows-amd64\mvn Java version: 19, vendor: Oracle Corporation, runtime: D:\Program Files\Java\jdk-19 Default locale: zh_CN, platform encoding: GBK OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" E:\>"E:\choco\mvndaemon\maven-mvnd-0.8.2-windows-amd64\bin\mvnd.exe" -Dfile.encoding=UTF-8 -v mvnd 0.8.2 windows-amd64 native client (2bba2d6a4d3a5012ddf9f1f42a22784cad4011e3) Terminal: org.jline.terminal.impl.jansi.win.JansiWinSysTerminal Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) Maven home: E:\choco\mvndaemon\maven-mvnd-0.8.2-windows-amd64\mvn Java version: 19, vendor: Oracle Corporation, runtime: D:\Program Files\Java\jdk-19 Default locale: zh_CN, platform encoding: UTF-8 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" E:\>"E:\choco\mvndaemon\maven-mvnd-1.0-m7-m40-windows-amd64\bin\mvnd.exe" -v Unable to find the root directory. Create a .mvn directory in the root directory or add the root="true" attribute on the root project's model to identify it. Apache Maven Daemon (mvnd) 1.0-m7 windows-amd64 native client (b2ef5d81997adbcdb72dc8c5603722538fa641fe) Terminal: org.jline.terminal.impl.jansi.win.JansiWinSysTerminal Apache Maven 4.0.0-alpha-7 (bf699a388cc04b8e4088226ba09a403b68de6b7b) Maven home: E:\choco\mvndaemon\maven-mvnd-1.0-m7-m40-windows-amd64\mvn Java version: 19, vendor: Oracle Corporation, runtime: D:\Program Files\Java\jdk-19 Default locale: zh_CN, platform encoding: UTF-8 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" E:\>"E:\choco\mvndaemon\maven-mvnd-1.0-m7-m40-windows-amd64\bin\mvnd.exe" -Dfile.encoding=GBK -v Unable to find the root directory. Create a .mvn directory in the root directory or add the root="true" attribute on the root project's model to identify it. Apache Maven Daemon (mvnd) 1.0-m7 windows-amd64 native client (b2ef5d81997adbcdb72dc8c5603722538fa641fe) Terminal: org.jline.terminal.impl.jansi.win.JansiWinSysTerminal Apache Maven 4.0.0-alpha-7 (bf699a388cc04b8e4088226ba09a403b68de6b7b) Maven home: E:\choco\mvndaemon\maven-mvnd-1.0-m7-m40-windows-amd64\mvn Java version: 19, vendor: Oracle Corporation, runtime: D:\Program Files\Java\jdk-19 Default locale: zh_CN, platform encoding: UTF-8 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" E:\>"E:\choco\mvndaemon\maven-mvnd-1.0-m7-m40-windows-amd64\bin\mvnd.exe" -Dfile.encoding=UTF-8 -v Unable to find the root directory. Create a .mvn directory in the root directory or add the root="true" attribute on the root project's model to identify it. Apache Maven Daemon (mvnd) 1.0-m7 windows-amd64 native client (b2ef5d81997adbcdb72dc8c5603722538fa641fe) Terminal: org.jline.terminal.impl.jansi.win.JansiWinSysTerminal Apache Maven 4.0.0-alpha-7 (bf699a388cc04b8e4088226ba09a403b68de6b7b) Maven home: E:\choco\mvndaemon\maven-mvnd-1.0-m7-m40-windows-amd64\mvn Java version: 19, vendor: Oracle Corporation, runtime: D:\Program Files\Java\jdk-19 Default locale: zh_CN, platform encoding: UTF-8 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" E:\>"E:\choco\mvndaemon\maven-mvnd-1.0-m7-m40-windows-amd64\bin\mvnd.exe" -DjvmArgs=-Dfile.encoding\=GBK -v Unable to find the root directory. Create a .mvn directory in the root directory or add the root="true" attribute on the root project's model to identify it. Apache Maven Daemon (mvnd) 1.0-m7 windows-amd64 native client (b2ef5d81997adbcdb72dc8c5603722538fa641fe) Terminal: org.jline.terminal.impl.jansi.win.JansiWinSysTerminal Apache Maven 4.0.0-alpha-7 (bf699a388cc04b8e4088226ba09a403b68de6b7b) Maven home: E:\choco\mvndaemon\maven-mvnd-1.0-m7-m40-windows-amd64\mvn Java version: 19, vendor: Oracle Corporation, runtime: D:\Program Files\Java\jdk-19 Default locale: zh_CN, platform encoding: UTF-8 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" E:\>SET "JAVA_HOME=%JAVA8_HOME%" E:\>"E:\choco\mvndaemon\maven-mvnd-0.8.2-windows-amd64\bin\mvnd.exe" -Dfile.encoding=GBK -v mvnd 0.8.2 windows-amd64 native client (2bba2d6a4d3a5012ddf9f1f42a22784cad4011e3) Terminal: org.jline.terminal.impl.jansi.win.JansiWinSysTerminal Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) Maven home: E:\choco\mvndaemon\maven-mvnd-0.8.2-windows-amd64\mvn Java version: 1.8.0_341, vendor: Oracle Corporation, runtime: D:\Program Files\Java\jdk1.8.0_341\jre Default locale: zh_CN, platform encoding: GBK OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" E:\>"E:\choco\mvndaemon\maven-mvnd-0.8.2-windows-amd64\bin\mvnd.exe" -Dfile.encoding=UTF-8 -v mvnd 0.8.2 windows-amd64 native client (2bba2d6a4d3a5012ddf9f1f42a22784cad4011e3) Terminal: org.jline.terminal.impl.jansi.win.JansiWinSysTerminal Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) Maven home: E:\choco\mvndaemon\maven-mvnd-0.8.2-windows-amd64\mvn Java version: 1.8.0_341, vendor: Oracle Corporation, runtime: D:\Program Files\Java\jdk1.8.0_341\jre Default locale: zh_CN, platform encoding: UTF-8 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" E:\>"E:\choco\mvndaemon\maven-mvnd-1.0-m7-m40-windows-amd64\bin\mvnd.exe" -Dfile.encoding=GBK -v Unable to find the root directory. Create a .mvn directory in the root directory or add the root="true" attribute on the root project's model to identify it. Apache Maven Daemon (mvnd) 1.0-m7 windows-amd64 native client (b2ef5d81997adbcdb72dc8c5603722538fa641fe) Terminal: org.jline.terminal.impl.jansi.win.JansiWinSysTerminal Apache Maven 4.0.0-alpha-7 (bf699a388cc04b8e4088226ba09a403b68de6b7b) Maven home: E:\choco\mvndaemon\maven-mvnd-1.0-m7-m40-windows-amd64\mvn Java version: 1.8.0_341, vendor: Oracle Corporation, runtime: D:\Program Files\Java\jdk1.8.0_341\jre Default locale: zh_CN, platform encoding: GBK OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" E:\>"E:\choco\mvndaemon\maven-mvnd-1.0-m7-m40-windows-amd64\bin\mvnd.exe" -DjvmArgs=-Dfile.encoding\=GBK -v Unable to find the root directory. Create a .mvn directory in the root directory or add the root="true" attribute on the root project's model to identify it. Apache Maven Daemon (mvnd) 1.0-m7 windows-amd64 native client (b2ef5d81997adbcdb72dc8c5603722538fa641fe) Terminal: org.jline.terminal.impl.jansi.win.JansiWinSysTerminal Apache Maven 4.0.0-alpha-7 (bf699a388cc04b8e4088226ba09a403b68de6b7b) Maven home: E:\choco\mvndaemon\maven-mvnd-1.0-m7-m40-windows-amd64\mvn Java version: 1.8.0_341, vendor: Oracle Corporation, runtime: D:\Program Files\Java\jdk1.8.0_341\jre Default locale: zh_CN, platform encoding: GBK OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" E:\>"E:\choco\mvndaemon\maven-mvnd-1.0-m7-m40-windows-amd64\bin\mvnd.exe" -Dfile.encoding=UTF-8 -v Unable to find the root directory. Create a .mvn directory in the root directory or add the root="true" attribute on the root project's model to identify it. Apache Maven Daemon (mvnd) 1.0-m7 windows-amd64 native client (b2ef5d81997adbcdb72dc8c5603722538fa641fe) Terminal: org.jline.terminal.impl.jansi.win.JansiWinSysTerminal Apache Maven 4.0.0-alpha-7 (bf699a388cc04b8e4088226ba09a403b68de6b7b) Maven home: E:\choco\mvndaemon\maven-mvnd-1.0-m7-m40-windows-amd64\mvn Java version: 1.8.0_341, vendor: Oracle Corporation, runtime: D:\Program Files\Java\jdk1.8.0_341\jre Default locale: zh_CN, platform encoding: GBK OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" E:\>"E:\choco\mvndaemon\maven-mvnd-1.0-m7-m40-windows-amd64\bin\mvnd.exe" -DjvmArgs=-Dfile.encoding\=UTF-8 -v Unable to find the root directory. Create a .mvn directory in the root directory or add the root="true" attribute on the root project's model to identify it. Apache Maven Daemon (mvnd) 1.0-m7 windows-amd64 native client (b2ef5d81997adbcdb72dc8c5603722538fa641fe) Terminal: org.jline.terminal.impl.jansi.win.JansiWinSysTerminal Apache Maven 4.0.0-alpha-7 (bf699a388cc04b8e4088226ba09a403b68de6b7b) Maven home: E:\choco\mvndaemon\maven-mvnd-1.0-m7-m40-windows-amd64\mvn Java version: 1.8.0_341, vendor: Oracle Corporation, runtime: D:\Program Files\Java\jdk1.8.0_341\jre Default locale: zh_CN, platform encoding: GBK OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" E:\>ECHO %MVN_OPTS% %MVN_OPTS% E:\>ECHO %JAVA_TOOL_OPTIONS% %JAVA_TOOL_OPTIONS% ``` And the CJK character from stderr will be displayed as "?" code when running `mvnd 1.0-m7-m40` in CMD at Windows 10, which is displayed correct with `mvnd 0.8.2`. I guess the file encoding problem is one part of reason of that issue. The wrong decoding result "?" usually comes from "encode with UTF-8 -> decode with GBK -> encode with UTF-8 -> decode with GBK". Further more, I found that the The `-Dfile.encoding` argument no long change JDK platform encoding after Maven 4.0.0-alpha version, but I am not comfirmed if that is the cause of this issue: ``` E:\>mvn39 --version > E:\apache-maven-3.9.0\bin\mvn --version Apache Maven 3.9.0 (9b58d2bad23a66be161c4664ef21ce219c2c8584) Maven home: E:\apache-maven-3.9.0 Java version: 1.8.0_341, vendor: Oracle Corporation, runtime: D:\Program Files\Java\jdk1.8.0_341\jre Default locale: zh_CN, platform encoding: GBK OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" E:\>mvn39 --version -Dfile.encoding=UTF-8 > E:\apache-maven-3.9.0\bin\mvn --version -Dfile.encoding=UTF-8 Apache Maven 3.9.0 (9b58d2bad23a66be161c4664ef21ce219c2c8584) Maven home: E:\apache-maven-3.9.0 Java version: 1.8.0_341, vendor: Oracle Corporation, runtime: D:\Program Files\Java\jdk1.8.0_341\jre Default locale: zh_CN, platform encoding: UTF-8 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" E:\>mvn40 --version > E:\apache-maven-4.0.0-alpha-7\bin\mvn --version Unable to find the root directory. Create a .mvn directory in the root directory or add the root="true" attribute on the root project's model to identify it. Apache Maven 4.0.0-alpha-7 (bf699a388cc04b8e4088226ba09a403b68de6b7b) Maven home: E:\apache-maven-4.0.0-alpha-7 Java version: 1.8.0_341, vendor: Oracle Corporation, runtime: D:\Program Files\Java\jdk1.8.0_341\jre Default locale: zh_CN, platform encoding: GBK OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" E:\>mvn40 --version -Dfile.encoding=UTF-8 > E:\apache-maven-4.0.0-alpha-7\bin\mvn --version -Dfile.encoding=UTF-8 Unable to find the root directory. Create a .mvn directory in the root directory or add the root="true" attribute on the root project's model to identify it. Apache Maven 4.0.0-alpha-7 (bf699a388cc04b8e4088226ba09a403b68de6b7b) Maven home: E:\apache-maven-4.0.0-alpha-7 Java version: 1.8.0_341, vendor: Oracle Corporation, runtime: D:\Program Files\Java\jdk1.8.0_341\jre Default locale: zh_CN, platform encoding: GBK OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" ``` -- 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. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org