【问题标题】:log4j.properties missing in Jenkins Build folderJenkins Build 文件夹中缺少 log4j.properties
【发布时间】:2016-04-27 19:37:52
【问题描述】:

我们正在为一个动态 Web 项目构建 Jenkins。 log4j.properties 位于/src/main/resouces

当我们构建 Jenkins 时,log4j.properties 没有出现在 WAR 的任何文件夹中。

但是当我们进行 maven 本地构建时,log4j.propertiesWEB-INF\classes 文件夹中。

我不明白为什么 Jenkins WAR 没有 log4j.properties

谁能帮忙解决这个问题?

【问题讨论】:

  • Jenkins 的控制台输出中是否有任何可疑之处?

标签: java maven jenkins log4j


【解决方案1】:

在 pom.xml 的配置标签中添加了以下标签。 添加后,我做了 Jenkins 构建,它具有预期的 log4j.properties。

<systemPropertyVariables>                           <log4j.configuration>/src/main/resources/log4j.properties</log4j.configuration>
</systemPropertyVariables>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-20
    • 2019-05-05
    • 1970-01-01
    • 1970-01-01
    • 2015-12-14
    • 2019-02-04
    相关资源
    最近更新 更多