我正在使用mvn clean install正常构建项目并发生以下错误:
(File name too long) -> [Help 1]
完整的maven输出:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:19 min
[INFO] Finished at: 2017-02-23T13:42:19+01:00
[INFO] Final Memory: 67M/544M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project union-sme-webapp: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: java.lang.RuntimeException: org.apache.maven.surefire.report.ReporterException: When writing report: /home/gondy/projects/xxxxxxx/xxxxxxxxx/webapp/target/surefire-reports/TEST-xx.xxxxx.xxxx.xxxx.webapp.service.document.generator.statics.arrangements.XxxxxxxxxxXxxxxxxXxxxxxxxxxxxXxxxxxxxXxxxxxxxxXxxx.xml (File name too long) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
我正在研究Ubuntu 16.04 LTS。我的同事正在构建同一个项目,没有任何问题,它甚至可以在Jenkins CI上运行。这里有什么问题?文件名是144个字符长,应该没问题,ext的限制为255个字符。
答案 0 :(得分:6)
问题是,我有加密的主目录和Ubuntu 允许文件名只有143个字符:
来自eCryptfs的一位作者:
根据经验,我们发现长度超过143个字符的字符文件名开始需要加载<255个字符。所以我们(作为eCryptfs上游开发人员)通常建议您将文件名限制为~140个字符。 https://unix.stackexchange.com/a/32834/82647
所以选项基本上是:
答案 1 :(得分:1)
您可以随时通过pom.xml文件或控制台参数禁用文件报告
mvn clean install -Dsurefire.useFile = false -DredirectTestOutputToFile = false -DdisableXmlReport = true
测试结果将记录到控制台
其他方式(我未经测试)将汇总报告,此处提及maven surefire reporting plugin configuration