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