How to have the Maven build wait for the Jetty server to start in forked mode before running the integration tests?

后端 未结 1 1060
梦谈多话
梦谈多话 2021-01-14 06:28

I have a report for the code coverage by the integration test.

I do have integration tests, and these are run successfully in the Maven build.

相关标签:
1条回答
  • 2021-01-14 07:07

    After reading a bit about the plugin on http://eclemma.org/jacoco/trunk/doc/report-integration-mojo.html I noticed that it said:

    Binds by default to the lifecycle phase: verify.

    So, change to:

        <execution>
            <id>post-integration-test</id>
            <phase>verify</phase>
            <goals>
              <goal>report-integration</goal>
            </goals>
            <configuration>
              <dataFile>${project.build.directory}/coverage-reports/jacoco-it.exec</dataFile>
              <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
            </configuration>
        </execution>
    

    (or just leave out the phase) and it should work.

    0 讨论(0)
提交回复
热议问题