mvn deploy reports an error when executing: "for input string: "1;[[[["

331 天前
 null123456

I need to publish jar packages to the central warehouse. Their project structure is like this:

common
---common-all (here all the following sub-projects are introduced as dependencies)
---common-core
---common-es
---common-file
---common-job
---common-log
---common-mq
---common-redis
---common-security

So I need to execute the mvn clean install deploy command to push these packages to the private warehouse.
Executing common-core, common-es, common-file. . . These sub-projects are all normal, but only when common-all is released to the warehouse, an error is reported:

java.lang.NumberFormatException: For input string: "1;[[["
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:580)
        at java.lang.Integer.valueOf(Integer.java:766)
        at org.fusesource.jansi.io.AnsiOutputStream.write(AnsiOutputStream.java:199)
        at java.io.FilterOutputStream.write(FilterOutputStream.java:125)
        at java.io.PrintStream.write(PrintStream.java:480)
        at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
        at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:282)
        at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125)
        at java.io.OutputStreamWriter.write(OutputStreamWriter.java:207)
        at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:129)
        at java.io.PrintStream.write(PrintStream.java:526)
        at java.io.PrintStream.print(PrintStream.java:669)
        at java.io.PrintStream.println(PrintStream.java:806)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:348)
Exception in thread "Thread-0" java.lang.NumberFormatException: For input string: "1;[[[["
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:580)
        at java.lang.Integer.valueOf(Integer.java:766)
        at org.fusesource.jansi.io.AnsiOutputStream.write(AnsiOutputStream.java:199)
        at java.io.FilterOutputStream.write(FilterOutputStream.java:125)
        at java.io.FilterOutputStream.write(FilterOutputStream.java:97)
        at org.fusesource.jansi.io.AnsiOutputStream.uninstall(AnsiOutputStream.java:337)
        at org.fusesource.jansi.AnsiPrintStream.uninstall(AnsiPrintStream.java:82)
        at org.fusesource.jansi.AnsiConsole.systemUninstall(AnsiConsole.java:541)
        at org.apache.maven.shared.utils.logging.MessageUtils.doSystemUninstall(MessageUtils.java:101)
        at org.apache.maven.shared.utils.logging.MessageUtils.access$100(MessageUtils.java:34)
        at org.apache.maven.shared.utils.logging.MessageUtils$1.run(MessageUtils.java:211)

At present, all these sub-projects are successful when executing mvn clean install, but only an exception is thrown when executing common-all.
But when I switched back to Windows 11, it all worked fine. I suspect it has a lot to do with the system environment, but I don't know where to start. I hope there are experts who can give me some advice. Thank you.
System environment, this is what I get when I execute mvn -X:

pengwz@GE66:~/software/idea/workspace/common/common-all$ mvn -X
Apache Maven 3.9.5 (57804ffe001d7215b5e7bcb531cf83df38f93546)
Maven home: /home/pengwz/software/maven/apache-maven-3.9.5
Java version: 1.8.0_391, vendor: Oracle Corporation, runtime: /home/pengwz/software/java/8/jdk1.8.0_391/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "linux", version: "6.5.0-15-lowlatency", arch: "i386", family: "unix"

I'm currently using Ubuntu-Studio 22.04 and there is a command that seems relevant:

pengwz@GE66:~$ echo $TERM
xterm-256color

But when I changed the value to xterm, the problem was still not solved

1015 次点击
所在节点    程序员
10 条回复
cc666
331 天前
语言设置
区域设置
字符编码
mvn 版本
taogen
331 天前
What computer do you run the project? AArch64(Mac M1) or x64 (Intel/AMD/Older Mac).
Note that some Java libraries are not compatible with Mac M1.
taogen
331 天前
I have met some problems just like you. Finally, I installed a Windows 11 virtual machine in VMware Fusion on my Mac to package my project.
null123456
331 天前
@cc666 您说的这些上面都有写,谢谢
null123456
331 天前
@taogen MSI notebook, Intel platform: I711800H
null123456
331 天前
@taogen It should be the library incompatibility problem you mentioned.
flyqie
330 天前
你这是直接把 issue 什么的复制黏贴过来了吗。。

没看你回复和主页以前还以为是外国人来 v 站发帖。。
cc666
330 天前
@null123456
语言设置: 检查两台电脑的语言设置是否相同,从你中英文回复的情况来看可能不同
区域设置:检查电脑的区域设置,mvn 有时候区域不对会错误识别字符,比如在非英文 locale windows 机器上 mvn 打包 tomcal 会出现配置识别错误( N 年前遇到过)
字符编码:不用解释
mvn 版本:你用的 java8 ,但是用的比较新的 maven ,降级试试
null123456
329 天前
@flyqie 我在堆栈里发表了这个问题,但是没有人能够解决,我就拷贝到了这里
null123456
329 天前
@cc666 我使用 3.6-3.9 之间的版本都试过了,但是没有解决问题

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1012357

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX