openclover / clover

This repository contains source code of OpenClover Core as well as its integrations: Clover-for-Ant, Clover-for-Eclipse and Clover-for-IDEA plugins. Sources are licensed under Apache 2.0 license.
Other
57 stars 14 forks source link

Is support of Maven 4.x planned for the openclover maven plugin? #217

Closed ottlinger closed 8 months ago

ottlinger commented 8 months ago

As I cannot file any issues in https://github.com/openclover/clover-maven-plugin I'm posting my question here.

I have a project running well with openclover 4.5.0 configured as

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.openclover</groupId>
          <artifactId>clover-maven-plugin</artifactId>
          <version>4.5.0</version>
          <configuration>
            <targetPercentage>75%</targetPercentage>
          </configuration>
          <executions>
            <execution>
              <phase>pre-site</phase>
              <id>instrument</id>
              <goals>
                <goal>instrument</goal>
              </goals>
            </execution>
            <execution>
              <id>report</id>
              <phase>verify</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>

that runs fine with Maven 3.9.5 and fails with Maven 4.x as coverage is not measured correctly and build fails with:

[INFO] OpenClover Version 4.5.0, built on 2023-10-04
[INFO] Coverage check FAILED
[ERROR] The following coverage targets for null were not met: 
Total coverage of 0% did not meet target of 75%
[ERROR] Total coverage of 0% did not meet target of 75%
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] Total time:  45.505 s
[INFO] Finished at: 2023-10-20T22:37:55+02:00
[INFO] --------------------------------------------------------------------------------------------------------------------------
[ERROR] Failed to execute goal org.openclover:clover-maven-plugin:4.5.0:check (report) on project myProject: Build failed to meet Clover coverage targets: The following coverage targets for null were not met: 
[ERROR] Total coverage of 0% did not meet target of 75%
[ERROR] -> [Help 1]
marek-parfianowicz commented 8 months ago

Hi! Support for Maven 4.x in the long term - absolutely, this is one of three primary build systems supported.

Having said this, this is rather unlikely to happen in this calendar year. Current plans are:

I will keep Maven 4 in mind, maybe I'll adjust the roadmap after Java 17 is done.

ottlinger commented 8 months ago

Thanks for the feedback, would you mind enabling issues on the plugin subproject over at https://github.com/openclover/clover-maven-plugin ?

marek-parfianowicz commented 8 months ago

You're welcome. Issues are enabled.