Some plugins, e.g., cobertura-maven-plugin, use ${plugin.artifacts}
to setup classpath of externally launched jvms and they expect slf4j
to be available among plugin dependencies. At the same time slf4j
is already part of maven core runtime and it needs to be filtered
out from plugin and build extension realms to avoid duplicate classes
on classpath.
The fix is to move core artifact filtering from plugin dependency
resolver to class realm manager. This way ${plugin.artifacts} still
includes all compile/runtime scoped plugin dependencies but runtime
classpath only has plugin unique artifacts.
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
An incorrect non-blank module is currently treated as an error. Behave
the same way for a blank module, rather than simply warning about
the mistake.
Signed-off-by: Jason van Zyl <jason@tesla.io>
As part of deprecating the M2_HOME environment variable (MNGSITE-223),
change the bootstrapping instructions so that it's no longer used.
Signed-off-by: Jason van Zyl <jason@tesla.io>
read ${maven.projectBasedir}/.mvn/extensions.xml and create core
extensions realms during maven runtime bootstrap. this required
short-lived bootstrap plexus container to resolve extensions.
individual extensions realms are wired to maven.ext realm according
to META-INF/maven/extension.xml exported packages specification
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
javax.inject.* and org.slf4j.* packages were already exported, but
corresponding artifacts were not. this resulted in same classes
present in multiple classlaoders and caused hard-to-troubleshoot
build failures in some cases.
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
this is mostly to help integration tests reuse the same realm ids,
but plugging resource leaks is generally a good thing.
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
changed mvnDebug and mvnyjp to delegate to the main mvn script
to do the actual work. this eliminated all code duplication
among the three scripts.
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
I will try and collect all deprecated code at the bottom of classes with Munge markers and
use this in conjunction with a definitive list of classes to be purged in order to use
one code line to safely experiment with Maven 4.x.