Skip to content

Commit 211e27a

Browse files
committed
[MNG-5102] Add support for POM mixins
1 parent adc13ea commit 211e27a

File tree

5 files changed

+158
-95
lines changed

5 files changed

+158
-95
lines changed

api/maven-api-model/src/main/mdo/maven.mdo

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,20 @@
113113
</association>
114114
</field>
115115

116+
<!-- ====================================================================== -->
117+
<!-- Mixins -->
118+
<!-- ====================================================================== -->
119+
120+
<field xdoc.separator="blank">
121+
<name>mixins</name>
122+
<version>4.1.0+</version>
123+
<description>Mixins...</description>
124+
<association>
125+
<type>Parent</type>
126+
<multiplicity>*</multiplicity>
127+
</association>
128+
</field>
129+
116130
<!-- ====================================================================== -->
117131
<!-- groupId/artifactId/Version/Packaging -->
118132
<!-- ====================================================================== -->

maven-core/src/main/java/org/apache/maven/internal/transformation/ConsumerPomArtifactTransformer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ static void transform(Model model, Path dest) {
236236
.downgradeModelVersion(false)
237237
.root(false)
238238
.parent(null)
239+
.mixins(null)
239240
.build(null),
240241
model);
241242
if (isBom) {

maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ public Model merge(Model target, Model source) {
9797
targetBuild = Build.newInstance();
9898
}
9999

100-
Map<Object, Object> context = Collections.singletonMap(
101-
PLUGIN_MANAGEMENT, target.getBuild().getPluginManagement());
100+
Map<Object, Object> context =
101+
Collections.singletonMap(PLUGIN_MANAGEMENT, targetBuild.getPluginManagement());
102102

103-
Build.Builder builder = Build.newBuilder(target.getBuild());
103+
Build.Builder builder = Build.newBuilder(targetBuild);
104104
mergePluginContainer_Plugins(builder, targetBuild, source.getBuild(), false, context);
105105

106106
return target.withBuild(builder.build());

0 commit comments

Comments
 (0)