当我尝试对我的代码进行gradle构建以及Junit测试时,我在Jenkins上得到了以下错误:
Caused by: java.lang.IllegalStateException: java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Failed to create parent directories for xxxxxx基本上,Jenkins正在尝试查找logback.xml中指定的目录,但它没有构建目录结构的权限。
我正在使用Jenkins的Jacoco插件来生成测试报告。
任何帮助解决这个问题的人都非常感谢。
谢谢
发布于 2018-08-09 10:15:30
我通过使用@TestPropertySource(属性= "logging.config=classpath:logback.xml")解决了这个问题,其中logback-spring.xml在Jenkins构建期间被忽略。
https://stackoverflow.com/questions/51725820
复制相似问题