Maven Core Integration Tests Suite

This module provides the effective Core Integration Tests suite, starting with bootstrap.

Core ITs Suite Results

ITs results are displayed on the console and can be published in the site through Surefire Report.

mvn -Preporting site

Currently deployed Surefire Report was generated with following environment:

maven.version: 4.0.0-alpha-1-SNAPSHOT
java.version: 1.8.0_202
os.name: Linux
os.version: 5.4.0-94-generic

Core ITs Suite and Dependencies (incl. Plugins)

A good IT does not depend on external repos like Central, it uses dedicated test plugins and test repositories. The default settings.xml used by ITs helps to enforce this by pointing central at file:target/null, which obviously can't resolve anything. This setup using a file-based dummy repo also helps execution time, because this repo produces (expected) 404s much faster than a HTTP-based repo.

The one place where access to Central is desired is in the MavenITBootstrapTest (src, javadoc), which doesn't really test anything but just primes the local repo with any artifacts the ITs will need: you can see here the list of plugins and artifacts that are fetched during bootstrap.

So some care needs to be taken when introducing new dependencies into the ITs themselves or the support plugins. Many times the failures that we encounter are discrepancies between actual artifact consumption required and what is populated during bootstrapping. When forgetting, typical failures (as seen in ASF CI) will give following traces in log:

[ERROR] testit(org.apache.maven.it.MavenITmng...)  Time elapsed: 0.145 s  <<< ERROR!
...
[ERROR] Failed to execute goal ... (...) on project ...: ... Could not find artifact ... in central (file:target/null) -> [Help 1]

Using Local Repository Manager

If you are using a local repository manager, configured in your ~/.m2/settings.xml as a mirror of central, it will invalidate previous setup: working Core ITs Suite can work on your laptop but fail on ASF CI because of missing artifact.

Comment out your mirror configuration to enable the expected local failure, then be able to debug and fix the issue.