1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.internal.impl.model;
20
21 import java.util.Iterator;
22 import java.util.Map;
23 import java.util.stream.Collectors;
24
25 import org.apache.maven.api.model.Build;
26 import org.apache.maven.api.model.BuildBase;
27 import org.apache.maven.api.model.CiManagement;
28 import org.apache.maven.api.model.Dependency;
29 import org.apache.maven.api.model.DependencyManagement;
30 import org.apache.maven.api.model.Model;
31 import org.apache.maven.api.model.ModelBase;
32 import org.apache.maven.api.model.Plugin;
33 import org.apache.maven.api.model.PluginContainer;
34 import org.apache.maven.api.model.Profile;
35 import org.apache.maven.api.model.ReportPlugin;
36 import org.apache.maven.api.model.Reporting;
37 import org.apache.maven.model.v4.MavenMerger;
38
39
40
41
42
43
44
45 class FileToRawModelMerger extends MavenMerger {
46
47 @Override
48 protected void mergeBuild_Extensions(
49 Build.Builder builder, Build target, Build source, boolean sourceDominant, Map<Object, Object> context) {
50
51 }
52
53 @Override
54 protected void mergeBuildBase_Resources(
55 BuildBase.Builder builder,
56 BuildBase target,
57 BuildBase source,
58 boolean sourceDominant,
59 Map<Object, Object> context) {
60
61 }
62
63 @Override
64 protected void mergeBuildBase_TestResources(
65 BuildBase.Builder builder,
66 BuildBase target,
67 BuildBase source,
68 boolean sourceDominant,
69 Map<Object, Object> context) {
70
71 }
72
73 @Override
74 protected void mergeCiManagement_Notifiers(
75 CiManagement.Builder builder,
76 CiManagement target,
77 CiManagement source,
78 boolean sourceDominant,
79 Map<Object, Object> context) {
80
81 }
82
83 @Override
84 protected void mergeDependencyManagement_Dependencies(
85 DependencyManagement.Builder builder,
86 DependencyManagement target,
87 DependencyManagement source,
88 boolean sourceDominant,
89 Map<Object, Object> context) {
90 Iterator<Dependency> sourceIterator = source.getDependencies().iterator();
91 builder.dependencies(target.getDependencies().stream()
92 .map(d -> mergeDependency(d, sourceIterator.next(), sourceDominant, context))
93 .collect(Collectors.toList()));
94 }
95
96 @Override
97 protected void mergeDependency_Exclusions(
98 Dependency.Builder builder,
99 Dependency target,
100 Dependency source,
101 boolean sourceDominant,
102 Map<Object, Object> context) {
103
104 }
105
106 @Override
107 protected void mergeModel_Contributors(
108 Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) {
109
110 }
111
112 @Override
113 protected void mergeModel_Developers(
114 Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) {
115
116 }
117
118 @Override
119 protected void mergeModel_Licenses(
120 Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) {
121
122 }
123
124 @Override
125 protected void mergeModel_MailingLists(
126 Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) {
127
128 }
129
130 @Override
131 protected void mergeModel_Profiles(
132 Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) {
133 Iterator<Profile> sourceIterator = source.getProfiles().iterator();
134 builder.profiles(target.getProfiles().stream()
135 .map(d -> mergeProfile(d, sourceIterator.next(), sourceDominant, context))
136 .collect(Collectors.toList()));
137 }
138
139 @Override
140 protected void mergeModelBase_Dependencies(
141 ModelBase.Builder builder,
142 ModelBase target,
143 ModelBase source,
144 boolean sourceDominant,
145 Map<Object, Object> context) {
146 Iterator<Dependency> sourceIterator = source.getDependencies().iterator();
147 builder.dependencies(target.getDependencies().stream()
148 .map(d -> mergeDependency(d, sourceIterator.next(), sourceDominant, context))
149 .collect(Collectors.toList()));
150 }
151
152 @Override
153 protected void mergeModelBase_PluginRepositories(
154 ModelBase.Builder builder,
155 ModelBase target,
156 ModelBase source,
157 boolean sourceDominant,
158 Map<Object, Object> context) {
159 builder.pluginRepositories(source.getPluginRepositories());
160 }
161
162 @Override
163 protected void mergeModelBase_Repositories(
164 ModelBase.Builder builder,
165 ModelBase target,
166 ModelBase source,
167 boolean sourceDominant,
168 Map<Object, Object> context) {
169
170 }
171
172 @Override
173 protected void mergePlugin_Dependencies(
174 Plugin.Builder builder, Plugin target, Plugin source, boolean sourceDominant, Map<Object, Object> context) {
175 Iterator<Dependency> sourceIterator = source.getDependencies().iterator();
176 builder.dependencies(target.getDependencies().stream()
177 .map(d -> mergeDependency(d, sourceIterator.next(), sourceDominant, context))
178 .collect(Collectors.toList()));
179 }
180
181 @Override
182 protected void mergePlugin_Executions(
183 Plugin.Builder builder, Plugin target, Plugin source, boolean sourceDominant, Map<Object, Object> context) {
184
185 }
186
187 @Override
188 protected void mergeReporting_Plugins(
189 Reporting.Builder builder,
190 Reporting target,
191 Reporting source,
192 boolean sourceDominant,
193 Map<Object, Object> context) {
194
195 }
196
197 @Override
198 protected void mergeReportPlugin_ReportSets(
199 ReportPlugin.Builder builder,
200 ReportPlugin target,
201 ReportPlugin source,
202 boolean sourceDominant,
203 Map<Object, Object> context) {
204
205 }
206
207 @Override
208 protected void mergePluginContainer_Plugins(
209 PluginContainer.Builder builder,
210 PluginContainer target,
211 PluginContainer source,
212 boolean sourceDominant,
213 Map<Object, Object> context) {
214
215 }
216 }