gnodet-bot commented on code in PR #13601:
URL: https://github.com/apache/maven/pull/13601#discussion_r4308670937
##########
api/maven-api-core/src/main/java/org/apache/maven/api/services/ModelBuilderRequest.java:
##########
@@ -93,6 +93,15 @@ enum RepositoryMerging {
@Nonnull
RequestType getRequestType();
+ /**
Review Comment:
💡 Missing blank line between `getRequestType()` and the Javadoc for
`getValidationLevel()`. Every other method in this interface has a blank
separator before its Javadoc block.
```suggestion
RequestType getRequestType();
/**
```
##########
impl/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java:
##########
@@ -466,19 +466,24 @@ void prepare() throws ProjectBuildingException {
&&
source.getLocation().endsWith("/org/apache/maven/project/standalone.xml");
ModelBuilderRequest.ModelBuilderRequestBuilder builder =
getModelBuildingRequest();
- ModelBuilderRequest.RequestType type = reactorMember
- || isStandalone
- || (pomFile != null
- && request.isProcessPlugins()
- && request.getValidationLevel()
- ==
ModelBuildingRequest.VALIDATION_LEVEL_STRICT)
+ ModelBuilderRequest.RequestType type = reactorMember ||
isStandalone || pomFile != null
? ModelBuilderRequest.RequestType.BUILD_EFFECTIVE
: (parent
?
ModelBuilderRequest.RequestType.CONSUMER_PARENT
Review Comment:
⚠️ **Behavioral regression:** `pomFile != null` is too broad. The
`isProcessPlugins()` guard was removed along with the validation-level
condition, but only the latter was made redundant by this PR.
Embedders calling `build(File, request)` with `processPlugins=false` now get
`BUILD_EFFECTIVE` instead of `CONSUMER_PARENT`/`CONSUMER_DEPENDENCY`. This
changes XML parsing strictness, parent resolution, and repository merging —
beyond the scope of the validation-level fix.
```suggestion
ModelBuilderRequest.RequestType type = reactorMember ||
isStandalone || (pomFile != null && request.isProcessPlugins())
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]