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