V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
null123456
V2EX  ›  程序员

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

  •  
  •   null123456 · 331 天前 · 1016 次点击
    这是一个创建于 331 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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

    10 条回复    2024-01-31 11:02:09 +08:00
    cc666
        1
    cc666  
       331 天前
    语言设置
    区域设置
    字符编码
    mvn 版本
    taogen
        2
    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
        3
    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
        4
    null123456  
    OP
       331 天前
    @cc666 您说的这些上面都有写,谢谢
    null123456
        5
    null123456  
    OP
       331 天前
    @taogen MSI notebook, Intel platform: I711800H
    null123456
        6
    null123456  
    OP
       331 天前
    @taogen It should be the library incompatibility problem you mentioned.
    flyqie
        7
    flyqie  
       330 天前 via Android
    你这是直接把 issue 什么的复制黏贴过来了吗。。

    没看你回复和主页以前还以为是外国人来 v 站发帖。。
    cc666
        8
    cc666  
       330 天前
    @null123456
    语言设置: 检查两台电脑的语言设置是否相同,从你中英文回复的情况来看可能不同
    区域设置:检查电脑的区域设置,mvn 有时候区域不对会错误识别字符,比如在非英文 locale windows 机器上 mvn 打包 tomcal 会出现配置识别错误( N 年前遇到过)
    字符编码:不用解释
    mvn 版本:你用的 java8 ,但是用的比较新的 maven ,降级试试
    null123456
        9
    null123456  
    OP
       329 天前
    @flyqie 我在堆栈里发表了这个问题,但是没有人能够解决,我就拷贝到了这里
    null123456
        10
    null123456  
    OP
       329 天前
    @cc666 我使用 3.6-3.9 之间的版本都试过了,但是没有解决问题
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2940 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 14:16 · PVG 22:16 · LAX 06:16 · JFK 09:16
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.