Releases · apache/maven (original) (raw)
Notes
This new release candidate of Maven 4 is released to get feedback from users.
Maven 4 has a restrained a few things comparent to Maven 3, so make sure to run the mvnup tool before trying to project with Maven 4.
Bean configuration bug
A bug has been found in the bean configuration system where field accessibility state is cached globally. This can cause plugin configuration injection to fail when the same configuration field is accessed multiple times or in different contexts during a build. This particularly affects the plugin unit tests.
This will be fixed by #11433 in the next release.
Concurrency issue in the v4 API
A concurrency issue has been found in the Maven 4 API (still in preview mode) and will be fixed by #11428 in the next release.
BOM packaging
Another bug has been found in how BOM projects are processed. When a project uses BOM packaging, the consumer POM is not being properly converted to standard POM packaging, and dependency versions could be lost in some cases.
This will be fixed by #11427 in the next release.
macOS: JLine native library may be blocked by Gatekeeper on first use
On macOS (especially Apple Silicon), the first invocation of mvn may fail to load the JLine native terminal library with an error such as:
java.lang.UnsatisfiedLinkError: .../libjline-native/Mac/arm64/libjlinenative.jnilib: dlopen(...): code signature ... not valid for use in process: library load disallowed by system policy
This occurs when the binary distribution is downloaded via a web browser, which applies the com.apple.quarantine extended attribute.
Workaround (one-time fix):
xattr -r -d com.apple.quarantine /path/to/apache-maven-4.0.0-rc-5/lib/jline-native
Recommended download method (avoids the issue entirely):
curl -L -O https://archive.apache.org/dist/maven/maven-4/4.0.0-rc-5/binaries/apache-maven-4.0.0-rc-5-bin.tar.gz tar -xzf apache-maven-4.0.0-rc-5-bin.tar.gz
This is a known issue #10747 and will be addressed in a future release.
💥 Breaking changes
🚀 New features and improvements
- Disable consumer POM flattening by default and add an opt-in feature (#11347) (#11370) @gnodet
- Make config files use UTF8 (#11263) (#11265) @cstamas
- Simplify prefix resolution (#11072) (#11073) @cstamas
- Add PathMatcherFactory.includesAll() (#11008) @desruisseaux
- Add skipMavenRc to ExecutorRequest and use it in ITs (#10944) @slawekjaranowski
- Add PathMatcherFactory service with directory filtering optimization (#10923) (#10926) @gnodet
- Allow configurable repository selection for version range resolution (backport) (#10890) @cstamas
- Switch resolver to use rwlock-local locks (#2546) (#2555) @gnodet
🐛 Bug Fixes
- Fix resource targetPath resolution to be relative to output directory (fixes #11381) (#11394) (#11406) @gnodet
- Fix MavenStaxReader location reporting for properties (#11402) (#11404) @gnodet
- Fix false parent cycle detection with flatten-maven-plugin (#11400) @gnodet
- Resolve property before model reflection to avoid recursion (#11385, fixes #11384) (#11390) @gnodet
- Explicitly register jdk ToolchainFactory for Maven 3 plugins (#11318) (#11369) @gnodet
- Fix -itr option not honored (#11359) (#11361) @gnodet
- Do not include invalid transitive repositories (#11357) (#11362) @gnodet
- Prevent infinite loop in RootLocator when .mvn directory exists in subdirectory (fixes #11321) (#11323) (#11350) @gnodet
- Fix [unknown project] messages in error output (#11324) (#11349) @gnodet
- Restore compatibility in maven-embedder (#11320) (#11340) @gnodet
- Add backward compatibility dependencies to maven-compat (#11301) (#11339) @gnodet
- Relative are resolved against the wrong directory (#11325) @desruisseaux
- Bug: when raw-streams are used, ensure system streams are set up (#11303) (#11310) @cstamas
- Fix plugin prefix resolution when metadata is not available from repository (#11287) (#11288) @gnodet
- Maven model 4.1.0 should not allow non-pom packaging for aggregators (#11279) (#11285) @gnodet
- Fix exception caused by duplicate dependencies in consumer pom (#11283) (#11286) @gnodet
- Remove use of toRealPath (#11250) (#11257) @cstamas
- Bugfix: fix CLI graceful death (#11239) (#11246) @cstamas
- Introduce RepositoryAwareRequest interface to consolidate repository handling (#11238) (#11244) @gnodet
- Fix repository ID interpolation in Maven 4 (#11224) (#11241) @gnodet
- Fix dependency groupId inference for Maven 4.1.0 model version (#11228) (#11240) @gnodet
- Consumer POM should keep only transitive dependencies, fixes #11162 (#11163) (#11235) @gnodet
- Fix StackOverflowError in parent POM resolution (backport #11106) (#11234) @gnodet
- Fix CI-friendly version processing with profile properties (fix #11196) (#11225) @gnodet
- Add phase upgrade support for Maven 4.1.0 model upgrades (#11226) @gnodet
- Fix GH-11199: Maven 4.0.0-rc-4 ignores defaultLogLevel (#11227) @gnodet
- Validate metaversions and detect extension conflicts (fixes #11181) (#11216) @cstamas
- Allow repository URL interpolation with improved validation (#11140) (#11210) @gnodet
- Improve mvn usage message (#11211) (#11213) @gnodet
- Enable the search for
module-info.classfile in theMETA-INF/versions/sub-directories of a JAR file. (#11153) (#11206) @gnodet - Fix #10939: DefaultModelXmlFactory: make location tracking opt-in—disabled by def… (#11092) @arturobernalg
- Fix #11000: fix help default text (#11099) @arturobernalg
- GH-10210: fix too eager decrypt of legacy passwords (#11138) (#11158) @cstamas
- #11055: Inject all services into mojos and enable easy real-session mojo testing (#11103) (#11139) @gnodet
- Fix ReactorReader to prefer consumer POMs over build POMs (#11107) (#11131) @gnodet
- model-builder: simplify subproject auto-discovery decision (#11124) (#11132) @gnodet
- Add missing equals and hashCode methods in modular Java path type. (#11130) @desruisseaux
- fix: include extension in equals/hashCode of DefaultArtifactCoordinates (#11101) @arturobernalg
- Fix #11127: enforce non-null keys for InputLocation lookups and document behavior (#11128) @gnodet
- Bug: bad cache isolation between two sessions (#11083) (#11085) @cstamas
- Fix targetPath parameter ignored in resource bundles (fixes #11062) (#11063) (#11080) @gnodet
- Maven Upgrade Tool: remove unused --force and --yes options (Fixes #11001) (#11066) (#11079) @gnodet
- Fix XMLReader#getURL and enable the unit test (#11069) (#11078) @gnodet
- [#11048] Fix race condition in MessageUtils (#11049) (#11077) @gnodet
- Uninterpolated repositories from parent POMs during model building (backport) (#11039) @cstamas
- Fix maven.mainClass property missing for external tools (#10998) (#11007) @gnodet
- Set Guice class loading to CHILD - avoid using terminally deprecated methods (#11002) @slawekjaranowski
- Avoid parsing MAVEN_OPTS (master/4.x) (#10970) (#10993) @gnodet
- Port the bug fixes identified when using that class in Maven clean and compiler plugin (#10935) ([#10936](https:...