使用maven运行测试时,我想在屏幕上看到输出.
将log4j.xml放入我的项目的目录(src / test / resources / cfg /)之后,我更新了我的pom以包含
235
236 org.apache.maven.plugins
237 maven-surefire-plugin
238
239 false
240
241 **/*$*.java
242
243
244
245 -Dlog4j.configuration
246 file:src/test/resources/cfg/log4j.xml
247
248
249
250 src/test/resources/cfg/
251
252
253
以上不起作用.测试运行时,我仍然看到以下消息
log4j:WARN Please initialize the log4j system properly.
对于记录,以下是log4j
1 <?xml version="1.0" encoding="UTF-8" ?>
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
我错过了什么?