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