maven/its
Tamas Cservenak 0222aff6c9
[MNG-8447] Lossy ProblemCollector (#1994)
Historically (from Maven3) "problem collection" (in various scenarios, like building effective settings and toolchains, to building models) were done by passing around `List<Problem>` structure. This proved quite ineffective, as in case of (really) huge projects with quite big count of problems reported choked Maven (but also produced unusable output). We are aware of projects producing 3 million warnings! Dumping all of them onto console/log makes really no sense.

This PR changes Maven that by default it reports "problems" (settings building, toolchains building, or model building) as one liner warnings: how much and where were problems collected. This produces much more less overwhelming output than happens on master. User can control "build errors" using `-e`, so `mvn -e` will dump errors on screen/log.

The new `org.apache.maven.api.services.ProblemCollector<P>` class, that is somewhat "drop in" replacement for `List`, but with huge difference: it is "lossy", in a way, it maintains counters precisely, but actual problem instances are simply dropped after threshold `maven.builder.maxProblems` is surpassed (default 100). See `org.apache.maven.api.Constants#MAVEN_BUILDER_MAX_PROBLEMS`.

Rules:
* on problem addition counters are always updated
* if below threshold, store the problem (and will be reported later to the user)
* if above threshold, try to drop one problem with severity lower than currently reported problem, if succeeded, store the current problem, otherwise drop it

---

https://issues.apache.org/jira/browse/MNG-8447
2024-12-19 15:50:21 +01:00
..
core-it-suite [MNG-8447] Lossy ProblemCollector (#1994) 2024-12-19 15:50:21 +01:00
core-it-support [MNG-8440] Bump org.junit.jupiter:junit-jupiter from 5.11.3 to 5.11.4 (#1988) 2024-12-17 10:55:10 +01:00
environments [MNG-6377] switch from Git-WIP to Gitbox 2018-03-19 23:24:31 +01:00
src/site fix links (apt, not markdown), better split ITs vs support vs suite 2022-01-16 15:11:36 +01:00
.gitignore [MNG-8347] IT for transitive dependency management (#395) 2024-10-25 15:38:54 +02:00
README.md [MWRAPPER-14] remove wrapper-related ITs: not in core any more 2021-12-26 11:15:17 +01:00
pom.xml [MNG-8440] Bump org.junit.jupiter:junit-jupiter from 5.11.3 to 5.11.4 (#1988) 2024-12-17 10:55:10 +01:00
run-its.bat Add a note about ITs requiring maven snapshots (#314) 2023-10-19 14:42:17 +02:00
run-its.sh Add a note about ITs requiring maven snapshots (#314) 2023-10-19 14:42:17 +02:00

README.md

Maven Core Integration Tests

https://maven.apache.org/core-its/

If you want to run the integration tests against a custom build of Maven use the following command:

mvn clean install -Prun-its -Dmaven.repo.local=`pwd`/repo -DmavenDistro=/path/to/apache-maven-dist.zip

or if behind a proxy

mvn clean install -Prun-its -Dmaven.repo.local=`pwd`/repo -DmavenDistro=/path/to/apache-maven-dist.zip -Dproxy.active=true -Dproxy.type=http -Dproxy.host=... -Dproxy.port=... -Dproxy.user=... -Dproxy.pass=...

Using the script

Build Maven core with the profile -PversionlessMavenDist

Now Run the script: sh ./run-its.sh

Maven Developers List: dev@maven.apache.org