1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 package org.apache.maven.shared.release.config;
25
26
27
28
29
30
31 @SuppressWarnings( "all" )
32 public class ModelloReleaseDescriptor
33 implements java.io.Serializable
34 {
35
36
37
38
39
40
41
42
43
44
45 private String name;
46
47
48
49
50
51
52 private String description;
53
54
55
56
57
58
59 private String ScmCommentPrefix = "[maven-release-manager] ";
60
61
62
63
64
65
66
67
68
69 private boolean scmShallowClone = true;
70
71
72
73
74
75
76
77 private String scmReleaseCommitComment = "@{prefix} prepare release @{releaseLabel}";
78
79
80
81
82
83
84
85 private String scmDevelopmentCommitComment = "@{prefix} prepare for next development iteration";
86
87
88
89
90
91
92 private String scmBranchCommitComment = "@{prefix} prepare branch @{releaseLabel}";
93
94
95
96
97
98
99 private String scmRollbackCommitComment = "@{prefix} rollback the release of @{releaseLabel}";
100
101
102
103
104
105
106
107
108
109 private String scmSourceUrl;
110
111
112
113
114
115
116
117
118 private String scmTagBase;
119
120
121
122
123
124
125
126
127 private String scmBranchBase;
128
129
130
131
132
133
134
135
136 private String scmReleaseLabel;
137
138
139
140
141
142
143
144 private String scmId;
145
146
147
148
149
150
151 private String scmUsername;
152
153
154
155
156
157
158
159 private String scmPassword;
160
161
162
163
164
165
166 private String scmPrivateKey;
167
168
169
170
171
172
173 private String scmPrivateKeyPassPhrase;
174
175
176
177
178
179
180
181
182
183 private boolean scmUseEditMode = false;
184
185
186
187
188
189
190
191 private String scmRelativePathProjectDirectory;
192
193
194
195
196
197
198
199 private boolean updateDependencies = true;
200
201
202
203
204
205
206
207
208
209
210 private boolean useReleaseProfile = true;
211
212
213
214
215 private java.util.List<String> activateProfiles;
216
217
218
219
220
221
222 private String workingDirectory;
223
224
225
226
227
228
229 private String checkoutDirectory = "target/checkout";
230
231
232
233
234
235
236 private String completedPhase;
237
238
239
240
241
242
243
244
245
246 private boolean addSchema = false;
247
248
249
250
251
252
253 private boolean generateReleasePoms = false;
254
255
256
257
258
259
260
261 private boolean autoVersionSubmodules = false;
262
263
264
265
266
267
268
269
270
271 private boolean interactive = true;
272
273
274
275
276
277
278
279 private boolean snapshotReleasePluginAllowed = false;
280
281
282
283
284
285
286
287 private String additionalArguments;
288
289
290
291
292
293
294
295 private String pomFileName;
296
297
298
299
300 private java.util.List<String> checkModificationExcludes;
301
302
303
304
305
306
307
308 private String preparationGoals;
309
310
311
312
313
314
315
316 private String completionGoals;
317
318
319
320
321
322
323
324 private String performGoals;
325
326
327
328
329
330
331
332 private boolean commitByProject = false;
333
334
335
336
337
338
339
340 private boolean branchCreation = false;
341
342
343
344
345
346
347 private boolean updateBranchVersions = false;
348
349
350
351
352
353
354 private boolean updateWorkingCopyVersions = true;
355
356
357
358
359
360
361 private boolean updateVersionsToSnapshot = false;
362
363
364
365
366
367
368
369 private boolean suppressCommitBeforeTagOrBranch = false;
370
371
372
373
374
375
376
377 private int waitBeforeTagging = 0;
378
379
380
381
382
383
384
385
386 private boolean allowTimestampedSnapshots = false;
387
388
389
390
391
392
393
394 private String defaultReleaseVersion;
395
396
397
398
399
400
401 private String defaultDevelopmentVersion;
402
403
404
405
406
407
408
409 private String projectVersionPolicyId = "default";
410
411
412
413
414
415
416
417
418
419 private Object projectVersionPolicyConfig;
420
421
422
423
424
425
426
427
428 private String projectNamingPolicyId;
429
430
431
432
433
434
435
436 private String releaseStrategyId = "default";
437
438
439
440
441
442
443
444
445
446 private boolean remoteTagging = false;
447
448
449
450
451
452
453
454
455
456 private String scmReleasedPomRevision;
457
458
459
460
461
462
463
464
465
466
467
468
469 private boolean pushChanges = true;
470
471
472
473
474
475
476
477
478
479
480
481 private boolean localCheckout = false;
482
483
484
485
486
487
488
489
490
491
492 private String scmTagNameFormat;
493
494
495
496
497
498
499
500
501
502
503 private String workItem;
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530 private String autoResolveSnapshots;
531
532
533
534
535
536
537
538
539
540
541 private boolean pinExternals = false;
542
543
544
545
546
547
548
549 private boolean scmSignTags = false;
550
551
552
553
554
555
556
557 private String lineSeparator;
558
559
560
561
562 private String modelEncoding = "UTF-8";
563
564
565
566
567
568
569
570
571
572
573
574 public void addActivateProfile( String string )
575 {
576 getActivateProfiles().add( string );
577 }
578
579
580
581
582
583
584 public void addCheckModificationExclude( String string )
585 {
586 getCheckModificationExcludes().add( string );
587 }
588
589
590
591
592
593
594 public java.util.List<String> getActivateProfiles()
595 {
596 if ( this.activateProfiles == null )
597 {
598 this.activateProfiles = new java.util.ArrayList<String>();
599 }
600
601 return this.activateProfiles;
602 }
603
604
605
606
607
608
609
610 public String getAdditionalArguments()
611 {
612 return this.additionalArguments;
613 }
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640 public String getAutoResolveSnapshots()
641 {
642 return this.autoResolveSnapshots;
643 }
644
645
646
647
648
649
650 public java.util.List<String> getCheckModificationExcludes()
651 {
652 if ( this.checkModificationExcludes == null )
653 {
654 this.checkModificationExcludes = new java.util.ArrayList<String>();
655 }
656
657 return this.checkModificationExcludes;
658 }
659
660
661
662
663
664
665 public String getCheckoutDirectory()
666 {
667 return this.checkoutDirectory;
668 }
669
670
671
672
673
674
675 public String getCompletedPhase()
676 {
677 return this.completedPhase;
678 }
679
680
681
682
683
684
685
686 public String getCompletionGoals()
687 {
688 return this.completionGoals;
689 }
690
691
692
693
694
695
696 public String getDefaultDevelopmentVersion()
697 {
698 return this.defaultDevelopmentVersion;
699 }
700
701
702
703
704
705
706
707 public String getDefaultReleaseVersion()
708 {
709 return this.defaultReleaseVersion;
710 }
711
712
713
714
715
716
717 public String getDescription()
718 {
719 return this.description;
720 }
721
722
723
724
725
726
727 public String getLineSeparator()
728 {
729 return this.lineSeparator;
730 }
731
732
733
734
735
736
737 public String getModelEncoding()
738 {
739 return this.modelEncoding;
740 }
741
742
743
744
745
746
747 public String getName()
748 {
749 return this.name;
750 }
751
752
753
754
755
756
757 public String getPerformGoals()
758 {
759 return this.performGoals;
760 }
761
762
763
764
765
766
767
768 public String getPomFileName()
769 {
770 return this.pomFileName;
771 }
772
773
774
775
776
777
778 public String getPreparationGoals()
779 {
780 return this.preparationGoals;
781 }
782
783
784
785
786
787
788
789 public String getProjectNamingPolicyId()
790 {
791 return this.projectNamingPolicyId;
792 }
793
794
795
796
797
798
799
800
801
802 public Object getProjectVersionPolicyConfig()
803 {
804 return this.projectVersionPolicyConfig;
805 }
806
807
808
809
810
811
812
813 public String getProjectVersionPolicyId()
814 {
815 return this.projectVersionPolicyId;
816 }
817
818
819
820
821
822
823 public String getReleaseStrategyId()
824 {
825 return this.releaseStrategyId;
826 }
827
828
829
830
831
832
833
834
835 public String getScmBranchBase()
836 {
837 return this.scmBranchBase;
838 }
839
840
841
842
843
844
845 public String getScmBranchCommitComment()
846 {
847 return this.scmBranchCommitComment;
848 }
849
850
851
852
853
854
855 public String getScmCommentPrefix()
856 {
857 return this.ScmCommentPrefix;
858 }
859
860
861
862
863
864
865
866 public String getScmDevelopmentCommitComment()
867 {
868 return this.scmDevelopmentCommitComment;
869 }
870
871
872
873
874
875
876
877 public String getScmId()
878 {
879 return this.scmId;
880 }
881
882
883
884
885
886
887 public String getScmPassword()
888 {
889 return this.scmPassword;
890 }
891
892
893
894
895
896
897 public String getScmPrivateKey()
898 {
899 return this.scmPrivateKey;
900 }
901
902
903
904
905
906
907 public String getScmPrivateKeyPassPhrase()
908 {
909 return this.scmPrivateKeyPassPhrase;
910 }
911
912
913
914
915
916
917
918 public String getScmRelativePathProjectDirectory()
919 {
920 return this.scmRelativePathProjectDirectory;
921 }
922
923
924
925
926
927
928 public String getScmReleaseCommitComment()
929 {
930 return this.scmReleaseCommitComment;
931 }
932
933
934
935
936
937
938
939 public String getScmReleaseLabel()
940 {
941 return this.scmReleaseLabel;
942 }
943
944
945
946
947
948
949
950
951
952 public String getScmReleasedPomRevision()
953 {
954 return this.scmReleasedPomRevision;
955 }
956
957
958
959
960
961
962 public String getScmRollbackCommitComment()
963 {
964 return this.scmRollbackCommitComment;
965 }
966
967
968
969
970
971
972
973
974
975 public String getScmSourceUrl()
976 {
977 return this.scmSourceUrl;
978 }
979
980
981
982
983
984
985
986
987 public String getScmTagBase()
988 {
989 return this.scmTagBase;
990 }
991
992
993
994
995
996
997
998
999
1000
1001 public String getScmTagNameFormat()
1002 {
1003 return this.scmTagNameFormat;
1004 }
1005
1006
1007
1008
1009
1010
1011 public String getScmUsername()
1012 {
1013 return this.scmUsername;
1014 }
1015
1016
1017
1018
1019
1020
1021
1022 public int getWaitBeforeTagging()
1023 {
1024 return this.waitBeforeTagging;
1025 }
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036 public String getWorkItem()
1037 {
1038 return this.workItem;
1039 }
1040
1041
1042
1043
1044
1045
1046 public String getWorkingDirectory()
1047 {
1048 return this.workingDirectory;
1049 }
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059 public boolean isAddSchema()
1060 {
1061 return this.addSchema;
1062 }
1063
1064
1065
1066
1067
1068
1069
1070
1071 public boolean isAllowTimestampedSnapshots()
1072 {
1073 return this.allowTimestampedSnapshots;
1074 }
1075
1076
1077
1078
1079
1080
1081
1082 public boolean isAutoVersionSubmodules()
1083 {
1084 return this.autoVersionSubmodules;
1085 }
1086
1087
1088
1089
1090
1091
1092 public boolean isBranchCreation()
1093 {
1094 return this.branchCreation;
1095 }
1096
1097
1098
1099
1100
1101
1102
1103 public boolean isCommitByProject()
1104 {
1105 return this.commitByProject;
1106 }
1107
1108
1109
1110
1111
1112
1113 public boolean isGenerateReleasePoms()
1114 {
1115 return this.generateReleasePoms;
1116 }
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126 public boolean isInteractive()
1127 {
1128 return this.interactive;
1129 }
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141 public boolean isLocalCheckout()
1142 {
1143 return this.localCheckout;
1144 }
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155 public boolean isPinExternals()
1156 {
1157 return this.pinExternals;
1158 }
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171 public boolean isPushChanges()
1172 {
1173 return this.pushChanges;
1174 }
1175
1176
1177
1178
1179
1180
1181
1182
1183 public boolean isRemoteTagging()
1184 {
1185 return this.remoteTagging;
1186 }
1187
1188
1189
1190
1191
1192
1193
1194
1195 public boolean isScmShallowClone()
1196 {
1197 return this.scmShallowClone;
1198 }
1199
1200
1201
1202
1203
1204
1205
1206 public boolean isScmSignTags()
1207 {
1208 return this.scmSignTags;
1209 }
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219 public boolean isScmUseEditMode()
1220 {
1221 return this.scmUseEditMode;
1222 }
1223
1224
1225
1226
1227
1228
1229 public boolean isSnapshotReleasePluginAllowed()
1230 {
1231 return this.snapshotReleasePluginAllowed;
1232 }
1233
1234
1235
1236
1237
1238
1239
1240 public boolean isSuppressCommitBeforeTagOrBranch()
1241 {
1242 return this.suppressCommitBeforeTagOrBranch;
1243 }
1244
1245
1246
1247
1248
1249
1250 public boolean isUpdateBranchVersions()
1251 {
1252 return this.updateBranchVersions;
1253 }
1254
1255
1256
1257
1258
1259
1260
1261 public boolean isUpdateDependencies()
1262 {
1263 return this.updateDependencies;
1264 }
1265
1266
1267
1268
1269
1270
1271 public boolean isUpdateVersionsToSnapshot()
1272 {
1273 return this.updateVersionsToSnapshot;
1274 }
1275
1276
1277
1278
1279
1280
1281 public boolean isUpdateWorkingCopyVersions()
1282 {
1283 return this.updateWorkingCopyVersions;
1284 }
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294 public boolean isUseReleaseProfile()
1295 {
1296 return this.useReleaseProfile;
1297 }
1298
1299
1300
1301
1302
1303
1304 public void removeActivateProfile( String string )
1305 {
1306 getActivateProfiles().remove( string );
1307 }
1308
1309
1310
1311
1312
1313
1314 public void removeCheckModificationExclude( String string )
1315 {
1316 getCheckModificationExcludes().remove( string );
1317 }
1318
1319
1320
1321
1322
1323
1324 public void setActivateProfiles( java.util.List<String> activateProfiles )
1325 {
1326 this.activateProfiles = activateProfiles;
1327 }
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337 public void setAddSchema( boolean addSchema )
1338 {
1339 this.addSchema = addSchema;
1340 }
1341
1342
1343
1344
1345
1346
1347
1348 public void setAdditionalArguments( String additionalArguments )
1349 {
1350 this.additionalArguments = additionalArguments;
1351 }
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361 public void setAllowTimestampedSnapshots( boolean allowTimestampedSnapshots )
1362 {
1363 this.allowTimestampedSnapshots = allowTimestampedSnapshots;
1364 }
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391 public void setAutoResolveSnapshots( String autoResolveSnapshots )
1392 {
1393 this.autoResolveSnapshots = autoResolveSnapshots;
1394 }
1395
1396
1397
1398
1399
1400
1401
1402 public void setAutoVersionSubmodules( boolean autoVersionSubmodules )
1403 {
1404 this.autoVersionSubmodules = autoVersionSubmodules;
1405 }
1406
1407
1408
1409
1410
1411
1412 public void setBranchCreation( boolean branchCreation )
1413 {
1414 this.branchCreation = branchCreation;
1415 }
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426 public void setCheckModificationExcludes( java.util.List<String> checkModificationExcludes )
1427 {
1428 this.checkModificationExcludes = checkModificationExcludes;
1429 }
1430
1431
1432
1433
1434
1435
1436 public void setCheckoutDirectory( String checkoutDirectory )
1437 {
1438 this.checkoutDirectory = checkoutDirectory;
1439 }
1440
1441
1442
1443
1444
1445
1446
1447 public void setCommitByProject( boolean commitByProject )
1448 {
1449 this.commitByProject = commitByProject;
1450 }
1451
1452
1453
1454
1455
1456
1457 public void setCompletedPhase( String completedPhase )
1458 {
1459 this.completedPhase = completedPhase;
1460 }
1461
1462
1463
1464
1465
1466
1467
1468 public void setCompletionGoals( String completionGoals )
1469 {
1470 this.completionGoals = completionGoals;
1471 }
1472
1473
1474
1475
1476
1477
1478
1479 public void setDefaultDevelopmentVersion( String defaultDevelopmentVersion )
1480 {
1481 this.defaultDevelopmentVersion = defaultDevelopmentVersion;
1482 }
1483
1484
1485
1486
1487
1488
1489
1490 public void setDefaultReleaseVersion( String defaultReleaseVersion )
1491 {
1492 this.defaultReleaseVersion = defaultReleaseVersion;
1493 }
1494
1495
1496
1497
1498
1499
1500 public void setDescription( String description )
1501 {
1502 this.description = description;
1503 }
1504
1505
1506
1507
1508
1509
1510 public void setGenerateReleasePoms( boolean generateReleasePoms )
1511 {
1512 this.generateReleasePoms = generateReleasePoms;
1513 }
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523 public void setInteractive( boolean interactive )
1524 {
1525 this.interactive = interactive;
1526 }
1527
1528
1529
1530
1531
1532
1533 public void setLineSeparator( String lineSeparator )
1534 {
1535 this.lineSeparator = lineSeparator;
1536 }
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548 public void setLocalCheckout( boolean localCheckout )
1549 {
1550 this.localCheckout = localCheckout;
1551 }
1552
1553
1554
1555
1556
1557
1558 public void setModelEncoding( String modelEncoding )
1559 {
1560 this.modelEncoding = modelEncoding;
1561 }
1562
1563
1564
1565
1566
1567
1568 public void setName( String name )
1569 {
1570 this.name = name;
1571 }
1572
1573
1574
1575
1576
1577
1578 public void setPerformGoals( String performGoals )
1579 {
1580 this.performGoals = performGoals;
1581 }
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592 public void setPinExternals( boolean pinExternals )
1593 {
1594 this.pinExternals = pinExternals;
1595 }
1596
1597
1598
1599
1600
1601
1602
1603 public void setPomFileName( String pomFileName )
1604 {
1605 this.pomFileName = pomFileName;
1606 }
1607
1608
1609
1610
1611
1612
1613 public void setPreparationGoals( String preparationGoals )
1614 {
1615 this.preparationGoals = preparationGoals;
1616 }
1617
1618
1619
1620
1621
1622
1623
1624 public void setProjectNamingPolicyId( String projectNamingPolicyId )
1625 {
1626 this.projectNamingPolicyId = projectNamingPolicyId;
1627 }
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638 public void setProjectVersionPolicyConfig( Object projectVersionPolicyConfig )
1639 {
1640 this.projectVersionPolicyConfig = projectVersionPolicyConfig;
1641 }
1642
1643
1644
1645
1646
1647
1648
1649 public void setProjectVersionPolicyId( String projectVersionPolicyId )
1650 {
1651 this.projectVersionPolicyId = projectVersionPolicyId;
1652 }
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665 public void setPushChanges( boolean pushChanges )
1666 {
1667 this.pushChanges = pushChanges;
1668 }
1669
1670
1671
1672
1673
1674
1675 public void setReleaseStrategyId( String releaseStrategyId )
1676 {
1677 this.releaseStrategyId = releaseStrategyId;
1678 }
1679
1680
1681
1682
1683
1684
1685
1686
1687 public void setRemoteTagging( boolean remoteTagging )
1688 {
1689 this.remoteTagging = remoteTagging;
1690 }
1691
1692
1693
1694
1695
1696
1697
1698
1699 public void setScmBranchBase( String scmBranchBase )
1700 {
1701 this.scmBranchBase = scmBranchBase;
1702 }
1703
1704
1705
1706
1707
1708
1709 public void setScmBranchCommitComment( String scmBranchCommitComment )
1710 {
1711 this.scmBranchCommitComment = scmBranchCommitComment;
1712 }
1713
1714
1715
1716
1717
1718
1719 public void setScmCommentPrefix( String ScmCommentPrefix )
1720 {
1721 this.ScmCommentPrefix = ScmCommentPrefix;
1722 }
1723
1724
1725
1726
1727
1728
1729
1730
1731 public void setScmDevelopmentCommitComment( String scmDevelopmentCommitComment )
1732 {
1733 this.scmDevelopmentCommitComment = scmDevelopmentCommitComment;
1734 }
1735
1736
1737
1738
1739
1740
1741
1742 public void setScmId( String scmId )
1743 {
1744 this.scmId = scmId;
1745 }
1746
1747
1748
1749
1750
1751
1752 public void setScmPassword( String scmPassword )
1753 {
1754 this.scmPassword = scmPassword;
1755 }
1756
1757
1758
1759
1760
1761
1762 public void setScmPrivateKey( String scmPrivateKey )
1763 {
1764 this.scmPrivateKey = scmPrivateKey;
1765 }
1766
1767
1768
1769
1770
1771
1772
1773 public void setScmPrivateKeyPassPhrase( String scmPrivateKeyPassPhrase )
1774 {
1775 this.scmPrivateKeyPassPhrase = scmPrivateKeyPassPhrase;
1776 }
1777
1778
1779
1780
1781
1782
1783
1784
1785 public void setScmRelativePathProjectDirectory( String scmRelativePathProjectDirectory )
1786 {
1787 this.scmRelativePathProjectDirectory = scmRelativePathProjectDirectory;
1788 }
1789
1790
1791
1792
1793
1794
1795
1796 public void setScmReleaseCommitComment( String scmReleaseCommitComment )
1797 {
1798 this.scmReleaseCommitComment = scmReleaseCommitComment;
1799 }
1800
1801
1802
1803
1804
1805
1806
1807 public void setScmReleaseLabel( String scmReleaseLabel )
1808 {
1809 this.scmReleaseLabel = scmReleaseLabel;
1810 }
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820 public void setScmReleasedPomRevision( String scmReleasedPomRevision )
1821 {
1822 this.scmReleasedPomRevision = scmReleasedPomRevision;
1823 }
1824
1825
1826
1827
1828
1829
1830
1831 public void setScmRollbackCommitComment( String scmRollbackCommitComment )
1832 {
1833 this.scmRollbackCommitComment = scmRollbackCommitComment;
1834 }
1835
1836
1837
1838
1839
1840
1841
1842
1843 public void setScmShallowClone( boolean scmShallowClone )
1844 {
1845 this.scmShallowClone = scmShallowClone;
1846 }
1847
1848
1849
1850
1851
1852
1853
1854 public void setScmSignTags( boolean scmSignTags )
1855 {
1856 this.scmSignTags = scmSignTags;
1857 }
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867 public void setScmSourceUrl( String scmSourceUrl )
1868 {
1869 this.scmSourceUrl = scmSourceUrl;
1870 }
1871
1872
1873
1874
1875
1876
1877
1878
1879 public void setScmTagBase( String scmTagBase )
1880 {
1881 this.scmTagBase = scmTagBase;
1882 }
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893 public void setScmTagNameFormat( String scmTagNameFormat )
1894 {
1895 this.scmTagNameFormat = scmTagNameFormat;
1896 }
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906 public void setScmUseEditMode( boolean scmUseEditMode )
1907 {
1908 this.scmUseEditMode = scmUseEditMode;
1909 }
1910
1911
1912
1913
1914
1915
1916 public void setScmUsername( String scmUsername )
1917 {
1918 this.scmUsername = scmUsername;
1919 }
1920
1921
1922
1923
1924
1925
1926
1927 public void setSnapshotReleasePluginAllowed( boolean snapshotReleasePluginAllowed )
1928 {
1929 this.snapshotReleasePluginAllowed = snapshotReleasePluginAllowed;
1930 }
1931
1932
1933
1934
1935
1936
1937
1938
1939 public void setSuppressCommitBeforeTagOrBranch( boolean suppressCommitBeforeTagOrBranch )
1940 {
1941 this.suppressCommitBeforeTagOrBranch = suppressCommitBeforeTagOrBranch;
1942 }
1943
1944
1945
1946
1947
1948
1949 public void setUpdateBranchVersions( boolean updateBranchVersions )
1950 {
1951 this.updateBranchVersions = updateBranchVersions;
1952 }
1953
1954
1955
1956
1957
1958
1959
1960 public void setUpdateDependencies( boolean updateDependencies )
1961 {
1962 this.updateDependencies = updateDependencies;
1963 }
1964
1965
1966
1967
1968
1969
1970
1971 public void setUpdateVersionsToSnapshot( boolean updateVersionsToSnapshot )
1972 {
1973 this.updateVersionsToSnapshot = updateVersionsToSnapshot;
1974 }
1975
1976
1977
1978
1979
1980
1981
1982 public void setUpdateWorkingCopyVersions( boolean updateWorkingCopyVersions )
1983 {
1984 this.updateWorkingCopyVersions = updateWorkingCopyVersions;
1985 }
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995 public void setUseReleaseProfile( boolean useReleaseProfile )
1996 {
1997 this.useReleaseProfile = useReleaseProfile;
1998 }
1999
2000
2001
2002
2003
2004
2005
2006 public void setWaitBeforeTagging( int waitBeforeTagging )
2007 {
2008 this.waitBeforeTagging = waitBeforeTagging;
2009 }
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020 public void setWorkItem( String workItem )
2021 {
2022 this.workItem = workItem;
2023 }
2024
2025
2026
2027
2028
2029
2030 public void setWorkingDirectory( String workingDirectory )
2031 {
2032 this.workingDirectory = workingDirectory;
2033 }
2034
2035
2036
2037
2038
2039 private java.util.Map<String, ReleaseStageVersions> resolvedSnapshotDependencies = new java.util.HashMap<>();
2040
2041
2042
2043
2044 private java.util.Map<String, ReleaseStageVersions> projectVersions = new java.util.HashMap<>();
2045
2046
2047
2048
2049 private java.util.Map<String, org.apache.maven.model.Scm> originalScmInfo = new java.util.HashMap<>();
2050
2051
2052 java.util.Map<String, ReleaseStageVersions> getProjectVersions()
2053 {
2054 return projectVersions;
2055 }
2056
2057 java.util.Map<String, org.apache.maven.model.Scm> getOriginalScmInfo()
2058 {
2059 return originalScmInfo;
2060 }
2061
2062
2063
2064
2065
2066
2067 java.util.Map<String, ReleaseStageVersions> getResolvedSnapshotDependencies()
2068 {
2069 return this.resolvedSnapshotDependencies;
2070 }
2071
2072 public String getProjectReleaseVersion( String projectId )
2073 {
2074 if ( projectVersions.containsKey( projectId ) )
2075 {
2076 return projectVersions.get( projectId ).getRelease();
2077 }
2078 return null;
2079 }
2080
2081
2082
2083
2084
2085
2086
2087 public void addReleaseVersion( String projectId, String version )
2088 {
2089 computeIfAbsent( projectVersions, projectId ).setRelease( version );
2090 }
2091
2092 public String getProjectDevelopmentVersion( String projectId )
2093 {
2094 if ( projectVersions.containsKey( projectId ) )
2095 {
2096 return projectVersions.get( projectId ).getDevelopment();
2097 }
2098 return null;
2099 }
2100
2101
2102
2103
2104
2105
2106
2107 public void addDevelopmentVersion( String projectId, String version )
2108 {
2109 computeIfAbsent( projectVersions, projectId ).setDevelopment( version );
2110 }
2111
2112
2113
2114
2115
2116
2117 public org.apache.maven.model.Scm getOriginalScmInfo( String id )
2118 {
2119 return this.originalScmInfo.get( id );
2120 }
2121
2122
2123
2124
2125
2126
2127 public boolean hasOriginalScmInfo( String id )
2128 {
2129 return this.originalScmInfo.containsKey( id );
2130 }
2131
2132
2133
2134
2135
2136
2137
2138 public void addOriginalScmInfo( String key, org.apache.maven.model.Scm value )
2139 {
2140 getOriginalScmInfo().put( key, value );
2141 }
2142
2143 public String getProjectOriginalVersion( String projectId )
2144 {
2145 if ( projectVersions.containsKey( projectId ) )
2146 {
2147 return projectVersions.get( projectId ).getOriginal();
2148 }
2149 return null;
2150 }
2151
2152 public void addOriginalVersion( String projectId, String version )
2153 {
2154 computeIfAbsent( projectVersions, projectId ).setOriginal( version );
2155 }
2156
2157
2158
2159
2160
2161 public String getDependencyDevelopmentVersion( String artifactConflictId )
2162 {
2163 if ( resolvedSnapshotDependencies.containsKey( artifactConflictId ) )
2164 {
2165 ReleaseStageVersions versionMap = resolvedSnapshotDependencies.get( artifactConflictId );
2166 return versionMap.getDevelopment();
2167 }
2168 return null;
2169 }
2170
2171
2172
2173
2174
2175 public String getDependencyReleaseVersion( String artifactConflictId )
2176 {
2177 if ( resolvedSnapshotDependencies.containsKey( artifactConflictId ) )
2178 {
2179 ReleaseStageVersions versionMap = resolvedSnapshotDependencies.get( artifactConflictId );
2180 return versionMap.getRelease();
2181 }
2182 return null;
2183 }
2184
2185
2186
2187
2188
2189 public String getDependencyOriginalVersion( String artifactConflictId )
2190 {
2191 if ( resolvedSnapshotDependencies.containsKey( artifactConflictId ) )
2192 {
2193 ReleaseStageVersions versionMap = resolvedSnapshotDependencies.get( artifactConflictId );
2194 return versionMap.getOriginal();
2195 }
2196 return null;
2197 }
2198
2199 public void addDependencyOriginalVersion( String dependencyKey, String version )
2200 {
2201 computeIfAbsent( resolvedSnapshotDependencies, dependencyKey ).setOriginal( version );
2202 }
2203
2204 public void addDependencyReleaseVersion( String dependencyKey, String version )
2205 {
2206 computeIfAbsent( resolvedSnapshotDependencies, dependencyKey ).setRelease( version );
2207 }
2208
2209 public void addDependencyDevelopmentVersion( String dependencyKey, String version )
2210 {
2211 computeIfAbsent( resolvedSnapshotDependencies, dependencyKey ).setDevelopment( version );
2212 }
2213
2214 private static ReleaseStageVersions computeIfAbsent( java.util.Map<String, ReleaseStageVersions> map, String key )
2215 {
2216 ReleaseStageVersions value = map.get( key );
2217 if ( value == null )
2218 {
2219 value = new ReleaseStageVersions();
2220 map.put( key, value );
2221 }
2222 return value;
2223 }
2224
2225 @Override
2226 public boolean equals( Object obj )
2227 {
2228 if ( this == obj )
2229 {
2230 return true;
2231 }
2232 if ( obj == null || getClass() != obj.getClass() )
2233 {
2234 return false;
2235 }
2236
2237 ModelloReleaseDescriptor that = (ModelloReleaseDescriptor) obj;
2238
2239 if ( updateDependencies != that.isUpdateDependencies() ||
2240 useReleaseProfile != that.isUseReleaseProfile() ||
2241 autoVersionSubmodules != that.isAutoVersionSubmodules() ||
2242 snapshotReleasePluginAllowed != that.isSnapshotReleasePluginAllowed() ||
2243 commitByProject != that.isCommitByProject() ||
2244 branchCreation != that.isBranchCreation() ||
2245 updateBranchVersions != that.isUpdateBranchVersions() ||
2246 updateWorkingCopyVersions != that.isUpdateWorkingCopyVersions() ||
2247 suppressCommitBeforeTagOrBranch != that.isSuppressCommitBeforeTagOrBranch() ||
2248 updateVersionsToSnapshot != that.isUpdateVersionsToSnapshot() ||
2249 allowTimestampedSnapshots != that.isAllowTimestampedSnapshots() ||
2250 remoteTagging != that.isRemoteTagging() ||
2251 pinExternals != that.isPinExternals() ||
2252 localCheckout != that.isLocalCheckout() ||
2253 pushChanges != that.isPushChanges()
2254 )
2255 {
2256 return false;
2257 }
2258
2259 if ( !java.util.Objects.equals( defaultDevelopmentVersion, that.getDefaultDevelopmentVersion() ) ||
2260 !java.util.Objects.equals( scmRelativePathProjectDirectory, that.getScmRelativePathProjectDirectory() ) ||
2261 !java.util.Objects.equals( checkoutDirectory, that.getCheckoutDirectory() ) ||
2262 !java.util.Objects.equals( performGoals, that.getPerformGoals() ) ||
2263 !java.util.Objects.equals( defaultReleaseVersion, that.getDefaultReleaseVersion() ) ||
2264 !java.util.Objects.equals( workItem, that.getWorkItem() ) ||
2265 !java.util.Objects.equals( scmReleasedPomRevision, that.getScmReleasedPomRevision() ) ||
2266 !java.util.Objects.equals( autoResolveSnapshots, that.getAutoResolveSnapshots() )
2267 )
2268 {
2269 return false;
2270 }
2271
2272 if ( addSchema != that.isAddSchema() )
2273 {
2274 return false;
2275 }
2276 if ( generateReleasePoms != that.isGenerateReleasePoms() )
2277 {
2278 return false;
2279 }
2280 if ( interactive != that.isInteractive() )
2281 {
2282 return false;
2283 }
2284 if ( scmUseEditMode != that.isScmUseEditMode() )
2285 {
2286 return false;
2287 }
2288 if ( !java.util.Objects.equals( completedPhase, that.getCompletedPhase() ) )
2289 {
2290 return false;
2291 }
2292 if ( ( checkModificationExcludes == null || ( checkModificationExcludes != null && checkModificationExcludes.size() == 0) ) &&
2293 ( that.getCheckModificationExcludes() == null || ( that.getCheckModificationExcludes() != null && that.getCheckModificationExcludes().size() == 0 ) ) )
2294 {
2295
2296 }
2297 else
2298 {
2299 if ( checkModificationExcludes != null ? !checkModificationExcludes.equals( that.getCheckModificationExcludes() )
2300 : that.getCheckModificationExcludes() != null )
2301 {
2302 return false;
2303 }
2304 }
2305 if ( ( originalScmInfo == null || ( originalScmInfo != null && originalScmInfo.size() == 0 ) ) &&
2306 ( that.getOriginalScmInfo() == null || ( that.getOriginalScmInfo() != null && that.getOriginalScmInfo().size() == 0 ) ) )
2307 {
2308
2309 }
2310 else
2311 {
2312 if ( originalScmInfo != null ? !compareScmCollections( that.getOriginalScmInfo() ) : that.getOriginalScmInfo() != null )
2313 {
2314 return false;
2315 }
2316 }
2317 if ( !java.util.Objects.equals( additionalArguments, that.getAdditionalArguments() ) )
2318 {
2319 return false;
2320 }
2321 if ( !java.util.Objects.equals( preparationGoals, that.getPreparationGoals() ) )
2322 {
2323 return false;
2324 }
2325 if ( !java.util.Objects.equals( completionGoals, that.getCompletionGoals() ) )
2326 {
2327 return false;
2328 }
2329 if ( !java.util.Objects.equals( pomFileName, that.getPomFileName() ) )
2330 {
2331 return false;
2332 }
2333 if ( !java.util.Objects.equals( scmDevelopmentCommitComment, that.getScmDevelopmentCommitComment() ) )
2334 {
2335 return false;
2336 }
2337 if ( !java.util.Objects.equals( scmShallowClone, that.isScmShallowClone() ) )
2338 {
2339 return false;
2340 }
2341 if ( !java.util.Objects.equals( scmReleaseCommitComment, that.getScmReleaseCommitComment() ) )
2342 {
2343 return false;
2344 }
2345 if ( !java.util.Objects.equals( scmBranchCommitComment, that.getScmBranchCommitComment() ) )
2346 {
2347 return false;
2348 }
2349 if ( !java.util.Objects.equals( scmRollbackCommitComment, that.getScmRollbackCommitComment() ) )
2350 {
2351 return false;
2352 }
2353 if ( !java.util.Objects.equals( scmPrivateKeyPassPhrase, that.getScmPrivateKeyPassPhrase() ) )
2354 {
2355 return false;
2356 }
2357 if ( !java.util.Objects.equals( scmPassword, that.getScmPassword() ) )
2358 {
2359 return false;
2360 }
2361 if ( !java.util.Objects.equals( scmPrivateKey, that.getScmPrivateKey() ) )
2362 {
2363 return false;
2364 }
2365 if ( !java.util.Objects.equals( scmReleaseLabel, that.getScmReleaseLabel() ) )
2366 {
2367 return false;
2368 }
2369 if ( !java.util.Objects.equals( scmTagBase, that.getScmTagBase() ) )
2370 {
2371 return false;
2372 }
2373 if ( !java.util.Objects.equals( scmBranchBase, that.getScmBranchBase() ) )
2374 {
2375 return false;
2376 }
2377 if ( !java.util.Objects.equals( scmId, that.getScmId() ) )
2378 {
2379 return false;
2380 }
2381 if ( !java.util.Objects.equals( scmSourceUrl, that.getScmSourceUrl() ) )
2382 {
2383 return false;
2384 }
2385 if ( !java.util.Objects.equals( scmUsername, that.getScmUsername() ) )
2386 {
2387 return false;
2388 }
2389 if ( !java.util.Objects.equals( workingDirectory, that.getWorkingDirectory() ) )
2390 {
2391 return false;
2392 }
2393 if ( !java.util.Objects.equals( scmTagNameFormat, that.getScmTagNameFormat() ) )
2394 {
2395 return false;
2396 }
2397 if ( !java.util.Objects.deepEquals( projectVersions, that.getProjectVersions() ) )
2398 {
2399 return false;
2400 }
2401
2402 return true;
2403 }
2404
2405 private boolean compareScmCollections( java.util.Map<String, org.apache.maven.model.Scm> that )
2406 {
2407
2408 if ( that == null && originalScmInfo == null )
2409 {
2410 return true;
2411 }
2412
2413 if ( ( that == null && originalScmInfo != null ) || ( that != null && originalScmInfo == null ) )
2414 {
2415 return false;
2416 }
2417
2418 if ( that.size() != originalScmInfo.size() )
2419 {
2420 return false;
2421 }
2422
2423 for ( java.util.Iterator<java.util.Map.Entry<String, org.apache.maven.model.Scm>> i = originalScmInfo.entrySet().iterator(); i.hasNext(); )
2424 {
2425 java.util.Map.Entry<String, org.apache.maven.model.Scm> entry = i.next();
2426
2427 org.apache.maven.model.Scm thatScm = that.get( entry.getKey() );
2428
2429 org.apache.maven.model.Scm thisScm = entry.getValue();
2430 if ( thatScm == null && thisScm == null )
2431 {
2432 return true;
2433 }
2434 else if ( thatScm == null )
2435 {
2436 return false;
2437 }
2438 else if ( thisScm == null )
2439 {
2440 return true;
2441 }
2442
2443 if ( thisScm.getConnection() != null ? !thisScm.getConnection().equals( thatScm.getConnection() )
2444 : thatScm.getConnection() != null )
2445 {
2446 return false;
2447 }
2448 if ( thisScm.getDeveloperConnection() != null ? !thisScm.getDeveloperConnection().equals(
2449 thatScm.getDeveloperConnection() ) : thatScm.getDeveloperConnection() != null )
2450 {
2451 return false;
2452 }
2453 if ( thisScm.getUrl() != null ? !thisScm.getUrl().equals( thatScm.getUrl() ) : thatScm.getUrl() != null )
2454 {
2455 return false;
2456 }
2457 if ( thisScm.getTag() != null ? !thisScm.getTag().equals( thatScm.getTag() ) : thatScm.getTag() != null )
2458 {
2459 return false;
2460 }
2461
2462 if ( thisScm instanceof org.apache.maven.shared.release.scm.IdentifiedScm && thatScm instanceof org.apache.maven.shared.release.scm.IdentifiedScm )
2463 {
2464 org.apache.maven.shared.release.scm.IdentifiedScm thisIdentifiedScm = (org.apache.maven.shared.release.scm.IdentifiedScm) thisScm;
2465 org.apache.maven.shared.release.scm.IdentifiedScm thatIdentifiedScm = (org.apache.maven.shared.release.scm.IdentifiedScm) thatScm;
2466 if ( thisIdentifiedScm.getId() != null ? !thisIdentifiedScm.getId().equals( thatIdentifiedScm.getId() ) : thatIdentifiedScm.getId() != null )
2467 {
2468 return false;
2469 }
2470 }
2471 }
2472
2473 return true;
2474 }
2475
2476 @Override
2477 public int hashCode()
2478 {
2479 int result = java.util.Objects.hashCode( completedPhase );
2480 result = 29 * result + java.util.Objects.hashCode( scmReleaseLabel );
2481 result = 29 * result + java.util.Objects.hashCode( additionalArguments );
2482 result = 29 * result + java.util.Objects.hashCode( preparationGoals );
2483 result = 29 * result + java.util.Objects.hashCode( completionGoals );
2484 result = 29 * result + java.util.Objects.hashCode( pomFileName );
2485 result = 29 * result + java.util.Objects.hashCode( checkModificationExcludes );
2486 result = 29 * result + java.util.Objects.hashCode( scmDevelopmentCommitComment );
2487 result = 29 * result + java.util.Objects.hashCode( scmShallowClone );
2488 result = 29 * result + java.util.Objects.hashCode( scmReleaseCommitComment );
2489 result = 29 * result + java.util.Objects.hashCode( scmBranchCommitComment );
2490 result = 29 * result + java.util.Objects.hashCode( scmRollbackCommitComment );
2491 result = 29 * result + java.util.Objects.hashCode( scmTagBase );
2492 result = 29 * result + java.util.Objects.hashCode( scmBranchBase );
2493 result = 29 * result + java.util.Objects.hashCode( scmUsername );
2494 result = 29 * result + java.util.Objects.hashCode( scmPassword );
2495 result = 29 * result + java.util.Objects.hashCode( scmId );
2496 result = 29 * result + java.util.Objects.hashCode( scmSourceUrl );
2497 result = 29 * result + java.util.Objects.hashCode( scmPrivateKey );
2498 result = 29 * result + java.util.Objects.hashCode( scmPrivateKeyPassPhrase );
2499 result = 29 * result + java.util.Objects.hashCode( workingDirectory );
2500 result = 29 * result + java.util.Objects.hashCode( scmUseEditMode );
2501 result = 29 * result + java.util.Objects.hashCode( addSchema );
2502 result = 29 * result + java.util.Objects.hashCode( generateReleasePoms );
2503 result = 29 * result + java.util.Objects.hashCode( interactive );
2504 result = 29 * result + java.util.Objects.hashCode( projectVersions );
2505 result = 29 * result + java.util.Objects.hashCode( originalScmInfo );
2506 result = 29 * result + java.util.Objects.hashCode( updateDependencies );
2507 result = 29 * result + java.util.Objects.hashCode( useReleaseProfile );
2508 result = 29 * result + java.util.Objects.hashCode( autoVersionSubmodules );
2509 result = 29 * result + java.util.Objects.hashCode( snapshotReleasePluginAllowed );
2510 result = 29 * result + java.util.Objects.hashCode( commitByProject );
2511 result = 29 * result + java.util.Objects.hashCode( branchCreation );
2512 result = 29 * result + java.util.Objects.hashCode( updateBranchVersions );
2513 result = 29 * result + java.util.Objects.hashCode( updateWorkingCopyVersions );
2514 result = 29 * result + java.util.Objects.hashCode( suppressCommitBeforeTagOrBranch );
2515 result = 29 * result + java.util.Objects.hashCode( updateVersionsToSnapshot );
2516 result = 29 * result + java.util.Objects.hashCode( allowTimestampedSnapshots );
2517 result = 29 * result + java.util.Objects.hashCode( remoteTagging );
2518 result = 29 * result + java.util.Objects.hashCode( localCheckout );
2519 result = 29 * result + java.util.Objects.hashCode( pushChanges );
2520 result = 29 * result + java.util.Objects.hashCode( defaultDevelopmentVersion );
2521 result = 29 * result + java.util.Objects.hashCode( scmRelativePathProjectDirectory );
2522 result = 29 * result + java.util.Objects.hashCode( checkoutDirectory );
2523 result = 29 * result + java.util.Objects.hashCode( performGoals );
2524 result = 29 * result + java.util.Objects.hashCode( defaultReleaseVersion );
2525 result = 29 * result + java.util.Objects.hashCode( scmReleasedPomRevision );
2526 result = 29 * result + java.util.Objects.hashCode( workItem );
2527 result = 29 * result + java.util.Objects.hashCode( autoResolveSnapshots );
2528 result = 29 * result + java.util.Objects.hashCode( pinExternals );
2529
2530 return result;
2531 }
2532
2533 }