Maven: Apache Maven是一个开源的项目管理和构建工具,主要用于Java项目。适合需要自动化项目构建和依赖管理的开发者。特点包括约定优于配置、易于使用和社区驱动。
最近提交(Master分支:1 个月前 )
405e2e10
The root cause was that ModelBuilderResult.getActivePomProfiles()
returned all active profiles as a flat list without tracking which
model each profile came from.
This commit:
- Adds getActivePomProfiles(String modelId) and
getActivePomProfilesByModel() methods to ModelBuilderResult API
to track profiles per model like Maven 3 did
- Updates DefaultModelBuilder to track model IDs when adding profiles,
using ModelProblemUtils.toId() to get groupId:artifactId:version
format (without packaging) to match Maven 3 behavior
- Updates DefaultProjectBuilder to use the new per-model profile
tracking API to correctly set injected profile IDs
- Adds integration test MavenITgh11409ProfileSourceTest to verify
the fix and prevent regression
Profile sources now correctly show groupId:artifactId:version format,
matching Maven 3 behavior.
Fixes #11409
18 小时前
7d6fd870
This commit addresses two issues with BOM (Bill of Materials) handling in consumer POMs:
1. BOM packaging not transformed to POM in consumer POMs:
When a project uses packaging=bom, the consumer POM was incorrectly
retaining this packaging type. Since 'bom' is not a valid packaging
type in Maven 4.0.0 model, this caused errors when the consumer POM
was used. The fix ensures that BOM packaging is always transformed
to 'pom' in consumer POMs, regardless of whether flattening is enabled.
2. Dependency versions preserved in dependencyManagement:
The effective model already contains resolved versions for dependencies
in dependencyManagement sections. The fix ensures these versions are
properly preserved in the consumer POM for both flattened and
non-flattened BOMs.
Changes:
- Modified DefaultConsumerPomBuilder.build() to detect BOMs based on
original packaging and handle them appropriately
- Added buildBomWithoutFlatten() method to handle BOMs when flattening
is disabled, using the raw model but still transforming packaging
- Added integration test to verify both issues are fixed
Fixes issues reported in:
https://lists.apache.org/thread/41q40v598pd8mr32lmgwdfb2xm7lzm6l 19 小时前
所有评论(0)