Repository navigation
Deprecate old project builder API in favor of new API - #10990
Merged
Merged
Conversation
- Add @deprecated(since = \4.0.0\) annotations to all project builder related classes - Add deprecation messages pointing to org.apache.maven.api.services.ProjectBuilder - Follows same pattern used for model builder API deprecation - Resolves inconsistency where ProjectBuildingResult exposed deprecated ModelProblem Deprecated classes: - ProjectBuilder and DefaultProjectBuilder - ProjectBuildingRequest and DefaultProjectBuildingRequest - ProjectBuildingResult and DefaultProjectBuildingResult - ProjectBuildingException - DependencyResolutionRequest and DefaultDependencyResolutionRequest - DependencyResolutionResult and DefaultDependencyResolutionResult - DependencyResolutionException - ProjectDependenciesResolver and DefaultProjectDependenciesResolver Fixes apache#10984
elharo
approved these changes
Jul 23, 2025
gnodet
added a commit
to gnodet/maven
that referenced
this pull request
Jul 24, 2025
- Add @deprecated(since = \4.0.0\) annotations to all project builder related classes - Add deprecation messages pointing to org.apache.maven.api.services.ProjectBuilder - Follows same pattern used for model builder API deprecation - Resolves inconsistency where ProjectBuildingResult exposed deprecated ModelProblem Deprecated classes: - ProjectBuilder and DefaultProjectBuilder - ProjectBuildingRequest and DefaultProjectBuildingRequest - ProjectBuildingResult and DefaultProjectBuildingResult - ProjectBuildingException - DependencyResolutionRequest and DefaultDependencyResolutionRequest - DependencyResolutionResult and DefaultDependencyResolutionResult - DependencyResolutionException - ProjectDependenciesResolver and DefaultProjectDependenciesResolver Fixes apache#10984
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.
Description
Deprecates the old project builder API in favor of the new
org.apache.maven.api.services.ProjectBuilderAPI, following the same pattern used for the model builder API deprecation.Background
This addresses the issue mentioned in #10984 where
ProjectBuildingResultexposesModelProblemfrom the deprecated model builder API, creating an inconsistency sinceModelProblemis deprecated butProjectBuildingResultwas not.Changes Made
@Deprecated(since = "4.0.0")annotations to all project builder related classes and interfacesorg.apache.maven.api.services.ProjectBuilderDeprecated Classes:
Core Project Builder API:
ProjectBuilder- Main interfaceProjectBuildingRequest- Request interfaceProjectBuildingResult- Result interfaceProjectBuildingException- Exception classDefault Implementations:
DefaultProjectBuilder- Default implementationDefaultProjectBuildingRequest- Default request implementationDefaultProjectBuildingResult- Default result implementationDependency Resolution API:
DependencyResolutionRequest- Request interfaceDependencyResolutionResult- Result interfaceDependencyResolutionException- Exception classProjectDependenciesResolver- Resolver interfaceDefaultDependencyResolutionRequest- Default request implementationDefaultDependencyResolutionResult- Default result implementationDefaultProjectDependenciesResolver- Default resolver implementationTesting
Migration Path
All deprecated classes now clearly point developers to use
org.apache.maven.api.services.ProjectBuilderinstead, providing a clear migration path to the new API.Consistency Achieved
This resolves the inconsistency where
ProjectBuildingResultwas exposing the deprecatedModelProblemclass but wasn't itself deprecated. Now there's complete consistency between the deprecation status of the old model builder API and the old project builder API.Fixes #10984
Pull Request opened by Augment Code with guidance from the PR author