简体   繁体   English

cygwin 在控制台 output 运行 maven 构建时在 Z0045421F6393D1356681DB398F14CE6DZ 中为 Z00F454268 中的 java 项目构建空间

[英]cygwin introduces spaces in the console output when running a maven build for a java project in windows 10

Check the following output fragment from a cygwin64 terminal on windows 10 64bit while running a maven 3 build using java 1.8: Check the following output fragment from a cygwin64 terminal on windows 10 64bit while running a maven 3 build using java 1.8:

[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\proj\t020-domain\src\          test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ t020-domain ---
m
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source f          iles to C:\proj\t020-domain\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ t020-domain                                     ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:3.1.2:jar (default-jar)                                @ t020-domain ---
[INFO] Building jar: C:\proj\t020-domain\target\t020-domain-80.1-SNAPSHOT.jar
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.4:prepare-agent-integration (default-prepare-agent-integration) @
36mt020-domain ---
[INFO] argLine set to -javaagent:C:\\Users\\VBO07\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.8.4\\org.jacoco.agent-0
.8.4-runtime.jar=destfile=C:\\proj\\t020-domain\\target\\jacoco-it.exec
[INFO]
[INFO] --- maven-failsafe-plugin:2.22.2:integration-test (default) @ t020-domain ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-failsafe-plugin:2.22.2:verify (default) @ t020-domain                                           ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.4:report (default-                            report) @ t020-domain ---
[INFO] Skipping JaCoCo execution due to missing execution data file.
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.4:report-integration (def                            ault-report-integration) @ t020-domain
 ---
[INFO] Skipping JaCoCo execution due to missing execution data file.
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.4:check (default-check) @ t020-domain ---
[INFO] Skipping JaCoCo execution due to mi          ssing execution data file:C:\proj\t020-domain\target\jacoco.exec

You can see it clearly happening on the lines:你可以清楚地看到它在线条上发生:

[INFO] skip non existing resourceDirectory C:\proj\t020-domain\src\          test\resources

and

[INFO] Compiling 2 source f          iles to C:\proj\t020-domain\target\test-classes

and

[INFO] --- jacoco-maven-plugin:0.8.4:report (default-                            report) @ t020-domain ---

and

[INFO] --- jacoco-maven-plugin:0.8.4:report-integration (def                            ault-report-integration) @ t020-domain

and

[INFO] Skipping JaCoCo execution due to mi          ssing execution data file:C:\proj\t020-domain\target\jacoco.exec

How can I fix this?我怎样才能解决这个问题?

Thank you.谢谢你。

After posting this problem on cygwin's website, Marco Atzeri gave a solution that works for me: set in windows's environment variables:在 cygwin 的网站上发布这个问题后,Marco Atzeri 给出了一个适合我的解决方案:在 windows 的环境变量中设置:

CYGWIN="disable_pcon"

Then, obviously, restart cygwin.然后,显然,重新启动 cygwin。

EDIT:编辑:

The above solution has a big bad side-effect: if you need to run interactive commands with cmd /C , then the then above flag will kill the interactions (waiting for input for example will not work anymore).上面的解决方案有一个很大的副作用:如果您需要使用cmd /C运行交互式命令,那么上面的标志将终止交互(例如等待输入将不再起作用)。 A better solution that does not have this problem was posted by Takashi Yano on cygwin as answer to my question: replace the jar jansi-1.17.1.jar in the lib folder of maven with jansi-2.1.1.jar . A better solution that does not have this problem was posted by Takashi Yano on cygwin as answer to my question: replace the jar jansi-1.17.1.jar in the lib folder of maven with jansi-2.1.1.jar . You can download the 2.1.1 version from https://mvnrepository.com/artifact/org.fusesource.jansi/jansi/2.1.1您可以从https://mvnrepository.com/artifact/org.fusesource.jansi/jansi/2.1.1下载 2.1.1 版本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM