Release notes
Maven has entered the release candidate phase and aims to be finally released in a few weeks. Please give it a try and report errors.
Upgrading from Maven 3
Maven 4 brings a tons of changes. We've tried hard to maximise compatibility with Maven 3.x, but in order to have your build work with Maven 4, you will need to upgrade some plugins (such as maven-enforcer-plugin
, maven-remote-resources-plugin
, maven-shade-plugin
, etc...) to their most recent versions.
If your build is leveraging Maven extensions, you may very well expect some breakage. Some extensions may need to be updated:
- the useful, but unmaintained,
os-maven-plugin
extension has been replaced with atnisse
extension.
Contact the extensions' developers team to know their plans regarding supporting to Maven 4.
Upgrading from Maven 4.0.0-rc-2
Important note about breaking changes: Maven 4.0.0-rc-3 includes changes in the new API that will require updates in plugin targeting the new API, especially relating to [MNG-8395] which adds a new <source>
element to the model and redirects the <sourceDirectory>
element. Plugin developers will need to update their code to work with these changes.
Change log
What's Changed
- [MNG-8437] mvnsh by @cstamas in #1982
- [MNG-8438] maven-jline: Migrate to Maven DI (off javax.inject) by @cstamas in #1987
- [MNG-8433] Use the switch expressions syntax by @CrazyHZM in #1983
- [MNG-8436] Fix wrong transfer rates displayed in console by @gnodet in #1985
- Exclude maven-xml and maven-xml-impl (the artifact has been renamed) by @gnodet in #1992
- [MNG-8446] Project cannot start due to too many warnings by @gnodet in #1993
- [MNG-8447] Lossy ProblemCollector by @cstamas in #1994
- [MNG-8454] Force the FileSizeFormat UT to US Locale by @cstamas in #2003
- [MNG-8460] Implement flush() by @cstamas in #2006
- [MNG-8463] Update plugins by @cstamas in #2005
- [MNG-8461] Initial settings method must restore context state by @cstamas in #2004
- [MNG-8465] Add support for project.rootDirectory in repositories and fix other expressions by @gnodet in #2007
- [MNG-8461] Integrate reproducer as IT by @cstamas in #2009
- [MNG-8469] Fix interpolation precedence order by @cstamas in #2011
- [MNG-8487] Completely isolate UTs by @cstamas in #2021
- MNG-8479 - Use 'ejb' not 'ejb3' as type in ReactorReader artifact resolution for compile phase by @scottkurz in #2016
- Copy edits in comments, API doc, and messages by @elharo in #2020
- Fix comparisons against null in PathSource.equals by @elharo in #2026
- [MNG-8502] Embedded executor should obey MAVEN_ARGS env variable by @cstamas in #2032
- [MNG-8475] In the loop scenario, StringBuilder is used instead of concatenation by @CrazyHZM in #2014
- [MNG-8473] Site fixes by @cstamas in #2010
- [MNG-8494] Restore Maven 3 compatibility by @gnodet in #2031
- [MNG-8482] Use instanceof assignments to get rid of casting expressions by @breun in #2018
- [MNG-8483] Prefer Objects.requireNonNull by @elharo in #2019
- [MNG-8493] 'serialVersionUID' can be annotated with '@serial' annotation by @Stellar1999 in #2034
- [MNG-8513] Be stricter about xml combination modes by @gnodet in #2038
- [MNG-8514] Improve VersionRangeResolverResult by @gnodet in #2039
- [MNG-8510] Remove Utils class from maven-di by @gnodet in #2040
- [MNG-8515] Use internal interpolator by @gnodet in #2044
- [MNG-8478] Fix formatting of timestamp in logger by @gnodet in #2046
- [MNG-8522] Deprecate maven-builder-support artifact and its classes by @gnodet in #2043
- [MNG-6113] Restore 'Maven Central Repository' name (lost with #1139) by @gnodet in #2054
- [MNGSITE-393] Remove references to Maven 2.x by @elharo in #2024
- [MNG-8512] Fix org.slf4j.simpleLogger.defaultLogLevel Configuration conflict by @CrazyHZM in #2042
- [MNG-8520] Add cache for model resolution during project building by @gnodet in #2047
- [MNG-8508] Move content of maven-impl to the org.apache.maven.impl package by @gnodet in #2060
- [MNG-8524] DefaultInterpolator should be used by injection by @CrazyHZM in #2049
- [MNG-8395] [BREAKING CHANGE] Add a element in the model. Plugins will need to be updated to work with this new API. by @desruisseaux in #1936
- [MNG-8503] Configure logging using maven.logger.* properties rather than org.slf4j.simpleLogger.* by @gnodet in #2048
- [MNG-8477] Fix problems with file activation being wrongly cached by @gnodet in #2062
- [MNG-8525] Add an integration test with Maven 4 Plugin Sample by @sparsick in #2055
- [MNG-8527] Re-enable consumer POM, trim down the consumer pom further by @gnodet in #2058
- [MNG-8544] Conflicting extensions went unnoticed by @cstamas in #2063
- [MNG-8545] Use of RemoteRepository in keys w/o equals/hashes by @cstamas in #2064
- [MNG-8523] Make sure user properties override model properties by @gnodet in #2059
- [MNG-8519] Introduce Request / Results / RequestTrace by @gnodet in #2050
- [MNG-8541] Support throwing Exception from Mojo#execute by @laeubi in #2066
- [MNG-8545] More repository handling fixes by @cstamas in #2067
- Just some details i spotted during debug by @cstamas in #2068
- [MNG-8513] Move xml combination mode validation to validator by @cstamas in #2069
- [MNG-8395] [BREAKING CHANGE] Redirect the element to by @desruisseaux in #2061
- Add javadoc to DI by @gnodet in #2072
- ProjectManager cleanup by @gnodet in #2073
- Simplify and complete method implementation by @cstamas in #2075
- [MNG-8550] Update JLine3 to 3.29.0 by @cstamas in #2074
- [MNG-8551] Improve early error reporting by @cstamas in #2076
- [MNG-8554] Fix UT suite for CLI by @cstamas in #2078
- [MNG-8555] Use plexus-sec-dispatcher 4.1.0 by @kwin in #2080
- [MNG-8241] Test comparing letters to numbers by @elharo in #2081
- [MNG-7592] String deduplication in model building by @gnodet in #2083
- [MNG-8530] Prompter fixes by @cstamas in #2086
- [MNG-8561] SourceRoot should be more lenient wrt duplicates by @gnodet in #2085
- [MNG-8563] Provide a weak cache for objects from the main model by @gnodet in #2087
- [MNG-8564] Move to maven-compat Plexus legacy by @cstamas in #2088
- Make full build upload surefire logs in case of failure. by @cstamas in #2089
- [MNG-8565] Thread leaks in maven-cli by @cstamas in #2090
- [MNG-8540] Add cache to API requests by @gnodet in #2051
- [MNG-8553] Resolver 2.0.6 by @cstamas in #2079
- [MNG-8535] Full std stream support for executor by @cstamas in #2082
- Add badge for 3.x version by @slawekjaranowski in #2094
- [MNG-8241] Handle non-BMP characters when comparing versions by @elharo in #2071
- Align Toolbox versions by @cstamas in #2096
- Fix links to Settings Descriptor Reference by @kwin in #2095
- [MNG-8573] OS Service by @cstamas in #2099
- [MNG-8517] Cleanup dependencies by @cstamas in #2098
- [MNG-8571] Sisu @priority annotation is not honoured by @gnodet in #2097
- [MNG-8562] remove "child" attributes from by @gnodet in #2101
- [MNG-8575] Replace a list with O(N²) performance by O(N) at least during iteration. by @desruisseaux in #2092
- [MNG-8558] Switch toolchain support for v4 API by @gnodet in #2084
- Dump public IPs of runners by @cstamas in #2103
- [MNG-8567] Fix resumption to not recurse into subprojects by @gnodet in #2102
- [MNG-8577] Project POM hierarchy by @cstamas in #2104
- [MNG-8579] StdOut/StdErr printstream bug by @cstamas in #2108
- [MNG-8558] Move JavaToolchain by @gnodet in #2107
- [MNG-8540] Improve cache extensibility by @gnodet in #2109
- Add PR Automation action by @slawekjaranowski in #2105
- Add Stale action by @slawekjaranowski in #2111
- [MNG-8582] Keep stdout/stderr functioning by @cstamas in #2112
- [MNGSITE-441] Characterization tests for case insensitivie version strings by @elharo in #2114
- [MNG-8586] Expose Maven version segments as properties by @cstamas in #2116
- [MNG-8587] mvnsh navigation by @cstamas in #2117
- [MNG-8580] Keep devs/contributors by @cstamas in #2122
- [MNG-8590] Make sure maven-resolver-provider does not depend on maven-impl by @gnodet in #2123
- [MNG-8591] Fix default value for plugin resolution (which has always been null) by @gnodet in #2124
- [MNG-8592] Package Sisu enabled JAR separately by @cstamas in #2125
- [MNG-8595] Bump slf4jVersion from 2.0.16 to 2.0.17 by @cstamas in #2130
- [MNG-8594] Add atFile option by @cstamas in #2131
- [MNG-8588] Add activated profiles to Project interface by @gnodet in #2132
- [MNG-8599] Generated source files should be included in the sources jars by @gnodet in #2133
- [MNG-8600] Allow Terminal and raw streams customization by @cstamas in #2134
- [MNG-8593] Bump to Resolver 2.0.7 by @cstamas in #2135
- [MNG-8601] Add type test-java-source type by @cstamas in #2136
- [MNG-8604] Use soft references for cache by @gnodet in #2138
- [MNG-8602] Fix BOM consumer pom by @gnodet in #2139
- [MNG-8605] The log file should be appended to by @gnodet in #2137
- [MNG-8610] Add javadoc for all o.a.m.api packages by @gnodet in #2142
- [MNG-8599] Fix configuration for maven-source-plugin by @slawekjaranowski in #2145
- [MNG-8611] Build with apache-release profile by @gnodet in #2146
Dependencies
- [MNG-8435] Bump net.bytebuddy:byte-buddy from 1.15.10 to 1.15.11 by @dependabot in #1984
- [MNG-8442] Bump eu.maveniverse.maven.plugins:bom-builder3 from 1.0.2 to 1.0.3 by @dependabot in #1990
- [MNG-8441] Bump org.junit:junit-bom from 5.11.3 to 5.11.4 by @dependabot in #1989
- [MNG-8440] Bump org.junit.jupiter:junit-jupiter from 5.11.3 to 5.11.4 by @dependabot in #1988
- Bump com.google.guava:guava from 33.3.1-jre to 33.4.0-jre by @dependabot in #1995
- Bump ch.qos.logback:logback-classic from 1.5.12 to 1.5.13 by @dependabot in #1999
- Bump ch.qos.logback:logback-classic from 1.5.13 to 1.5.14 by @dependabot in #2001
- Bump org.assertj:assertj-core from 3.26.3 to 3.27.0 by @dependabot in #2002
- Bump ch.qos.logback:logback-classic from 1.5.14 to 1.5.15 by @dependabot in #2008
- Bump ch.qos.logback:logback-classic from 1.5.15 to 1.5.16 by @dependabot in #2028
- Bump org.assertj:assertj-core from 3.27.0 to 3.27.2 by @dependabot in #2027
- Bump mockitoVersion from 5.14.2 to 5.15.2 by @dependabot in #2017
- Bump com.github.siom79.japicmp:japicmp-maven-plugin from 0.23.0 to 0.23.1 by @dependabot in #2035
- Bump org.assertj:assertj-core from 3.27.2 to 3.27.3 by @dependabot in #2053
- Bump net.bytebuddy:byte-buddy from 1.15.11 to 1.16.1 by @dependabot in #2052
- Bump net.bytebuddy:byte-buddy from 1.16.1 to 1.17.0 by @dependabot in #2070
- Bump org.junit:junit-bom from 5.11.4 to 5.12.0 by @dependabot in #2121
- Bump ch.qos.logback:logback-classic from 1.5.16 to 1.5.17 by @dependabot in #2128
- Bump mockitoVersion from 5.15.2 to 5.16.0 by @dependabot in #2140
- Bump net.bytebuddy:byte-buddy from 1.17.1 to 1.17.2 by @dependabot in #2141
New Contributors
- @scottkurz made their first contribution in #2016
- @breun made their first contribution in #2018
- @Stellar1999 made their first contribution in #2034
- @sparsick made their first contribution in #2055
Full Changelog: maven-4.0.0-rc-2...maven-4.0.0-rc-3