我像往常一样使用 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 个字符。
最佳答案
问题是,我已经加密了主目录,而 Ubuntu 只允许 的文件名长度为 143 个字符:
来自 eCryptfs 的作者之一:
所以选项基本上是:
关于Maven 构建-surefire 插件错误-文件名太长,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/42416490/