OpenClover 不是 运行 - 错误

OpenClover not Running - Error

我正在尝试将 OpenClover 集成到我的项目中。 我有一个基于 Java 的 webapp,我使用 maven 我已经设置插件如下

        <plugin>
            <groupId>org.openclover</groupId>
            <artifactId>clover-maven-plugin</artifactId>
            <version>4.2.0</version>
            <configuration>
                <targetPercentage>50%</targetPercentage>
            </configuration>
            <executions>
                <execution>
                    <phase>verify</phase>
                    <goals>
                        <goal>check</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

当我运行下面的命令

mvn clean test clover:aggregate clover:clover -Dsurefire.skip.tests=false;

我收到这个错误

[ERROR] Failed to execute goal org.openclover:clover-maven-plugin:4.2.0:setup (default-cli) on project fcservices-web: Execution default-cli of goal org.openclover:clover-maven-plugin:4.2.0:setup failed: Unable to load the mojo 'setup' (or one of its required components) from the plugin 'org.openclover:clover-maven-plugin:4.2.0': com.google.inject.ProvisionException: Guice provision errors:
[ERROR]
[ERROR] 1) No implementation for org.apache.maven.execution.MavenSession was bound.
[ERROR] while locating com.atlassian.maven.plugin.clover.CloverSetupMojo
[ERROR] at ClassRealm[plugin>org.openclover:clover-maven-plugin:4.2.0, parent: sun.misc.Launcher$AppClassLoader@55f96302]
[ERROR] while locating org.apache.maven.plugin.Mojo annotated with @com.google.inject.name.Named(value=org.openclover:clover-maven-plugin:4.2.0:setup)
[ERROR]
[ERROR] 1 error
[ERROR] role: org.apache.maven.plugin.Mojo
[ERROR] roleHint: org.openclover:clover-maven-plugin:4.2.0:setup
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

知道上面是什么吗?

谢谢 达米恩

使用最新版本的 Maven (3.5.2) 解决了这个问题

从错误来看,您似乎需要更高版本的 Maven 或旧版本的 Clover 插件。