Jenkins Build文件夹

时间:2016-04-27 19:37:52

标签: java maven jenkins log4j

我们正在为动态网络项目做Jenkins构建。 log4j.properties位于/src/main/resouces

当我们进行Jenkins构建时,log4j.properties没有显示在WAR的任何文件夹中。

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

我无法弄清楚为什么Jenkins WAR没有log4j.properties

有人可以帮忙解决这个问题吗?

1 个答案:

答案 0 :(得分:0)

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

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