slachiewicz opened a new issue, #497: URL: https://github.com/apache/maven-install-plugin/issues/497
## Why The 4.x line has roughly 27 integration-test directories, 33 `verify.groovy` scripts and only three unit-test classes. Many of those ITs only check parameter validation or whether a file appears in a temporary local repository; they pay the cost of a forked Maven build without testing anything a mojo unit test cannot see. The project already has JUnit 5, Mockito and the Maven 4 `SessionMock`/`ProjectStub` harness in `src/test`, so the moved checks can run in-process. This is a quality change, not a speed promise. Removing ITs from other Maven plugins has produced clearer failures without a measurable CI-time reduction, so the measure of success is that every assertion survives and fails for the right reason. ## Baseline (measured 2026-11-21, `maven-install-plugin-4.x`) - ~27 IT directories, 24 `invoker.properties`, 33 `verify.groovy` - 3 unit-test classes (`InstallFileMojoTest`, `InstallMojoTest`, `InstallMojoPomPackagingTest`) - Job-minute baseline: not yet measured; to be added here before the last PR ## First slice — move to unit tests - `gav-validation` — incomplete/invalid artifact coordinates, error text - `no-main-artifact-1`, `no-main-artifact-2` — missing main artifact, failure message - `skip-install` — `skip` leaves no installed files - `generate-pom-auto-1`, `generate-pom-auto-2` — generated POM present/absent and not overwritten - `attach-jar-checksum`, `pom-checksum` — checksum files present and absent as configured - `local-repo-override-with-checksum`, `local-repo-override-with-checksum-generatePom` — checksum behaviour with an overridden local repository Each IT's assertions will be reproduced with JUnit 5 (`@Test`, no JUnit 4, no vintage engine, no Hamcrest) using a temp local repository and an `ArtifactInstaller` spy (the pattern already used in `InstallFileMojoTest`), then the IT directory removed. A deliberate inversion of each new assertion must fail before the PR is ready. ## Keep as ITs `install-at-end-*`, `MINSTALL-98` and `MINSTALL-205` (`-T2`), `non-default-pom` (`-f`), `MINSTALL-52`/`-87` (CLI `install-file`), `MINSTALL-99` (per-project config), and the `setup-*` support projects. These test reactor, forked-build or Maven-version behaviour. ## Later - Convert remaining `verify.groovy` throw/return scripts to `assert` form. - Measure a CI baseline and re-measure after the slice. - Document the unit-test/IT split so the next contributor keeps it. ## Checklist - [ ] Measure job-minute baseline - [ ] First slice: 10 ITs to JUnit 5 unit tests (draft PR, linked here) - [ ] Mutation check each new assertion - [ ] Re-measure and record before/after here - [ ] Document the split -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
