运行分叉时,maven jetty插件没有控制台日志

时间:2015-11-12 05:31:33

标签: logging fork maven-jetty-plugin

我使用maven jetty插件来运行我的集成测试,为此我在分叉模式下运行jetty(因为我需要将一些jam args传递给jvm) 一切正常,但出于某些原因,我无法在控制台中获取任何网络日志。

当我运行它时,我忘了我得到所有的STDOUT,STDERR等等。所以当出现问题时我可以看到什么是错的,但是当我遇到问题时,我什么都没有,所以当出现问题我不知道它在哪里。

这是我的pom

<plugin>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
            <version>9.0.3.v20130506</version>
            <configuration>
              <contextPath>/${project.artifactId}</contextPath>
              <jvmArgs>-Denv=it -Djetty.port=8081 -javaagent:/...../jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946-runtime.jar=destfile=/....../target/jacoco.exec</jvmArgs>
              <waitForChild>false</waitForChild>
              <stopKey>stopJetty</stopKey>
              <stopPort>9966</stopPort>
            </configuration>
            <executions>
              <execution>
                <id>start-jetty</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>run-forked</goal>
                </goals>
                <configuration>
                  <stopKey>stopJetty</stopKey>
                  <stopPort>9966</stopPort>
                </configuration>
              </execution>
              <execution>
                <id>stop-jetty</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>stop</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

我应该添加什么才能将所有日志都放在控制台中?

0 个答案:

没有答案