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

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

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

  1. [INFO] Using 'UTF-8' encoding to copy filtered resources.
  2. [INFO] skip non existing resourceDirectory C:\proj\t020-domain\src\ test\resources
  3. [INFO]
  4. [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ t020-domain ---
  5. m
  6. [INFO] Changes detected - recompiling the module!
  7. [INFO] Compiling 2 source f iles to C:\proj\t020-domain\target\test-classes
  8. [INFO]
  9. [INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ t020-domain ---
  10. [INFO] Tests are skipped.
  11. [INFO]
  12. [INFO] --- maven-jar-plugin:3.1.2:jar (default-jar) @ t020-domain ---
  13. [INFO] Building jar: C:\proj\t020-domain\target\t020-domain-80.1-SNAPSHOT.jar
  14. [INFO]
  15. [INFO] --- jacoco-maven-plugin:0.8.4:prepare-agent-integration (default-prepare-agent-integration) @
  16. 36mt020-domain ---
  17. [INFO] argLine set to -javaagent:C:\\Users\\VBO07\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.8.4\\org.jacoco.agent-0
  18. .8.4-runtime.jar=destfile=C:\\proj\\t020-domain\\target\\jacoco-it.exec
  19. [INFO]
  20. [INFO] --- maven-failsafe-plugin:2.22.2:integration-test (default) @ t020-domain ---
  21. [INFO] Tests are skipped.
  22. [INFO]
  23. [INFO] --- maven-failsafe-plugin:2.22.2:verify (default) @ t020-domain ---
  24. [INFO] Tests are skipped.
  25. [INFO]
  26. [INFO] --- jacoco-maven-plugin:0.8.4:report (default- report) @ t020-domain ---
  27. [INFO] Skipping JaCoCo execution due to missing execution data file.
  28. [INFO]
  29. [INFO] --- jacoco-maven-plugin:0.8.4:report-integration (def ault-report-integration) @ t020-domain
  30. ---
  31. [INFO] Skipping JaCoCo execution due to missing execution data file.
  32. [INFO]
  33. [INFO] --- jacoco-maven-plugin:0.8.4:check (default-check) @ t020-domain ---
  34. [INFO] Skipping JaCoCo execution due to mi ssing execution data file:C:\proj\t020-domain\target\jacoco.exec

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

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

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

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

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

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

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

oewdyzsn

oewdyzsn1#

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

  1. 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

相关问题