cygwin在windows10中为java项目运行maven构建时在控制台输出中引入空格

wnvonmuf  于 2021-06-29  发布在  Java
关注(0)|答案(1)|浏览(378)

在运行使用java 1.8的maven 3构建时,检查windows 10 64位上cygwin64终端的以下输出片段:

[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

你可以清楚地看到它发生在线路上:

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

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

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

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

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

我怎样才能解决这个问题?
谢谢您。

oewdyzsn

oewdyzsn1#

在cygwin的网站上发布了这个问题后,marco atzeri给出了一个适合我的解决方案:在windows的环境变量中设置:

CYGWIN="disable_pcon"

然后,很明显,重启cygwin。
编辑:
上面的解决方案有一个非常糟糕的副作用:如果您需要使用 cmd /C ,则上述标志将终止交互(例如,等待输入将不再工作)。TakashiYano在cygwin上发布了一个没有这个问题的更好的解决方案,作为对我问题的回答:更换jar jansi-1.17.1.jar 在maven的lib文件夹中 jansi-2.1.1.jar . 您可以从下载2.1.1版本https://mvnrepository.com/artifact/org.fusesource.jansi/jansi/2.1.1

相关问题