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