[maven-4.0.x] Backport bug fixes from master to maven-4.0.x#12091
Merged
gnodet merged 5 commits intoMay 19, 2026
Conversation
…che#10921) Port apache#10899 to master, using Session.getMavenVersion() instead of reading properties file. - Modified validateModelVersion() to accept Session parameter and include Maven version in error messages - Updated error messages to be single-line and consistent with Maven's style - Enhanced error messages show which Maven version is rejecting the model version - Added test coverage to verify Maven version is included in error messages This helps users (especially IDE users like NetBeans) understand version compatibility issues more clearly.
… reporting (apache#10975) * Refactor ProjectBuildingException constructors for improved clarity * Add unit tests for ProjectBuildingException message generation * Refactor ProjectBuildingException for improved clarity and maintainability * Add unit tests for ProjectBuildingException to enhance message validation * style: Apply Spotless formatting * Refactor createMessage method to improve error counting logic in ProjectBuildingException * Refactor ProjectBuildingException for improved clarity and maintainability * Refactor createMessage method to streamline error message formattingRefactor createMessage method to streamline error message formatting * Refactor:Spotless formating
…pache#10991) - Enhance error message when 'import' scope is used incorrectly in regular dependencies - Provide clear guidance that 'import' scope is only valid in <dependencyManagement> sections - Replace generic error message with context-aware validation - Update both Maven 3 (compat) and Maven 4 (impl) implementations for consistency - Update tests to verify the improved error messages - Fix grammar in comments (don't -> not) - Apply spotless formatting Before: 'dependencies.dependency.scope' must be one of [provided, compile, runtime, test, system] but is 'import'. After: 'dependencies.dependency.scope' has scope 'import'. The 'import' scope is only valid in <dependencyManagement> sections. This addresses the confusion reported in faktorips/faktorips.base#70 where users receive misleading error messages that suggest 'import' scope is never valid, when it's actually valid in dependency management sections with type=pom.
…; keep CycleDetectedException as cause. (apache#11091) Non-cycle model problems still use ProjectBuildingException(results). Remove misleading comment about projectId/pomFile.
e2e8f65 to
31b9d08
Compare
rmannibucau
approved these changes
May 19, 2026
|
@gnodet Please assign appropriate label to PR according to the type of change. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backport 5 bug fixes from master that are applicable to the maven-4.0.x branch:
CycleDetectedExceptioninProjectBuildingExceptioninstead ofRuntimeException, providing meaningful error output.OrderedProperties.clear()now also clears thekeyOrderlist to prevent inconsistent state.Test plan
mvn install -pl impl/maven-impl,impl/maven-core -DskipTests -am)mvn test -pl impl/maven-impl,impl/maven-core— 0 failures, 0 errors)Claude Code on behalf of Guillaume Nodet