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 ReleaseDescriptor
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 String scmSourceUrl;
52
53
54
55
56
57
58
59
60 private String scmTagBase;
61
62
63
64
65
66
67
68
69 private String scmBranchBase;
70
71
72
73
74
75
76
77
78 private String scmReleaseLabel;
79
80
81
82
83
84
85
86 private String scmId;
87
88
89
90
91
92
93 private String scmUsername;
94
95
96
97
98
99
100
101 private String scmPassword;
102
103
104
105
106
107
108 private String scmPrivateKey;
109
110
111
112
113
114
115 private String scmPrivateKeyPassPhrase;
116
117
118
119
120
121
122
123
124
125 private boolean scmUseEditMode = false;
126
127
128
129
130
131
132
133 private String scmRelativePathProjectDirectory;
134
135
136
137
138 private java.util.Map releaseVersions;
139
140
141
142
143 private java.util.Map developmentVersions;
144
145
146
147
148 private java.util.Map resolvedSnapshotDependencies;
149
150
151
152
153
154
155
156 private boolean updateDependencies = true;
157
158
159
160
161
162
163
164
165
166
167 private boolean useReleaseProfile = true;
168
169
170
171
172 private java.util.Map originalScmInfo;
173
174
175
176
177
178
179 private String workingDirectory;
180
181
182
183
184
185
186 private String checkoutDirectory;
187
188
189
190
191
192
193 private String completedPhase;
194
195
196
197
198
199
200
201
202
203 private boolean addSchema = false;
204
205
206
207
208
209
210 private boolean generateReleasePoms = false;
211
212
213
214
215
216
217
218 private boolean autoVersionSubmodules = false;
219
220
221
222
223
224
225
226
227
228 private boolean interactive = true;
229
230
231
232
233
234
235
236 private boolean snapshotReleasePluginAllowed = false;
237
238
239
240
241
242
243
244 private String additionalArguments;
245
246
247
248
249
250
251
252 private String pomFileName;
253
254
255
256
257 private java.util.List<String> checkModificationExcludes;
258
259
260
261
262
263
264
265 private String preparationGoals;
266
267
268
269
270
271
272
273 private String completionGoals;
274
275
276
277
278
279
280
281 private String performGoals;
282
283
284
285
286
287
288
289 private boolean commitByProject = false;
290
291
292
293
294
295
296
297 private boolean branchCreation = false;
298
299
300
301
302
303
304 private boolean updateBranchVersions = false;
305
306
307
308
309
310
311 private boolean updateWorkingCopyVersions = true;
312
313
314
315
316
317
318 private boolean updateVersionsToSnapshot = false;
319
320
321
322
323
324
325
326 private boolean suppressCommitBeforeTagOrBranch = false;
327
328
329
330
331
332
333
334 private int waitBeforeTagging = 0;
335
336
337
338
339
340
341
342
343 private boolean allowTimestampedSnapshots = false;
344
345
346
347
348
349
350
351 private String defaultReleaseVersion;
352
353
354
355
356
357
358 private String defaultDevelopmentVersion;
359
360
361
362
363
364
365
366 private String projectVersionPolicyId = "default";
367
368
369
370
371
372
373
374
375
376 private boolean remoteTagging = false;
377
378
379
380
381
382
383
384
385
386 private String scmReleasedPomRevision;
387
388
389
390
391
392
393
394
395
396
397
398
399 private boolean pushChanges = true;
400
401
402
403
404
405
406
407
408
409
410
411 private boolean localCheckout = false;
412
413
414
415
416
417
418
419
420
421
422 private String scmTagNameFormat;
423
424
425
426
427 private String modelEncoding = "UTF-8";
428
429
430
431
432
433
434
435
436
437
438
439 public void addCheckModificationExclude( String string )
440 {
441 getCheckModificationExcludes().add( string );
442 }
443
444
445
446
447
448
449
450 public void addDevelopmentVersion( Object key, String value )
451 {
452 getDevelopmentVersions().put( key, value );
453 }
454
455
456
457
458
459
460
461 public void addOriginalScmInfo( Object key, String value )
462 {
463 getOriginalScmInfo().put( key, value );
464 }
465
466
467
468
469
470
471
472 public void addReleaseVersion( Object key, String value )
473 {
474 getReleaseVersions().put( key, value );
475 }
476
477
478
479
480
481
482
483 public void addResolvedSnapshotDependency( Object key, String value )
484 {
485 getResolvedSnapshotDependencies().put( key, value );
486 }
487
488
489
490
491
492
493
494 public String getAdditionalArguments()
495 {
496 return this.additionalArguments;
497 }
498
499
500
501
502
503
504 public java.util.List<String> getCheckModificationExcludes()
505 {
506 if ( this.checkModificationExcludes == null )
507 {
508 this.checkModificationExcludes = new java.util.ArrayList<String>();
509 }
510
511 return this.checkModificationExcludes;
512 }
513
514
515
516
517
518
519 public String getCheckoutDirectory()
520 {
521 return this.checkoutDirectory;
522 }
523
524
525
526
527
528
529 public String getCompletedPhase()
530 {
531 return this.completedPhase;
532 }
533
534
535
536
537
538
539
540 public String getCompletionGoals()
541 {
542 return this.completionGoals;
543 }
544
545
546
547
548
549
550 public String getDefaultDevelopmentVersion()
551 {
552 return this.defaultDevelopmentVersion;
553 }
554
555
556
557
558
559
560
561 public String getDefaultReleaseVersion()
562 {
563 return this.defaultReleaseVersion;
564 }
565
566
567
568
569
570
571 public String getDescription()
572 {
573 return this.description;
574 }
575
576
577
578
579
580
581 public java.util.Map getDevelopmentVersions()
582 {
583 if ( this.developmentVersions == null )
584 {
585 this.developmentVersions = new java.util.HashMap();
586 }
587
588 return this.developmentVersions;
589 }
590
591
592
593
594
595
596 public String getModelEncoding()
597 {
598 return this.modelEncoding;
599 }
600
601
602
603
604
605
606 public String getName()
607 {
608 return this.name;
609 }
610
611
612
613
614
615
616 public java.util.Map getOriginalScmInfo()
617 {
618 if ( this.originalScmInfo == null )
619 {
620 this.originalScmInfo = new java.util.HashMap();
621 }
622
623 return this.originalScmInfo;
624 }
625
626
627
628
629
630
631 public String getPerformGoals()
632 {
633 return this.performGoals;
634 }
635
636
637
638
639
640
641
642 public String getPomFileName()
643 {
644 return this.pomFileName;
645 }
646
647
648
649
650
651
652 public String getPreparationGoals()
653 {
654 return this.preparationGoals;
655 }
656
657
658
659
660
661
662
663 public String getProjectVersionPolicyId()
664 {
665 return this.projectVersionPolicyId;
666 }
667
668
669
670
671
672
673 public java.util.Map getReleaseVersions()
674 {
675 if ( this.releaseVersions == null )
676 {
677 this.releaseVersions = new java.util.HashMap();
678 }
679
680 return this.releaseVersions;
681 }
682
683
684
685
686
687
688 public java.util.Map getResolvedSnapshotDependencies()
689 {
690 if ( this.resolvedSnapshotDependencies == null )
691 {
692 this.resolvedSnapshotDependencies = new java.util.HashMap();
693 }
694
695 return this.resolvedSnapshotDependencies;
696 }
697
698
699
700
701
702
703
704
705 public String getScmBranchBase()
706 {
707 return this.scmBranchBase;
708 }
709
710
711
712
713
714
715 public String getScmCommentPrefix()
716 {
717 return this.ScmCommentPrefix;
718 }
719
720
721
722
723
724
725
726 public String getScmId()
727 {
728 return this.scmId;
729 }
730
731
732
733
734
735
736 public String getScmPassword()
737 {
738 return this.scmPassword;
739 }
740
741
742
743
744
745
746 public String getScmPrivateKey()
747 {
748 return this.scmPrivateKey;
749 }
750
751
752
753
754
755
756 public String getScmPrivateKeyPassPhrase()
757 {
758 return this.scmPrivateKeyPassPhrase;
759 }
760
761
762
763
764
765
766
767 public String getScmRelativePathProjectDirectory()
768 {
769 return this.scmRelativePathProjectDirectory;
770 }
771
772
773
774
775
776
777
778 public String getScmReleaseLabel()
779 {
780 return this.scmReleaseLabel;
781 }
782
783
784
785
786
787
788
789
790
791 public String getScmReleasedPomRevision()
792 {
793 return this.scmReleasedPomRevision;
794 }
795
796
797
798
799
800
801
802
803
804 public String getScmSourceUrl()
805 {
806 return this.scmSourceUrl;
807 }
808
809
810
811
812
813
814
815
816 public String getScmTagBase()
817 {
818 return this.scmTagBase;
819 }
820
821
822
823
824
825
826
827
828
829
830 public String getScmTagNameFormat()
831 {
832 return this.scmTagNameFormat;
833 }
834
835
836
837
838
839
840 public String getScmUsername()
841 {
842 return this.scmUsername;
843 }
844
845
846
847
848
849
850
851 public int getWaitBeforeTagging()
852 {
853 return this.waitBeforeTagging;
854 }
855
856
857
858
859
860
861 public String getWorkingDirectory()
862 {
863 return this.workingDirectory;
864 }
865
866
867
868
869
870
871
872
873
874 public boolean isAddSchema()
875 {
876 return this.addSchema;
877 }
878
879
880
881
882
883
884
885
886 public boolean isAllowTimestampedSnapshots()
887 {
888 return this.allowTimestampedSnapshots;
889 }
890
891
892
893
894
895
896
897 public boolean isAutoVersionSubmodules()
898 {
899 return this.autoVersionSubmodules;
900 }
901
902
903
904
905
906
907 public boolean isBranchCreation()
908 {
909 return this.branchCreation;
910 }
911
912
913
914
915
916
917
918 public boolean isCommitByProject()
919 {
920 return this.commitByProject;
921 }
922
923
924
925
926
927
928 public boolean isGenerateReleasePoms()
929 {
930 return this.generateReleasePoms;
931 }
932
933
934
935
936
937
938
939
940
941 public boolean isInteractive()
942 {
943 return this.interactive;
944 }
945
946
947
948
949
950
951
952
953
954
955
956 public boolean isLocalCheckout()
957 {
958 return this.localCheckout;
959 }
960
961
962
963
964
965
966
967
968
969
970
971
972 public boolean isPushChanges()
973 {
974 return this.pushChanges;
975 }
976
977
978
979
980
981
982
983
984 public boolean isRemoteTagging()
985 {
986 return this.remoteTagging;
987 }
988
989
990
991
992
993
994
995
996
997 public boolean isScmUseEditMode()
998 {
999 return this.scmUseEditMode;
1000 }
1001
1002
1003
1004
1005
1006
1007 public boolean isSnapshotReleasePluginAllowed()
1008 {
1009 return this.snapshotReleasePluginAllowed;
1010 }
1011
1012
1013
1014
1015
1016
1017
1018 public boolean isSuppressCommitBeforeTagOrBranch()
1019 {
1020 return this.suppressCommitBeforeTagOrBranch;
1021 }
1022
1023
1024
1025
1026
1027
1028 public boolean isUpdateBranchVersions()
1029 {
1030 return this.updateBranchVersions;
1031 }
1032
1033
1034
1035
1036
1037
1038
1039 public boolean isUpdateDependencies()
1040 {
1041 return this.updateDependencies;
1042 }
1043
1044
1045
1046
1047
1048
1049 public boolean isUpdateVersionsToSnapshot()
1050 {
1051 return this.updateVersionsToSnapshot;
1052 }
1053
1054
1055
1056
1057
1058
1059 public boolean isUpdateWorkingCopyVersions()
1060 {
1061 return this.updateWorkingCopyVersions;
1062 }
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072 public boolean isUseReleaseProfile()
1073 {
1074 return this.useReleaseProfile;
1075 }
1076
1077
1078
1079
1080
1081
1082 public void removeCheckModificationExclude( String string )
1083 {
1084 getCheckModificationExcludes().remove( string );
1085 }
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095 public void setAddSchema( boolean addSchema )
1096 {
1097 this.addSchema = addSchema;
1098 }
1099
1100
1101
1102
1103
1104
1105
1106 public void setAdditionalArguments( String additionalArguments )
1107 {
1108 this.additionalArguments = additionalArguments;
1109 }
1110
1111
1112
1113
1114
1115
1116
1117
1118 public void setAllowTimestampedSnapshots( boolean allowTimestampedSnapshots )
1119 {
1120 this.allowTimestampedSnapshots = allowTimestampedSnapshots;
1121 }
1122
1123
1124
1125
1126
1127
1128
1129 public void setAutoVersionSubmodules( boolean autoVersionSubmodules )
1130 {
1131 this.autoVersionSubmodules = autoVersionSubmodules;
1132 }
1133
1134
1135
1136
1137
1138
1139 public void setBranchCreation( boolean branchCreation )
1140 {
1141 this.branchCreation = branchCreation;
1142 }
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152 public void setCheckModificationExcludes( java.util.List<String> checkModificationExcludes )
1153 {
1154 this.checkModificationExcludes = checkModificationExcludes;
1155 }
1156
1157
1158
1159
1160
1161
1162 public void setCheckoutDirectory( String checkoutDirectory )
1163 {
1164 this.checkoutDirectory = checkoutDirectory;
1165 }
1166
1167
1168
1169
1170
1171
1172
1173 public void setCommitByProject( boolean commitByProject )
1174 {
1175 this.commitByProject = commitByProject;
1176 }
1177
1178
1179
1180
1181
1182
1183 public void setCompletedPhase( String completedPhase )
1184 {
1185 this.completedPhase = completedPhase;
1186 }
1187
1188
1189
1190
1191
1192
1193
1194 public void setCompletionGoals( String completionGoals )
1195 {
1196 this.completionGoals = completionGoals;
1197 }
1198
1199
1200
1201
1202
1203
1204 public void setDefaultDevelopmentVersion( String defaultDevelopmentVersion )
1205 {
1206 this.defaultDevelopmentVersion = defaultDevelopmentVersion;
1207 }
1208
1209
1210
1211
1212
1213
1214
1215 public void setDefaultReleaseVersion( String defaultReleaseVersion )
1216 {
1217 this.defaultReleaseVersion = defaultReleaseVersion;
1218 }
1219
1220
1221
1222
1223
1224
1225 public void setDescription( String description )
1226 {
1227 this.description = description;
1228 }
1229
1230
1231
1232
1233
1234
1235
1236 public void setDevelopmentVersions( java.util.Map developmentVersions )
1237 {
1238 this.developmentVersions = developmentVersions;
1239 }
1240
1241
1242
1243
1244
1245
1246 public void setGenerateReleasePoms( boolean generateReleasePoms )
1247 {
1248 this.generateReleasePoms = generateReleasePoms;
1249 }
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259 public void setInteractive( boolean interactive )
1260 {
1261 this.interactive = interactive;
1262 }
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274 public void setLocalCheckout( boolean localCheckout )
1275 {
1276 this.localCheckout = localCheckout;
1277 }
1278
1279
1280
1281
1282
1283
1284 public void setModelEncoding( String modelEncoding )
1285 {
1286 this.modelEncoding = modelEncoding;
1287 }
1288
1289
1290
1291
1292
1293
1294 public void setName( String name )
1295 {
1296 this.name = name;
1297 }
1298
1299
1300
1301
1302
1303
1304 public void setOriginalScmInfo( java.util.Map originalScmInfo )
1305 {
1306 this.originalScmInfo = originalScmInfo;
1307 }
1308
1309
1310
1311
1312
1313
1314 public void setPerformGoals( String performGoals )
1315 {
1316 this.performGoals = performGoals;
1317 }
1318
1319
1320
1321
1322
1323
1324
1325 public void setPomFileName( String pomFileName )
1326 {
1327 this.pomFileName = pomFileName;
1328 }
1329
1330
1331
1332
1333
1334
1335 public void setPreparationGoals( String preparationGoals )
1336 {
1337 this.preparationGoals = preparationGoals;
1338 }
1339
1340
1341
1342
1343
1344
1345
1346 public void setProjectVersionPolicyId( String projectVersionPolicyId )
1347 {
1348 this.projectVersionPolicyId = projectVersionPolicyId;
1349 }
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362 public void setPushChanges( boolean pushChanges )
1363 {
1364 this.pushChanges = pushChanges;
1365 }
1366
1367
1368
1369
1370
1371
1372
1373 public void setReleaseVersions( java.util.Map releaseVersions )
1374 {
1375 this.releaseVersions = releaseVersions;
1376 }
1377
1378
1379
1380
1381
1382
1383
1384
1385 public void setRemoteTagging( boolean remoteTagging )
1386 {
1387 this.remoteTagging = remoteTagging;
1388 }
1389
1390
1391
1392
1393
1394
1395 public void setResolvedSnapshotDependencies( java.util.Map resolvedSnapshotDependencies )
1396 {
1397 this.resolvedSnapshotDependencies = resolvedSnapshotDependencies;
1398 }
1399
1400
1401
1402
1403
1404
1405
1406
1407 public void setScmBranchBase( String scmBranchBase )
1408 {
1409 this.scmBranchBase = scmBranchBase;
1410 }
1411
1412
1413
1414
1415
1416
1417 public void setScmCommentPrefix( String ScmCommentPrefix )
1418 {
1419 this.ScmCommentPrefix = ScmCommentPrefix;
1420 }
1421
1422
1423
1424
1425
1426
1427
1428 public void setScmId( String scmId )
1429 {
1430 this.scmId = scmId;
1431 }
1432
1433
1434
1435
1436
1437
1438 public void setScmPassword( String scmPassword )
1439 {
1440 this.scmPassword = scmPassword;
1441 }
1442
1443
1444
1445
1446
1447
1448 public void setScmPrivateKey( String scmPrivateKey )
1449 {
1450 this.scmPrivateKey = scmPrivateKey;
1451 }
1452
1453
1454
1455
1456
1457
1458 public void setScmPrivateKeyPassPhrase( String scmPrivateKeyPassPhrase )
1459 {
1460 this.scmPrivateKeyPassPhrase = scmPrivateKeyPassPhrase;
1461 }
1462
1463
1464
1465
1466
1467
1468
1469 public void setScmRelativePathProjectDirectory( String scmRelativePathProjectDirectory )
1470 {
1471 this.scmRelativePathProjectDirectory = scmRelativePathProjectDirectory;
1472 }
1473
1474
1475
1476
1477
1478
1479
1480 public void setScmReleaseLabel( String scmReleaseLabel )
1481 {
1482 this.scmReleaseLabel = scmReleaseLabel;
1483 }
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493 public void setScmReleasedPomRevision( String scmReleasedPomRevision )
1494 {
1495 this.scmReleasedPomRevision = scmReleasedPomRevision;
1496 }
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506 public void setScmSourceUrl( String scmSourceUrl )
1507 {
1508 this.scmSourceUrl = scmSourceUrl;
1509 }
1510
1511
1512
1513
1514
1515
1516
1517
1518 public void setScmTagBase( String scmTagBase )
1519 {
1520 this.scmTagBase = scmTagBase;
1521 }
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532 public void setScmTagNameFormat( String scmTagNameFormat )
1533 {
1534 this.scmTagNameFormat = scmTagNameFormat;
1535 }
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545 public void setScmUseEditMode( boolean scmUseEditMode )
1546 {
1547 this.scmUseEditMode = scmUseEditMode;
1548 }
1549
1550
1551
1552
1553
1554
1555 public void setScmUsername( String scmUsername )
1556 {
1557 this.scmUsername = scmUsername;
1558 }
1559
1560
1561
1562
1563
1564
1565 public void setSnapshotReleasePluginAllowed( boolean snapshotReleasePluginAllowed )
1566 {
1567 this.snapshotReleasePluginAllowed = snapshotReleasePluginAllowed;
1568 }
1569
1570
1571
1572
1573
1574
1575
1576 public void setSuppressCommitBeforeTagOrBranch( boolean suppressCommitBeforeTagOrBranch )
1577 {
1578 this.suppressCommitBeforeTagOrBranch = suppressCommitBeforeTagOrBranch;
1579 }
1580
1581
1582
1583
1584
1585
1586 public void setUpdateBranchVersions( boolean updateBranchVersions )
1587 {
1588 this.updateBranchVersions = updateBranchVersions;
1589 }
1590
1591
1592
1593
1594
1595
1596
1597 public void setUpdateDependencies( boolean updateDependencies )
1598 {
1599 this.updateDependencies = updateDependencies;
1600 }
1601
1602
1603
1604
1605
1606
1607 public void setUpdateVersionsToSnapshot( boolean updateVersionsToSnapshot )
1608 {
1609 this.updateVersionsToSnapshot = updateVersionsToSnapshot;
1610 }
1611
1612
1613
1614
1615
1616
1617 public void setUpdateWorkingCopyVersions( boolean updateWorkingCopyVersions )
1618 {
1619 this.updateWorkingCopyVersions = updateWorkingCopyVersions;
1620 }
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630 public void setUseReleaseProfile( boolean useReleaseProfile )
1631 {
1632 this.useReleaseProfile = useReleaseProfile;
1633 }
1634
1635
1636
1637
1638
1639
1640
1641 public void setWaitBeforeTagging( int waitBeforeTagging )
1642 {
1643 this.waitBeforeTagging = waitBeforeTagging;
1644 }
1645
1646
1647
1648
1649
1650
1651 public void setWorkingDirectory( String workingDirectory )
1652 {
1653 this.workingDirectory = workingDirectory;
1654 }
1655
1656
1657 public static final String DEVELOPMENT_KEY = "dev";
1658
1659 public static final String RELEASE_KEY = "rel";
1660
1661 public static final String ORIGINAL_VERSION = "original";
1662
1663
1664
1665
1666
1667 public void mapResolvedSnapshotDependencies( String artifactName, String releaseVersion, String developmentVersion )
1668 {
1669 if ( resolvedSnapshotDependencies == null )
1670 {
1671 resolvedSnapshotDependencies = new java.util.HashMap();
1672 }
1673 else
1674 {
1675 assert !resolvedSnapshotDependencies.containsKey( artifactName );
1676 }
1677
1678 java.util.Map versionsMap = new java.util.HashMap();
1679
1680 versionsMap.put( DEVELOPMENT_KEY, developmentVersion );
1681 versionsMap.put( RELEASE_KEY, releaseVersion );
1682 resolvedSnapshotDependencies.put( artifactName, versionsMap );
1683 }
1684
1685
1686
1687
1688
1689
1690
1691 public void mapReleaseVersion( String projectId, String nextVersion )
1692 {
1693 if ( releaseVersions == null )
1694 {
1695 releaseVersions = new java.util.HashMap();
1696 }
1697
1698 releaseVersions.put( projectId, nextVersion );
1699 }
1700
1701
1702
1703
1704
1705
1706
1707 public void mapDevelopmentVersion( String projectId, String nextVersion )
1708 {
1709 if ( developmentVersions == null )
1710 {
1711 developmentVersions = new java.util.HashMap();
1712 }
1713
1714 developmentVersions.put( projectId, nextVersion );
1715 }
1716
1717
1718
1719
1720
1721
1722
1723 public void mapOriginalScmInfo( String projectId, org.apache.maven.model.Scm scm )
1724 {
1725 if ( originalScmInfo == null )
1726 {
1727 originalScmInfo = new java.util.HashMap();
1728 }
1729 else
1730 {
1731 assert !originalScmInfo.containsKey( projectId );
1732 }
1733
1734 originalScmInfo.put( projectId, scm );
1735 }
1736
1737
1738
1739
1740 private java.util.Map originalVersions;
1741
1742
1743
1744
1745
1746
1747
1748
1749 public synchronized java.util.Map<String, String> getOriginalVersions( java.util.List<org.apache.maven.project.MavenProject> reactorProjects )
1750 {
1751 if ( originalVersions == null )
1752 {
1753 originalVersions = new java.util.HashMap();
1754 for ( org.apache.maven.project.MavenProject project : reactorProjects )
1755 {
1756 originalVersions.put( org.apache.maven.artifact.ArtifactUtils.versionlessKey( project.getGroupId(),
1757 project.getArtifactId() ), project.getVersion() );
1758 }
1759 }
1760 return originalVersions;
1761 }
1762
1763
1764
1765
1766
1767 public String getDependencyDevelopmentVersion( String artifactConflictId )
1768 {
1769 if ( ( resolvedSnapshotDependencies == null ) && ( resolvedSnapshotDependencies.containsKey( artifactConflictId ) ) )
1770 {
1771 java.util.Map versionMap = ( java.util.Map ) resolvedSnapshotDependencies.get( artifactConflictId );
1772 return ( String ) versionMap.get( DEVELOPMENT_KEY );
1773 }
1774 return null;
1775 }
1776
1777
1778
1779
1780
1781 public String getDependencyReleaseVersion( String artifactConflictId )
1782 {
1783 if ( ( resolvedSnapshotDependencies == null ) && ( resolvedSnapshotDependencies.containsKey( artifactConflictId ) ) )
1784 {
1785 java.util.Map versionMap = ( java.util.Map ) resolvedSnapshotDependencies.get( artifactConflictId );
1786 return ( String ) versionMap.get( RELEASE_KEY );
1787 }
1788 return null;
1789 }
1790
1791 boolean safeEquals( String a, String b )
1792 {
1793 return a != null ? a.equals( b ) : b == null;
1794 }
1795
1796 public boolean equals( Object obj )
1797 {
1798 if ( this == obj )
1799 {
1800 return true;
1801 }
1802 if ( obj == null || getClass() != obj.getClass() )
1803 {
1804 return false;
1805 }
1806
1807 ReleaseDescriptor that = (ReleaseDescriptor) obj;
1808
1809 if ( updateDependencies != that.updateDependencies ||
1810 useReleaseProfile != that.useReleaseProfile ||
1811 autoVersionSubmodules != that.autoVersionSubmodules ||
1812 snapshotReleasePluginAllowed != that.snapshotReleasePluginAllowed ||
1813 commitByProject != that.commitByProject ||
1814 branchCreation != that.branchCreation ||
1815 updateBranchVersions != that.updateBranchVersions ||
1816 updateWorkingCopyVersions != that.updateWorkingCopyVersions||
1817 suppressCommitBeforeTagOrBranch != that.suppressCommitBeforeTagOrBranch ||
1818 updateVersionsToSnapshot != that.updateVersionsToSnapshot ||
1819 allowTimestampedSnapshots != that.allowTimestampedSnapshots||
1820 remoteTagging != that.remoteTagging ||
1821 localCheckout != that.localCheckout ||
1822 pushChanges != that.pushChanges
1823 )
1824 {
1825 return false;
1826 }
1827
1828 if ( !safeEquals( defaultDevelopmentVersion, that.defaultDevelopmentVersion ) ||
1829 !safeEquals( scmRelativePathProjectDirectory, that.scmRelativePathProjectDirectory ) ||
1830 !safeEquals( checkoutDirectory, that.checkoutDirectory ) ||
1831 !safeEquals( performGoals, that.performGoals ) ||
1832 !safeEquals( defaultReleaseVersion, that.defaultReleaseVersion ) ||
1833 !safeEquals( scmReleasedPomRevision, that.scmReleasedPomRevision )
1834 )
1835 {
1836 return false;
1837 }
1838
1839 if ( addSchema != that.addSchema )
1840 {
1841 return false;
1842 }
1843 if ( generateReleasePoms != that.generateReleasePoms )
1844 {
1845 return false;
1846 }
1847 if ( interactive != that.interactive )
1848 {
1849 return false;
1850 }
1851 if ( scmUseEditMode != that.scmUseEditMode )
1852 {
1853 return false;
1854 }
1855 if ( !safeEquals( completedPhase, that.completedPhase ) )
1856 {
1857 return false;
1858 }
1859 if ( ( checkModificationExcludes == null || ( checkModificationExcludes != null && checkModificationExcludes.size() == 0) ) &&
1860 ( that.checkModificationExcludes == null || ( that.checkModificationExcludes != null && that.checkModificationExcludes.size() == 0) ) )
1861 {
1862
1863 }
1864 else
1865 {
1866 if ( checkModificationExcludes != null ? !checkModificationExcludes.equals( that.checkModificationExcludes )
1867 : that.checkModificationExcludes != null )
1868 {
1869 return false;
1870 }
1871 }
1872 if ( ( developmentVersions == null || ( developmentVersions != null && developmentVersions.size() == 0) ) &&
1873 ( that.developmentVersions == null || ( that.developmentVersions != null && that.developmentVersions.size() == 0) ) )
1874 {
1875
1876 }
1877 else
1878 {
1879 if ( developmentVersions != null ? !developmentVersions.equals( that.developmentVersions )
1880 : that.developmentVersions != null )
1881 {
1882 return false;
1883 }
1884 }
1885 if ( ( originalScmInfo == null || (originalScmInfo != null && originalScmInfo.size() == 0 ) ) &&
1886 ( that.originalScmInfo == null || ( that.originalScmInfo != null && that.originalScmInfo.size() == 0 ) ) )
1887 {
1888
1889 }
1890 else
1891 {
1892 if ( originalScmInfo != null ? !compareScmCollections( that.originalScmInfo ) : that.originalScmInfo != null )
1893 {
1894 return false;
1895 }
1896 }
1897 if ( ( releaseVersions == null || ( releaseVersions != null && releaseVersions.size() == 0 ) ) &&
1898 ( that.releaseVersions == null || ( that.releaseVersions != null && that.releaseVersions.size() == 0 ) ) )
1899 {
1900
1901 }
1902 else
1903 {
1904 if ( releaseVersions != null ? !releaseVersions.equals( that.releaseVersions ) : that.releaseVersions != null )
1905 {
1906 return false;
1907 }
1908 }
1909 if ( !safeEquals( additionalArguments, that.additionalArguments ) )
1910 {
1911 return false;
1912 }
1913 if ( !safeEquals( preparationGoals, that.preparationGoals ) )
1914 {
1915 return false;
1916 }
1917 if ( !safeEquals( completionGoals, that.completionGoals ) )
1918 {
1919 return false;
1920 }
1921 if ( !safeEquals( pomFileName, that.pomFileName ) )
1922 {
1923 return false;
1924 }
1925 if ( !safeEquals( scmPrivateKeyPassPhrase, that.scmPrivateKeyPassPhrase ) )
1926 {
1927 return false;
1928 }
1929 if ( !safeEquals( scmPassword, that.scmPassword ) )
1930 {
1931 return false;
1932 }
1933 if ( !safeEquals( scmPrivateKey, that.scmPrivateKey ) )
1934 {
1935 return false;
1936 }
1937 if ( !safeEquals( scmReleaseLabel, that.scmReleaseLabel ) )
1938 {
1939 return false;
1940 }
1941 if ( !safeEquals( scmTagBase, that.scmTagBase ) )
1942 {
1943 return false;
1944 }
1945 if ( !safeEquals( scmBranchBase, that.scmBranchBase ) )
1946 {
1947 return false;
1948 }
1949 if ( !safeEquals( scmId, that.scmId ) )
1950 {
1951 return false;
1952 }
1953 if ( !safeEquals( scmSourceUrl, that.scmSourceUrl ) )
1954 {
1955 return false;
1956 }
1957 if ( !safeEquals( scmUsername, that.scmUsername ) )
1958 {
1959 return false;
1960 }
1961 if ( !safeEquals( workingDirectory, that.workingDirectory ) )
1962 {
1963 return false;
1964 }
1965 if ( !safeEquals( scmTagNameFormat, that.scmTagNameFormat ) )
1966 {
1967 return false;
1968 }
1969
1970 return true;
1971 }
1972
1973 private boolean compareScmCollections( java.util.Map that )
1974 {
1975
1976 if ( that == null && originalScmInfo == null )
1977 {
1978 return true;
1979 }
1980
1981 if ( ( that == null && originalScmInfo != null ) || ( that != null && originalScmInfo == null ) )
1982 {
1983 return false;
1984 }
1985
1986 if ( that.size() != originalScmInfo.size() )
1987 {
1988 return false;
1989 }
1990
1991 for ( java.util.Iterator i = originalScmInfo.entrySet().iterator(); i.hasNext(); )
1992 {
1993 java.util.Map.Entry entry = (java.util.Map.Entry) i.next();
1994
1995 org.apache.maven.model.Scm thatScm = (org.apache.maven.model.Scm) that.get( entry.getKey() );
1996
1997 org.apache.maven.model.Scm thisScm = (org.apache.maven.model.Scm) entry.getValue();
1998 if ( thatScm == null && thisScm == null )
1999 {
2000 return true;
2001 }
2002 else if ( thatScm == null )
2003 {
2004 return false;
2005 }
2006 else if ( thisScm == null )
2007 {
2008 return true;
2009 }
2010
2011 if ( thisScm.getConnection() != null ? !thisScm.getConnection().equals( thatScm.getConnection() )
2012 : thatScm.getConnection() != null )
2013 {
2014 return false;
2015 }
2016 if ( thisScm.getDeveloperConnection() != null ? !thisScm.getDeveloperConnection().equals(
2017 thatScm.getDeveloperConnection() ) : thatScm.getDeveloperConnection() != null )
2018 {
2019 return false;
2020 }
2021 if ( thisScm.getUrl() != null ? !thisScm.getUrl().equals( thatScm.getUrl() ) : thatScm.getUrl() != null )
2022 {
2023 return false;
2024 }
2025 if ( thisScm.getTag() != null ? !thisScm.getTag().equals( thatScm.getTag() ) : thatScm.getTag() != null )
2026 {
2027 return false;
2028 }
2029
2030 if ( thisScm instanceof org.apache.maven.shared.release.scm.IdentifiedScm && thatScm instanceof org.apache.maven.shared.release.scm.IdentifiedScm )
2031 {
2032 org.apache.maven.shared.release.scm.IdentifiedScm thisIdentifiedScm = (org.apache.maven.shared.release.scm.IdentifiedScm) thisScm;
2033 org.apache.maven.shared.release.scm.IdentifiedScm thatIdentifiedScm = (org.apache.maven.shared.release.scm.IdentifiedScm) thatScm;
2034 if ( thisIdentifiedScm.getId() != null ? !thisIdentifiedScm.getId().equals( thatIdentifiedScm.getId() ) : thatIdentifiedScm.getId() != null )
2035 {
2036 return false;
2037 }
2038 }
2039 }
2040
2041 return true;
2042 }
2043
2044 public int hashCode()
2045 {
2046 int result = completedPhase != null ? completedPhase.hashCode() : 0;
2047 result = 29 * result + ( scmReleaseLabel != null ? scmReleaseLabel.hashCode() : 0 );
2048 result = 29 * result + ( additionalArguments != null ? additionalArguments.hashCode() : 0 );
2049 result = 29 * result + ( preparationGoals != null ? preparationGoals.hashCode() : 0 );
2050 result = 29 * result + ( completionGoals != null ? completionGoals.hashCode() : 0 );
2051 result = 29 * result + ( pomFileName != null ? pomFileName.hashCode() : 0 );
2052 result = 29 * result + ( checkModificationExcludes != null ? checkModificationExcludes.hashCode() : 0 );
2053 result = 29 * result + ( scmTagBase != null ? scmTagBase.hashCode() : 0 );
2054 result = 29 * result + ( scmBranchBase != null ? scmBranchBase.hashCode() : 0 );
2055 result = 29 * result + ( scmUsername != null ? scmUsername.hashCode() : 0 );
2056 result = 29 * result + ( scmPassword != null ? scmPassword.hashCode() : 0 );
2057 result = 29 * result + ( scmId != null ? scmId.hashCode() : 0 );
2058 result = 29 * result + ( scmSourceUrl != null ? scmSourceUrl.hashCode() : 0 );
2059 result = 29 * result + ( scmPrivateKey != null ? scmPrivateKey.hashCode() : 0 );
2060 result = 29 * result + ( scmPrivateKeyPassPhrase != null ? scmPrivateKeyPassPhrase.hashCode() : 0 );
2061 result = 29 * result + ( workingDirectory != null ? workingDirectory.hashCode() : 0 );
2062 result = 29 * result + ( scmUseEditMode ? 1 : 0 );
2063 result = 29 * result + ( addSchema ? 1 : 0 );
2064 result = 29 * result + ( generateReleasePoms ? 1 : 0 );
2065 result = 29 * result + ( interactive ? 1 : 0 );
2066 result = 29 * result + ( releaseVersions != null ? releaseVersions.hashCode() : 0 );
2067 result = 29 * result + ( developmentVersions != null ? developmentVersions.hashCode() : 0 );
2068 result = 29 * result + ( originalScmInfo != null ? originalScmInfo.hashCode() : 0 );
2069 result = 29 * result + ( updateDependencies ? 1 : 0 );
2070 result = 29 * result + ( useReleaseProfile ? 1 : 0 );
2071 result = 29 * result + ( autoVersionSubmodules ? 1 : 0 );
2072 result = 29 * result + ( snapshotReleasePluginAllowed ? 1 : 0 );
2073 result = 29 * result + ( commitByProject ? 1 : 0 );
2074 result = 29 * result + ( branchCreation ? 1 : 0 );
2075 result = 29 * result + ( updateBranchVersions ? 1 : 0 );
2076 result = 29 * result + ( updateWorkingCopyVersions ? 1 : 0 );
2077 result = 29 * result + ( suppressCommitBeforeTagOrBranch ? 1 : 0 );
2078 result = 29 * result + ( updateVersionsToSnapshot ? 1 : 0 );
2079 result = 29 * result + ( allowTimestampedSnapshots ? 1 : 0 );
2080 result = 29 * result + ( remoteTagging ? 1 : 0 );
2081 result = 29 * result + ( localCheckout ? 1 : 0 );
2082 result = 29 * result + ( pushChanges ? 1 : 0 );
2083 result = 29 * result + ( defaultDevelopmentVersion != null ? defaultDevelopmentVersion.hashCode() : 0 );
2084 result = 29 * result + ( scmRelativePathProjectDirectory != null ? scmRelativePathProjectDirectory.hashCode() : 0 );
2085 result = 29 * result + ( checkoutDirectory != null ? checkoutDirectory.hashCode() : 0 );
2086 result = 29 * result + ( performGoals != null ? performGoals.hashCode() : 0 );
2087 result = 29 * result + ( defaultReleaseVersion != null ? defaultReleaseVersion.hashCode() : 0 );
2088 result = 29 * result + ( scmReleasedPomRevision != null ? scmReleasedPomRevision.hashCode() : 0 );
2089
2090 return result;
2091 }
2092
2093 }