Prerequisites
1. Install tools. Mandatory tools are:
- JDK 17
- Ant 1.10 (or higher)
- Maven 3.8 (or higher)
- Git
IntelliJ IDEA and Eclipse itself do not need to be installed manually: the
clover-idea module is built with the IntelliJ Platform Gradle plugin, which
downloads the IDEA platform versions it needs automatically, and clover-eclipse-libs
downloads the required Eclipse binaries from the Eclipse archive during the build.
2. Check out main Clover repository:
git clone ssh://git@github.com/openclover/clover.git
3. Prepare repacked third party libraries:
# cd clover
mvn install -Pworkspace-setup -f clover-core-libs/pom.xml
mvn install -Pworkspace-setup -f clover-eclipse-libs/pom.xml
4. Download and install the KTreeMap fork:
PACKAGES_ATLASSIAN_COM=https://packages.atlassian.com/mvn/maven-atlassian-external/
KTREEMAP_PATH=net/sf/jtreemap/ktreemap/1.1.0-atlassian-01
wget $PACKAGES_ATLASSIAN_COM/$KTREEMAP_PATH/ktreemap-1.1.0-atlassian-01.jar
wget $PACKAGES_ATLASSIAN_COM/$KTREEMAP_PATH/ktreemap-1.1.0-atlassian-01.pom
mvn install:install-file -Dfile=ktreemap-1.1.0-atlassian-01.jar -DpomFile=ktreemap-1.1.0-atlassian-01.pom
Alternatively, add https://packages.atlassian.com/mvn/maven-atlassian-external
as a repository in your Maven settings.xml instead of downloading the JAR manually.
Build and test
Building from a command line
To compile everything and run all tests:
mvn test
To install all modules locally, without running tests:
mvn install -DskipTests=true
To run tests for the three main modules only:
mvn test -pl clover-ant,clover-core,clover-groovy
To learn about other targets available see Build system.
Building Clover from IntelliJ IDEA
- Complete the prerequisite steps above first (repacked libraries, KTreeMap), then open the
root
pom.xmlin IDEA as a Maven project. There is no separate SDK or library wiring to configure. - The
clover-ideamodule is a separate Gradle project (seeclover-idea/build.gradle.kts); open it independently if you need to work on the IDEA plugin itself — the IntelliJ Platform Gradle plugin fetches the IDEA platform versions declared there automatically.
Release and publish
Releases are driven by two GitHub Actions workflows, not by manual Ant/Maven commands:
- C Prepare release — bumps
pom.xml/Gradle versions (includingclover-idea/gradle.propertiesand the Eclipse feature version), commits, and creates theopenclover-<version>tag. - D Release OpenClover — checks out that tag, prepares third party
libraries, builds and signs artifacts, runs
mvn deployto publish Clover Core to Maven Central (OSSRH), and uploads the non-Maven artifacts (Clover-for-Ant ZIP, Clover-for-IDEA JAR, Clover-for-Eclipse update site ZIP) to openclover.org.
Both are triggered manually via workflow_dispatch from the GitHub Actions tab.
Artefacts end up in:
- Clover-for-Ant - clover-ant-zip/target/clover-ant-*.zip
- Clover-for-Eclipse - clover-eclipse/org.openclover.eclipse.updatesite/target/clover-eclipse-site-*.zip
- Clover-for-IDEA - clover-idea/build/dist/clover-idea-*.jar