1
2
3
4
5 package org.apache.maven.api.model;
6
7 import java.io.Serializable;
8 import java.nio.file.Path;
9 import java.util.ArrayList;
10 import java.util.Collection;
11 import java.util.Collections;
12 import java.util.HashMap;
13 import java.util.List;
14 import java.util.Map;
15 import org.apache.maven.api.annotations.Experimental;
16 import org.apache.maven.api.annotations.Generated;
17 import org.apache.maven.api.annotations.Immutable;
18 import org.apache.maven.api.annotations.Nonnull;
19 import org.apache.maven.api.annotations.NotThreadSafe;
20 import org.apache.maven.api.annotations.ThreadSafe;
21
22
23
24
25
26 @Experimental
27 @Generated @ThreadSafe @Immutable
28 public class Model
29 extends ModelBase
30 implements Serializable, InputLocationTracker
31 {
32 final String modelEncoding;
33
34
35
36 final Path pomFile;
37
38
39
40 final String modelVersion;
41
42
43
44
45
46 final Parent parent;
47
48
49
50
51
52 final String groupId;
53
54
55
56
57
58
59 final String artifactId;
60
61
62
63 final String version;
64
65
66
67
68
69
70
71
72
73 final String packaging;
74
75
76
77 final String name;
78
79
80
81
82
83
84
85 final String description;
86
87
88
89
90
91 final String url;
92
93
94
95
96
97
98
99 final String childProjectUrlInheritAppendPath;
100
101
102
103
104
105 final boolean root;
106
107
108
109
110 final String inceptionYear;
111
112
113
114
115
116 final Organization organization;
117
118
119
120
121
122
123
124
125
126 final List<License> licenses;
127
128
129
130 final List<Developer> developers;
131
132
133
134 final List<Contributor> contributors;
135
136
137
138 final List<MailingList> mailingLists;
139
140
141
142 final Prerequisites prerequisites;
143
144
145
146 final Scm scm;
147
148
149
150 final IssueManagement issueManagement;
151
152
153
154 final CiManagement ciManagement;
155
156
157
158 final Build build;
159
160
161
162
163 final List<Profile> profiles;
164
165
166
167
168
169 Model(
170 String modelEncoding,
171 Collection<String> modules,
172 DistributionManagement distributionManagement,
173 Map<String, String> properties,
174 DependencyManagement dependencyManagement,
175 Collection<Dependency> dependencies,
176 Collection<Repository> repositories,
177 Collection<Repository> pluginRepositories,
178 Reporting reporting,
179 Path pomFile,
180 String modelVersion,
181 Parent parent,
182 String groupId,
183 String artifactId,
184 String version,
185 String packaging,
186 String name,
187 String description,
188 String url,
189 String childProjectUrlInheritAppendPath,
190 boolean root,
191 String inceptionYear,
192 Organization organization,
193 Collection<License> licenses,
194 Collection<Developer> developers,
195 Collection<Contributor> contributors,
196 Collection<MailingList> mailingLists,
197 Prerequisites prerequisites,
198 Scm scm,
199 IssueManagement issueManagement,
200 CiManagement ciManagement,
201 Build build,
202 Collection<Profile> profiles,
203 Map<Object, InputLocation> locations
204 ) {
205 super(
206 modules,
207 distributionManagement,
208 properties,
209 dependencyManagement,
210 dependencies,
211 repositories,
212 pluginRepositories,
213 reporting,
214 locations
215 );
216 this.modelEncoding = modelEncoding;
217 this.pomFile = pomFile;
218 this.modelVersion = modelVersion;
219 this.parent = parent;
220 this.groupId = groupId;
221 this.artifactId = artifactId;
222 this.version = version;
223 this.packaging = packaging;
224 this.name = name;
225 this.description = description;
226 this.url = url;
227 this.childProjectUrlInheritAppendPath = childProjectUrlInheritAppendPath;
228 this.root = root;
229 this.inceptionYear = inceptionYear;
230 this.organization = organization;
231 this.licenses = ImmutableCollections.copy(licenses);
232 this.developers = ImmutableCollections.copy(developers);
233 this.contributors = ImmutableCollections.copy(contributors);
234 this.mailingLists = ImmutableCollections.copy(mailingLists);
235 this.prerequisites = prerequisites;
236 this.scm = scm;
237 this.issueManagement = issueManagement;
238 this.ciManagement = ciManagement;
239 this.build = build;
240 this.profiles = ImmutableCollections.copy(profiles);
241 }
242
243 public String getModelEncoding() {
244 return modelEncoding;
245 }
246
247
248
249
250
251
252 public Path getPomFile() {
253 return this.pomFile;
254 }
255
256
257
258
259
260
261 public String getModelVersion() {
262 return this.modelVersion;
263 }
264
265
266
267
268
269
270
271
272 public Parent getParent() {
273 return this.parent;
274 }
275
276
277
278
279
280
281
282
283 public String getGroupId() {
284 return this.groupId;
285 }
286
287
288
289
290
291
292
293
294
295 public String getArtifactId() {
296 return this.artifactId;
297 }
298
299
300
301
302
303
304 public String getVersion() {
305 return this.version;
306 }
307
308
309
310
311
312
313
314
315
316
317
318
319 public String getPackaging() {
320 return this.packaging;
321 }
322
323
324
325
326
327
328 public String getName() {
329 return this.name;
330 }
331
332
333
334
335
336
337
338
339
340
341 public String getDescription() {
342 return this.description;
343 }
344
345
346
347
348
349
350
351
352 public String getUrl() {
353 return this.url;
354 }
355
356
357
358
359
360
361
362
363
364
365 public String getChildProjectUrlInheritAppendPath() {
366 return this.childProjectUrlInheritAppendPath;
367 }
368
369
370
371
372
373
374
375
376 public boolean isRoot() {
377 return this.root;
378 }
379
380
381
382
383
384
385
386 public String getInceptionYear() {
387 return this.inceptionYear;
388 }
389
390
391
392
393
394
395
396
397 public Organization getOrganization() {
398 return this.organization;
399 }
400
401
402
403
404
405
406
407
408
409
410
411
412 @Nonnull
413 public List<License> getLicenses() {
414 return this.licenses;
415 }
416
417
418
419
420
421
422 @Nonnull
423 public List<Developer> getDevelopers() {
424 return this.developers;
425 }
426
427
428
429
430
431
432 @Nonnull
433 public List<Contributor> getContributors() {
434 return this.contributors;
435 }
436
437
438
439
440
441
442 @Nonnull
443 public List<MailingList> getMailingLists() {
444 return this.mailingLists;
445 }
446
447
448
449
450
451
452 public Prerequisites getPrerequisites() {
453 return this.prerequisites;
454 }
455
456
457
458
459
460
461 public Scm getScm() {
462 return this.scm;
463 }
464
465
466
467
468
469
470 public IssueManagement getIssueManagement() {
471 return this.issueManagement;
472 }
473
474
475
476
477
478
479 public CiManagement getCiManagement() {
480 return this.ciManagement;
481 }
482
483
484
485
486
487
488 public Build getBuild() {
489 return this.build;
490 }
491
492
493
494
495
496
497
498 @Nonnull
499 public List<Profile> getProfiles() {
500 return this.profiles;
501 }
502
503
504
505
506
507
508 @Nonnull
509 public Builder with() {
510 return newBuilder(this);
511 }
512
513
514
515
516
517
518 @Nonnull
519 public Model withModules(Collection<String> modules) {
520 return newBuilder(this, true).modules(modules).build();
521 }
522
523
524
525
526
527
528 @Nonnull
529 public Model withDistributionManagement(DistributionManagement distributionManagement) {
530 return newBuilder(this, true).distributionManagement(distributionManagement).build();
531 }
532
533
534
535
536
537
538 @Nonnull
539 public Model withProperties(Map<String, String> properties) {
540 return newBuilder(this, true).properties(properties).build();
541 }
542
543
544
545
546
547
548 @Nonnull
549 public Model withDependencyManagement(DependencyManagement dependencyManagement) {
550 return newBuilder(this, true).dependencyManagement(dependencyManagement).build();
551 }
552
553
554
555
556
557
558 @Nonnull
559 public Model withDependencies(Collection<Dependency> dependencies) {
560 return newBuilder(this, true).dependencies(dependencies).build();
561 }
562
563
564
565
566
567
568 @Nonnull
569 public Model withRepositories(Collection<Repository> repositories) {
570 return newBuilder(this, true).repositories(repositories).build();
571 }
572
573
574
575
576
577
578 @Nonnull
579 public Model withPluginRepositories(Collection<Repository> pluginRepositories) {
580 return newBuilder(this, true).pluginRepositories(pluginRepositories).build();
581 }
582
583
584
585
586
587
588 @Nonnull
589 public Model withReporting(Reporting reporting) {
590 return newBuilder(this, true).reporting(reporting).build();
591 }
592
593
594
595
596
597
598 @Nonnull
599 public Model withPomFile(Path pomFile) {
600 return newBuilder(this, true).pomFile(pomFile).build();
601 }
602
603
604
605
606
607
608 @Nonnull
609 public Model withModelVersion(String modelVersion) {
610 return newBuilder(this, true).modelVersion(modelVersion).build();
611 }
612
613
614
615
616
617
618 @Nonnull
619 public Model withParent(Parent parent) {
620 return newBuilder(this, true).parent(parent).build();
621 }
622
623
624
625
626
627
628 @Nonnull
629 public Model withGroupId(String groupId) {
630 return newBuilder(this, true).groupId(groupId).build();
631 }
632
633
634
635
636
637
638 @Nonnull
639 public Model withArtifactId(String artifactId) {
640 return newBuilder(this, true).artifactId(artifactId).build();
641 }
642
643
644
645
646
647
648 @Nonnull
649 public Model withVersion(String version) {
650 return newBuilder(this, true).version(version).build();
651 }
652
653
654
655
656
657
658 @Nonnull
659 public Model withPackaging(String packaging) {
660 return newBuilder(this, true).packaging(packaging).build();
661 }
662
663
664
665
666
667
668 @Nonnull
669 public Model withName(String name) {
670 return newBuilder(this, true).name(name).build();
671 }
672
673
674
675
676
677
678 @Nonnull
679 public Model withDescription(String description) {
680 return newBuilder(this, true).description(description).build();
681 }
682
683
684
685
686
687
688 @Nonnull
689 public Model withUrl(String url) {
690 return newBuilder(this, true).url(url).build();
691 }
692
693
694
695
696
697
698 @Nonnull
699 public Model withChildProjectUrlInheritAppendPath(String childProjectUrlInheritAppendPath) {
700 return newBuilder(this, true).childProjectUrlInheritAppendPath(childProjectUrlInheritAppendPath).build();
701 }
702
703
704
705
706
707
708 @Nonnull
709 public Model withRoot(boolean root) {
710 return newBuilder(this, true).root(root).build();
711 }
712
713
714
715
716
717
718 @Nonnull
719 public Model withInceptionYear(String inceptionYear) {
720 return newBuilder(this, true).inceptionYear(inceptionYear).build();
721 }
722
723
724
725
726
727
728 @Nonnull
729 public Model withOrganization(Organization organization) {
730 return newBuilder(this, true).organization(organization).build();
731 }
732
733
734
735
736
737
738 @Nonnull
739 public Model withLicenses(Collection<License> licenses) {
740 return newBuilder(this, true).licenses(licenses).build();
741 }
742
743
744
745
746
747
748 @Nonnull
749 public Model withDevelopers(Collection<Developer> developers) {
750 return newBuilder(this, true).developers(developers).build();
751 }
752
753
754
755
756
757
758 @Nonnull
759 public Model withContributors(Collection<Contributor> contributors) {
760 return newBuilder(this, true).contributors(contributors).build();
761 }
762
763
764
765
766
767
768 @Nonnull
769 public Model withMailingLists(Collection<MailingList> mailingLists) {
770 return newBuilder(this, true).mailingLists(mailingLists).build();
771 }
772
773
774
775
776
777
778 @Nonnull
779 public Model withPrerequisites(Prerequisites prerequisites) {
780 return newBuilder(this, true).prerequisites(prerequisites).build();
781 }
782
783
784
785
786
787
788 @Nonnull
789 public Model withScm(Scm scm) {
790 return newBuilder(this, true).scm(scm).build();
791 }
792
793
794
795
796
797
798 @Nonnull
799 public Model withIssueManagement(IssueManagement issueManagement) {
800 return newBuilder(this, true).issueManagement(issueManagement).build();
801 }
802
803
804
805
806
807
808 @Nonnull
809 public Model withCiManagement(CiManagement ciManagement) {
810 return newBuilder(this, true).ciManagement(ciManagement).build();
811 }
812
813
814
815
816
817
818 @Nonnull
819 public Model withBuild(Build build) {
820 return newBuilder(this, true).build(build).build();
821 }
822
823
824
825
826
827
828 @Nonnull
829 public Model withProfiles(Collection<Profile> profiles) {
830 return newBuilder(this, true).profiles(profiles).build();
831 }
832
833
834
835
836
837
838
839
840 @Nonnull
841 public static Model newInstance() {
842 return newInstance(true);
843 }
844
845
846
847
848
849
850
851
852 @Nonnull
853 public static Model newInstance(boolean withDefaults) {
854 return newBuilder(withDefaults).build();
855 }
856
857
858
859
860
861
862
863
864 @Nonnull
865 public static Builder newBuilder() {
866 return newBuilder(true);
867 }
868
869
870
871
872
873
874
875 @Nonnull
876 public static Builder newBuilder(boolean withDefaults) {
877 return new Builder(withDefaults);
878 }
879
880
881
882
883
884
885
886
887 @Nonnull
888 public static Builder newBuilder(Model from) {
889 return newBuilder(from, false);
890 }
891
892
893
894
895
896
897
898
899 @Nonnull
900 public static Builder newBuilder(Model from, boolean forceCopy) {
901 return new Builder(from, forceCopy);
902 }
903
904
905
906
907
908
909 @NotThreadSafe
910 public static class Builder
911 extends ModelBase.Builder
912 {
913 Model base;
914 String modelEncoding;
915 Path pomFile;
916 String modelVersion;
917 Parent parent;
918 String groupId;
919 String artifactId;
920 String version;
921 String packaging;
922 String name;
923 String description;
924 String url;
925 String childProjectUrlInheritAppendPath;
926 Boolean root;
927 String inceptionYear;
928 Organization organization;
929 Collection<License> licenses;
930 Collection<Developer> developers;
931 Collection<Contributor> contributors;
932 Collection<MailingList> mailingLists;
933 Prerequisites prerequisites;
934 Scm scm;
935 IssueManagement issueManagement;
936 CiManagement ciManagement;
937 Build build;
938 Collection<Profile> profiles;
939
940 Builder(boolean withDefaults) {
941 super(withDefaults);
942 if (withDefaults) {
943 this.packaging = "jar";
944 this.root = false;
945 }
946 }
947
948 Builder(Model base, boolean forceCopy) {
949 super(base, forceCopy);
950 if (forceCopy) {
951 this.pomFile = base.pomFile;
952 this.modelVersion = base.modelVersion;
953 this.parent = base.parent;
954 this.groupId = base.groupId;
955 this.artifactId = base.artifactId;
956 this.version = base.version;
957 this.packaging = base.packaging;
958 this.name = base.name;
959 this.description = base.description;
960 this.url = base.url;
961 this.childProjectUrlInheritAppendPath = base.childProjectUrlInheritAppendPath;
962 this.root = base.root;
963 this.inceptionYear = base.inceptionYear;
964 this.organization = base.organization;
965 this.licenses = base.licenses;
966 this.developers = base.developers;
967 this.contributors = base.contributors;
968 this.mailingLists = base.mailingLists;
969 this.prerequisites = base.prerequisites;
970 this.scm = base.scm;
971 this.issueManagement = base.issueManagement;
972 this.ciManagement = base.ciManagement;
973 this.build = base.build;
974 this.profiles = base.profiles;
975 this.locations = base.locations;
976 } else {
977 this.base = base;
978 }
979 }
980
981 @Nonnull
982 public Builder modelEncoding(String modelEncoding) {
983 this.modelEncoding = modelEncoding;
984 return this;
985 }
986
987 @Nonnull
988 public Builder modules(Collection<String> modules) {
989 this.modules = modules;
990 return this;
991 }
992
993 @Nonnull
994 public Builder distributionManagement(DistributionManagement distributionManagement) {
995 this.distributionManagement = distributionManagement;
996 return this;
997 }
998
999 @Nonnull
1000 public Builder properties(Map<String, String> properties) {
1001 this.properties = properties;
1002 return this;
1003 }
1004
1005 @Nonnull
1006 public Builder dependencyManagement(DependencyManagement dependencyManagement) {
1007 this.dependencyManagement = dependencyManagement;
1008 return this;
1009 }
1010
1011 @Nonnull
1012 public Builder dependencies(Collection<Dependency> dependencies) {
1013 this.dependencies = dependencies;
1014 return this;
1015 }
1016
1017 @Nonnull
1018 public Builder repositories(Collection<Repository> repositories) {
1019 this.repositories = repositories;
1020 return this;
1021 }
1022
1023 @Nonnull
1024 public Builder pluginRepositories(Collection<Repository> pluginRepositories) {
1025 this.pluginRepositories = pluginRepositories;
1026 return this;
1027 }
1028
1029 @Nonnull
1030 public Builder reporting(Reporting reporting) {
1031 this.reporting = reporting;
1032 return this;
1033 }
1034
1035 @Nonnull
1036 public Builder pomFile(Path pomFile) {
1037 this.pomFile = pomFile;
1038 return this;
1039 }
1040
1041 @Nonnull
1042 public Builder modelVersion(String modelVersion) {
1043 this.modelVersion = modelVersion;
1044 return this;
1045 }
1046
1047 @Nonnull
1048 public Builder parent(Parent parent) {
1049 this.parent = parent;
1050 return this;
1051 }
1052
1053 @Nonnull
1054 public Builder groupId(String groupId) {
1055 this.groupId = groupId;
1056 return this;
1057 }
1058
1059 @Nonnull
1060 public Builder artifactId(String artifactId) {
1061 this.artifactId = artifactId;
1062 return this;
1063 }
1064
1065 @Nonnull
1066 public Builder version(String version) {
1067 this.version = version;
1068 return this;
1069 }
1070
1071 @Nonnull
1072 public Builder packaging(String packaging) {
1073 this.packaging = packaging;
1074 return this;
1075 }
1076
1077 @Nonnull
1078 public Builder name(String name) {
1079 this.name = name;
1080 return this;
1081 }
1082
1083 @Nonnull
1084 public Builder description(String description) {
1085 this.description = description;
1086 return this;
1087 }
1088
1089 @Nonnull
1090 public Builder url(String url) {
1091 this.url = url;
1092 return this;
1093 }
1094
1095 @Nonnull
1096 public Builder childProjectUrlInheritAppendPath(String childProjectUrlInheritAppendPath) {
1097 this.childProjectUrlInheritAppendPath = childProjectUrlInheritAppendPath;
1098 return this;
1099 }
1100
1101 @Nonnull
1102 public Builder root(boolean root) {
1103 this.root = root;
1104 return this;
1105 }
1106
1107 @Nonnull
1108 public Builder inceptionYear(String inceptionYear) {
1109 this.inceptionYear = inceptionYear;
1110 return this;
1111 }
1112
1113 @Nonnull
1114 public Builder organization(Organization organization) {
1115 this.organization = organization;
1116 return this;
1117 }
1118
1119 @Nonnull
1120 public Builder licenses(Collection<License> licenses) {
1121 this.licenses = licenses;
1122 return this;
1123 }
1124
1125 @Nonnull
1126 public Builder developers(Collection<Developer> developers) {
1127 this.developers = developers;
1128 return this;
1129 }
1130
1131 @Nonnull
1132 public Builder contributors(Collection<Contributor> contributors) {
1133 this.contributors = contributors;
1134 return this;
1135 }
1136
1137 @Nonnull
1138 public Builder mailingLists(Collection<MailingList> mailingLists) {
1139 this.mailingLists = mailingLists;
1140 return this;
1141 }
1142
1143 @Nonnull
1144 public Builder prerequisites(Prerequisites prerequisites) {
1145 this.prerequisites = prerequisites;
1146 return this;
1147 }
1148
1149 @Nonnull
1150 public Builder scm(Scm scm) {
1151 this.scm = scm;
1152 return this;
1153 }
1154
1155 @Nonnull
1156 public Builder issueManagement(IssueManagement issueManagement) {
1157 this.issueManagement = issueManagement;
1158 return this;
1159 }
1160
1161 @Nonnull
1162 public Builder ciManagement(CiManagement ciManagement) {
1163 this.ciManagement = ciManagement;
1164 return this;
1165 }
1166
1167 @Nonnull
1168 public Builder build(Build build) {
1169 this.build = build;
1170 return this;
1171 }
1172
1173 @Nonnull
1174 public Builder profiles(Collection<Profile> profiles) {
1175 this.profiles = profiles;
1176 return this;
1177 }
1178
1179
1180 @Nonnull
1181 public Builder location(Object key, InputLocation location) {
1182 if (location != null) {
1183 if (!(this.locations instanceof HashMap)) {
1184 this.locations = this.locations != null ? new HashMap<>(this.locations) : new HashMap<>();
1185 }
1186 this.locations.put(key, location);
1187 }
1188 return this;
1189 }
1190
1191 @Nonnull
1192 public Model build() {
1193 if (base != null
1194 && (modules == null || modules == base.modules)
1195 && (distributionManagement == null || distributionManagement == base.distributionManagement)
1196 && (properties == null || properties == base.properties)
1197 && (dependencyManagement == null || dependencyManagement == base.dependencyManagement)
1198 && (dependencies == null || dependencies == base.dependencies)
1199 && (repositories == null || repositories == base.repositories)
1200 && (pluginRepositories == null || pluginRepositories == base.pluginRepositories)
1201 && (reporting == null || reporting == base.reporting)
1202 && (pomFile == null || pomFile == base.pomFile)
1203 && (modelVersion == null || modelVersion == base.modelVersion)
1204 && (parent == null || parent == base.parent)
1205 && (groupId == null || groupId == base.groupId)
1206 && (artifactId == null || artifactId == base.artifactId)
1207 && (version == null || version == base.version)
1208 && (packaging == null || packaging == base.packaging)
1209 && (name == null || name == base.name)
1210 && (description == null || description == base.description)
1211 && (url == null || url == base.url)
1212 && (childProjectUrlInheritAppendPath == null || childProjectUrlInheritAppendPath == base.childProjectUrlInheritAppendPath)
1213 && (root == null || root == base.root)
1214 && (inceptionYear == null || inceptionYear == base.inceptionYear)
1215 && (organization == null || organization == base.organization)
1216 && (licenses == null || licenses == base.licenses)
1217 && (developers == null || developers == base.developers)
1218 && (contributors == null || contributors == base.contributors)
1219 && (mailingLists == null || mailingLists == base.mailingLists)
1220 && (prerequisites == null || prerequisites == base.prerequisites)
1221 && (scm == null || scm == base.scm)
1222 && (issueManagement == null || issueManagement == base.issueManagement)
1223 && (ciManagement == null || ciManagement == base.ciManagement)
1224 && (build == null || build == base.build)
1225 && (profiles == null || profiles == base.profiles)
1226 ) {
1227 return base;
1228 }
1229 Map<Object, InputLocation> locations = null;
1230 InputLocation location = null;
1231 InputLocation modulesLocation = null;
1232 InputLocation distributionManagementLocation = null;
1233 InputLocation propertiesLocation = null;
1234 InputLocation dependencyManagementLocation = null;
1235 InputLocation dependenciesLocation = null;
1236 InputLocation repositoriesLocation = null;
1237 InputLocation pluginRepositoriesLocation = null;
1238 InputLocation reportingLocation = null;
1239 InputLocation pomFileLocation = null;
1240 InputLocation modelVersionLocation = null;
1241 InputLocation parentLocation = null;
1242 InputLocation groupIdLocation = null;
1243 InputLocation artifactIdLocation = null;
1244 InputLocation versionLocation = null;
1245 InputLocation packagingLocation = null;
1246 InputLocation nameLocation = null;
1247 InputLocation descriptionLocation = null;
1248 InputLocation urlLocation = null;
1249 InputLocation childProjectUrlInheritAppendPathLocation = null;
1250 InputLocation rootLocation = null;
1251 InputLocation inceptionYearLocation = null;
1252 InputLocation organizationLocation = null;
1253 InputLocation licensesLocation = null;
1254 InputLocation developersLocation = null;
1255 InputLocation contributorsLocation = null;
1256 InputLocation mailingListsLocation = null;
1257 InputLocation prerequisitesLocation = null;
1258 InputLocation scmLocation = null;
1259 InputLocation issueManagementLocation = null;
1260 InputLocation ciManagementLocation = null;
1261 InputLocation buildLocation = null;
1262 InputLocation profilesLocation = null;
1263 if (this.locations != null) {
1264 locations = this.locations;
1265 }
1266 return new Model(
1267 modelEncoding != null ? modelEncoding : (base != null ? base.modelEncoding : "UTF-8"),
1268 modules != null ? modules : (base != null ? base.modules : null),
1269 distributionManagement != null ? distributionManagement : (base != null ? base.distributionManagement : null),
1270 properties != null ? properties : (base != null ? base.properties : null),
1271 dependencyManagement != null ? dependencyManagement : (base != null ? base.dependencyManagement : null),
1272 dependencies != null ? dependencies : (base != null ? base.dependencies : null),
1273 repositories != null ? repositories : (base != null ? base.repositories : null),
1274 pluginRepositories != null ? pluginRepositories : (base != null ? base.pluginRepositories : null),
1275 reporting != null ? reporting : (base != null ? base.reporting : null),
1276 pomFile != null ? pomFile : (base != null ? base.pomFile : null),
1277 modelVersion != null ? modelVersion : (base != null ? base.modelVersion : null),
1278 parent != null ? parent : (base != null ? base.parent : null),
1279 groupId != null ? groupId : (base != null ? base.groupId : null),
1280 artifactId != null ? artifactId : (base != null ? base.artifactId : null),
1281 version != null ? version : (base != null ? base.version : null),
1282 packaging != null ? packaging : (base != null ? base.packaging : null),
1283 name != null ? name : (base != null ? base.name : null),
1284 description != null ? description : (base != null ? base.description : null),
1285 url != null ? url : (base != null ? base.url : null),
1286 childProjectUrlInheritAppendPath != null ? childProjectUrlInheritAppendPath : (base != null ? base.childProjectUrlInheritAppendPath : null),
1287 root != null ? root : (base != null ? base.root : false),
1288 inceptionYear != null ? inceptionYear : (base != null ? base.inceptionYear : null),
1289 organization != null ? organization : (base != null ? base.organization : null),
1290 licenses != null ? licenses : (base != null ? base.licenses : null),
1291 developers != null ? developers : (base != null ? base.developers : null),
1292 contributors != null ? contributors : (base != null ? base.contributors : null),
1293 mailingLists != null ? mailingLists : (base != null ? base.mailingLists : null),
1294 prerequisites != null ? prerequisites : (base != null ? base.prerequisites : null),
1295 scm != null ? scm : (base != null ? base.scm : null),
1296 issueManagement != null ? issueManagement : (base != null ? base.issueManagement : null),
1297 ciManagement != null ? ciManagement : (base != null ? base.ciManagement : null),
1298 build != null ? build : (base != null ? base.build : null),
1299 profiles != null ? profiles : (base != null ? base.profiles : null),
1300 locations != null ? locations : (base != null ? base.locations : null)
1301 );
1302 }
1303 }
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313 public Path getProjectDirectory()
1314 {
1315 return ( pomFile != null ) ? pomFile.getParent() : null;
1316 }
1317
1318
1319
1320
1321 public String getId()
1322 {
1323 StringBuilder id = new StringBuilder( 64 );
1324
1325 id.append( ( getGroupId() == null ) ? "[inherited]" : getGroupId() );
1326 id.append( ":" );
1327 id.append( getArtifactId() );
1328 id.append( ":" );
1329 id.append( getPackaging() );
1330 id.append( ":" );
1331 id.append( ( getVersion() == null ) ? "[inherited]" : getVersion() );
1332
1333 return id.toString();
1334 }
1335
1336 @Override
1337 public String toString()
1338 {
1339 return getId();
1340 }
1341
1342 public boolean isChildProjectUrlInheritAppendPath()
1343 {
1344 return ( getChildProjectUrlInheritAppendPath() != null ) ? Boolean.parseBoolean( getChildProjectUrlInheritAppendPath() ) : true;
1345 }
1346
1347
1348
1349 }