kalayciburak opened a new pull request, #12722:
URL: https://github.com/apache/maven/pull/12722

   ## Summary
   
   `importDependencyManagement` skipped every dependency with `type=bom` 
because of operator precedence:
   
   ```java
   if (!(pom && import) || bom) {
       continue;
   }
   ```
   
   For `type=bom` the `|| bom` term is always true, so BOM-typed import-scoped 
entries never load managed dependencies. Maven 4 defines `Type.BOM` (mapped to 
the `pom` extension), so these imports should be processed the same way as 
`type=pom` + `scope=import`.
   
   This change:
   - treats `(pom || bom) && import` as an import BOM/POM entry
   - allows `type=bom` in the import-scope validator message (warning only for 
other types)
   - adds a regression test that imports the existing test remote-repo BOM with 
`type=bom`
   
   Fixes #12589
   
   ## Checklist
   
   - [x] Your pull request should address just one issue, without pulling in 
other changes.
   - [x] Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   - [x] Each commit in the pull request should have a meaningful subject line 
and body.
   - [x] Write unit tests that match behavioral changes, where the tests fail 
if the changes to the runtime are not applied.
   - [x] Run `mvn verify` to make sure basic checks pass.
   - [ ] You have run the Core IT successfully.
   - [x] I hereby declare this contribution to be licenced under the Apache 
License Version 2.0, January 2004
   
   ## Test plan
   
   Executed:
   
   ```
   mvn -pl impl/maven-impl test 
-Dtest=DefaultModelBuilderTest,DefaultModelValidatorTest
   ```
   
   Result: 98 tests, 0 failures (includes new 
`testImportScopeBomTypeIsProcessed`).


-- 
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]

Reply via email to