Repository navigation
Description
The integration tests of the Maven plugins pull real third-party artifacts from Maven Central that most of them never execute. Each CI matrix job starts the ITs with an empty target/local-repo, so those artifacts are requested again in every job, and that is where many of the HTTP 429 failures from Central come from. The same fixture POMs carried 61 of the 254 open Dependabot alerts in the apache/maven-* repositories, and Dependabot security updates against them break the ITs (for example apache/maven-jdeps-plugin#124 and apache/maven-javadoc-plugin#1461).
A review of the 44 repositories with src/it (1,972 IT POMs) sorts the fixtures by how they use the artifact:
- Unused, or replaceable by the build's own version. The dependency is never imported, or a literal version differs from one the build already resolves (
maven-core3.9.12 against@mavenVersion@,commons-lang33.18.0 against the build's 3.22.0). Fix: drop it, or filter the build's version in. - Read only. The verify script asserts a file name, a manifest
Class-Path, a dependency tree or a log line, never the content. Fix: a stand-in artifact in the repository's IT repository, or a small, rarely released library without advisories. - Executed. The test runs or compiles against the artifact (javadoc automatic modules, compiler automodules, shade
jna, site skins and Doxia). These stay; plugins the site ITs execute are cached throughextraArtifacts, and a Dependabot entry for/src/it/**keeps security updates off them (trial: Keep Dependabot out of the IT projects maven-jdeps-plugin#125).
The pull requests below remove 40 of the 61 fixture alerts. Measured Central downloads, fresh local repository: maven-assembly-plugin's changed ITs 475 → 53, maven-invoker-plugin's 8 changed ITs 191 → 46, maven-reporting-exec forked-lifecycle 248 → 22, maven-xinclude-extension 144 → 4. Two fixtures had checks that could never fail (maven-ear-plugin packaging-includes and packaging-excludes); those are fixed too.
The invoker aether.remoteRepositoryFilter.prefixes.basedir property, which stops every IT from fetching Central's prefixes file again, is apache/maven-parent#652.
Left for later: maven-compiler-plugin's commons-io and commons-lang3 pins in MCOMPILER-203-processorpath and jpms_compile-main-foo-test-foo, maven-jlink-plugin MJLINK-4 (needs a stand-in jar the plugin treats as a named module), and maven-assembly-plugin depSet-enum-vs-wildcard, which compares real jar contents.
Pull requests:
- Replace commons-lang in ITs with a mock artifact and fix stale packaging checks maven-ear-plugin#594
- Replace struts-core, servlet-api and commons-logging in ITs with mock artifacts maven-war-plugin#696
- Drop commons-lang and slf4j-log4j12 from the MJAR-82 IT maven-jar-plugin#661
- Replace junit in the manifest-content IT with a mock artifact maven-ejb-plugin#263
- Replace the dependencies IT libraries with mock artifacts maven-rar-plugin#195
- Replace real dependency graphs with mocks in two ITs maven-shade-plugin#908
- Use cached and advisory-free libraries in two ITs maven-jdeps-plugin#126
- Follow the build's plexus-utils version in the custom toolchain IT maven-toolchains-plugin#221
- Assert filtered values in verify.groovy in the MRESOURCES-18 IT maven-resources-plugin#583
- Read IT dependencies from the main local repository maven-xinclude-extension#55
- Serve IT leaf dependencies from a mock repository maven-dependency-tree#171
- Resolve the LATEST range IT dependency from a mock repository maven-artifact-plugin#294
- Follow the build's Maven version in the web-application IT maven-dependency-analyzer#352
- Follow the build's Ant version in the custom-task-test IT maven-antrun-plugin#410
- Drop unused junit-jupiter-api from IT fixtures maven-compiler-plugin#1223
- Drop unused commons-math from the MPMD-323 IT maven-pmd-plugin#796
- Follow the build's commons-lang3 version in module-info ITs maven-javadoc-plugin#1464
- Drop the unused junit dependency from the skin ITs maven-fluido-skin#399
- Serve the full-pom and MPIR-412 dependencies from the mock repository maven-project-info-reports-plugin#707
- Use the build's plugin and test library versions in invoker ITs maven-invoker-plugin#822
- Serve read-only IT dependencies from a mock repository maven-assembly-plugin#1430
- Serve the go-offline fixture artifacts from the mock repository maven-dependency-plugin#1824
- Resolve the generate-from-bundle dependency from the cached repository maven-remote-resources-plugin#359
- Install the plugins the site ITs resolve most from the cached repository maven-site-plugin#1371
- Install the plugins the ITs execute from the cached repository maven-reporting-exec#202
Activity