|
30 | 30 | import org.apache.maven.plugins.annotations.Mojo;
|
31 | 31 | import org.apache.maven.plugins.annotations.Parameter;
|
32 | 32 | import org.apache.maven.scm.manager.ScmManager;
|
33 |
| -import org.apache.maven.scm.provider.cvslib.repository.CvsScmProviderRepository; |
34 | 33 | import org.apache.maven.scm.provider.git.repository.GitScmProviderRepository;
|
35 | 34 | import org.apache.maven.scm.provider.hg.repository.HgScmProviderRepository;
|
36 |
| -import org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository; |
37 |
| -import org.apache.maven.scm.provider.starteam.repository.StarteamScmProviderRepository; |
38 | 35 | import org.apache.maven.scm.provider.svn.repository.SvnScmProviderRepository;
|
39 | 36 | import org.apache.maven.scm.repository.ScmRepository;
|
40 | 37 | import org.codehaus.plexus.i18n.I18N;
|
@@ -260,30 +257,14 @@ protected void renderBody() {
|
260 | 257 | private void renderOverviewSection(ScmRepository anonymousRepository, ScmRepository devRepository) {
|
261 | 258 | startSection(getI18nString("overview.title"));
|
262 | 259 |
|
263 |
| - if (isScmSystem(anonymousRepository, "clearcase") || isScmSystem(devRepository, "clearcase")) { |
264 |
| - sink.paragraph(); |
265 |
| - linkPatternedText(getI18nString("clearcase.intro")); |
266 |
| - sink.paragraph_(); |
267 |
| - } else if (isScmSystem(anonymousRepository, "cvs") || isScmSystem(devRepository, "cvs")) { |
268 |
| - sink.paragraph(); |
269 |
| - linkPatternedText(getI18nString("cvs.intro")); |
270 |
| - sink.paragraph_(); |
271 |
| - } else if (isScmSystem(anonymousRepository, "git") || isScmSystem(devRepository, "git")) { |
| 260 | + if (isScmSystem(anonymousRepository, "git") || isScmSystem(devRepository, "git")) { |
272 | 261 | sink.paragraph();
|
273 | 262 | linkPatternedText(getI18nString("git.intro"));
|
274 | 263 | sink.paragraph_();
|
275 | 264 | } else if (isScmSystem(anonymousRepository, "hg") || isScmSystem(devRepository, "hg")) {
|
276 | 265 | sink.paragraph();
|
277 | 266 | linkPatternedText(getI18nString("hg.intro"));
|
278 | 267 | sink.paragraph_();
|
279 |
| - } else if (isScmSystem(anonymousRepository, "perforce") || isScmSystem(devRepository, "perforce")) { |
280 |
| - sink.paragraph(); |
281 |
| - linkPatternedText(getI18nString("perforce.intro")); |
282 |
| - sink.paragraph_(); |
283 |
| - } else if (isScmSystem(anonymousRepository, "starteam") || isScmSystem(devRepository, "starteam")) { |
284 |
| - sink.paragraph(); |
285 |
| - linkPatternedText(getI18nString("starteam.intro")); |
286 |
| - sink.paragraph_(); |
287 | 268 | } else if (isScmSystem(anonymousRepository, "svn") || isScmSystem(devRepository, "svn")) {
|
288 | 269 | sink.paragraph();
|
289 | 270 | linkPatternedText(getI18nString("svn.intro"));
|
@@ -323,21 +304,13 @@ private void renderWebAccessSection(String scmUrl) {
|
323 | 304 | * @param anonymousRepository the anonymous repository
|
324 | 305 | */
|
325 | 306 | private void renderAnonymousAccessSection(ScmRepository anonymousRepository) {
|
326 |
| - if (isScmSystem(anonymousRepository, "clearcase") |
327 |
| - || isScmSystem(anonymousRepository, "perforce") |
328 |
| - || isScmSystem(anonymousRepository, "starteam") |
329 |
| - || (anonymousConnection == null || anonymousConnection.isEmpty())) { |
| 307 | + if (anonymousConnection == null || anonymousConnection.isEmpty()) { |
330 | 308 | return;
|
331 | 309 | }
|
332 | 310 |
|
333 | 311 | startSection(getI18nString("anonymousaccess.title"));
|
334 | 312 |
|
335 |
| - if (anonymousRepository != null && isScmSystem(anonymousRepository, "cvs")) { |
336 |
| - CvsScmProviderRepository cvsRepo = |
337 |
| - (CvsScmProviderRepository) anonymousRepository.getProviderRepository(); |
338 |
| - |
339 |
| - anonymousAccessCVS(cvsRepo); |
340 |
| - } else if (anonymousRepository != null && isScmSystem(anonymousRepository, "git")) { |
| 313 | + if (anonymousRepository != null && isScmSystem(anonymousRepository, "git")) { |
341 | 314 | GitScmProviderRepository gitRepo =
|
342 | 315 | (GitScmProviderRepository) anonymousRepository.getProviderRepository();
|
343 | 316 |
|
@@ -372,30 +345,14 @@ private void renderDeveloperAccessSection(ScmRepository devRepository) {
|
372 | 345 |
|
373 | 346 | startSection(getI18nString("devaccess.title"));
|
374 | 347 |
|
375 |
| - if (devRepository != null && isScmSystem(devRepository, "clearcase")) { |
376 |
| - developerAccessClearCase(); |
377 |
| - } else if (devRepository != null && isScmSystem(devRepository, "cvs")) { |
378 |
| - CvsScmProviderRepository cvsRepo = (CvsScmProviderRepository) devRepository.getProviderRepository(); |
379 |
| - |
380 |
| - developerAccessCVS(cvsRepo); |
381 |
| - } else if (devRepository != null && isScmSystem(devRepository, "git")) { |
| 348 | + if (devRepository != null && isScmSystem(devRepository, "git")) { |
382 | 349 | GitScmProviderRepository gitRepo = (GitScmProviderRepository) devRepository.getProviderRepository();
|
383 | 350 |
|
384 | 351 | developerAccessGit(gitRepo);
|
385 | 352 | } else if (devRepository != null && isScmSystem(devRepository, "hg")) {
|
386 | 353 | HgScmProviderRepository hgRepo = (HgScmProviderRepository) devRepository.getProviderRepository();
|
387 | 354 |
|
388 | 355 | developerAccessMercurial(hgRepo);
|
389 |
| - } else if (devRepository != null && isScmSystem(devRepository, "perforce")) { |
390 |
| - PerforceScmProviderRepository perforceRepo = |
391 |
| - (PerforceScmProviderRepository) devRepository.getProviderRepository(); |
392 |
| - |
393 |
| - developerAccessPerforce(perforceRepo); |
394 |
| - } else if (devRepository != null && isScmSystem(devRepository, "starteam")) { |
395 |
| - StarteamScmProviderRepository starteamRepo = |
396 |
| - (StarteamScmProviderRepository) devRepository.getProviderRepository(); |
397 |
| - |
398 |
| - developerAccessStarteam(starteamRepo); |
399 | 356 | } else if (devRepository != null && isScmSystem(devRepository, "svn")) {
|
400 | 357 | SvnScmProviderRepository svnRepo = (SvnScmProviderRepository) devRepository.getProviderRepository();
|
401 | 358 |
|
@@ -423,8 +380,6 @@ private void renderAccessBehindFirewallSection(ScmRepository devRepository) {
|
423 | 380 | paragraph(getI18nString("accessbehindfirewall.svn.intro"));
|
424 | 381 |
|
425 | 382 | verbatimText("$ svn checkout " + svnRepo.getUrl() + " " + checkoutDirectoryName);
|
426 |
| - } else if (devRepository != null && isScmSystem(devRepository, "cvs")) { |
427 |
| - linkPatternedText(getI18nString("accessbehindfirewall.cvs.intro")); |
428 | 383 | } else {
|
429 | 384 | paragraph(getI18nString("accessbehindfirewall.general.intro"));
|
430 | 385 | }
|
@@ -453,46 +408,6 @@ private void renderAccessThroughProxySection(ScmRepository anonymousRepository,
|
453 | 408 | }
|
454 | 409 | }
|
455 | 410 |
|
456 |
| - // Clearcase |
457 |
| - |
458 |
| - /** |
459 |
| - * Create the documentation to provide an developer access with a <code>Clearcase</code> SCM. For example, |
460 |
| - * generate the following command line: |
461 |
| - * <p> |
462 |
| - * cleartool checkout module |
463 |
| - * </p> |
464 |
| - */ |
465 |
| - private void developerAccessClearCase() { |
466 |
| - paragraph(getI18nString("devaccess.clearcase.intro")); |
467 |
| - |
468 |
| - verbatimText("$ cleartool checkout "); |
469 |
| - } |
470 |
| - |
471 |
| - // CVS |
472 |
| - |
473 |
| - // CHECKSTYLE_OFF: LineLength |
474 |
| - /** |
475 |
| - * Create the documentation to provide an anonymous access with a <code>CVS</code> SCM. For example, generate |
476 |
| - * the following command line: |
477 |
| - * <p> |
478 |
| - * cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login |
479 |
| - * </p> |
480 |
| - * <p> |
481 |
| - * cvs -z3 -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic co maven-plugins/dist |
482 |
| - * </p> |
483 |
| - * |
484 |
| - * @param cvsRepo |
485 |
| - * @see <a |
486 |
| - * href="https://www.cvshome.org/docs/manual/cvs-1.12.12/cvs_16.html#SEC115">https://www.cvshome.org/docs/manual/cvs-1.12.12/cvs_16.html#SEC115</a> |
487 |
| - */ |
488 |
| - // CHECKSTYLE_ON: LineLength |
489 |
| - private void anonymousAccessCVS(CvsScmProviderRepository cvsRepo) { |
490 |
| - paragraph(getI18nString("anonymousaccess.cvs.intro")); |
491 |
| - |
492 |
| - verbatimText("$ cvs -d " + cvsRepo.getCvsRoot() + " login" + LS + "$ cvs -z3 -d " + cvsRepo.getCvsRoot() |
493 |
| - + " co " + cvsRepo.getModule()); |
494 |
| - } |
495 |
| - |
496 | 411 | // Git
|
497 | 412 |
|
498 | 413 | private void gitClone(String url) {
|
@@ -543,32 +458,6 @@ private void anonymousAccessMercurial(HgScmProviderRepository hgRepo) {
|
543 | 458 | verbatimText("$ hg clone " + hgRepo.getURI());
|
544 | 459 | }
|
545 | 460 |
|
546 |
| - // CHECKSTYLE_OFF: LineLength |
547 |
| - /** |
548 |
| - * Create the documentation to provide an developer access with a <code>CVS</code> SCM. For example, generate |
549 |
| - * the following command line: |
550 |
| - * <p> |
551 |
| - * cvs -d :pserver:username@cvs.apache.org:/home/cvs login |
552 |
| - * </p> |
553 |
| - * <p> |
554 |
| - * cvs -z3 -d :ext:username@cvs.apache.org:/home/cvs co maven-plugins/dist |
555 |
| - * </p> |
556 |
| - * |
557 |
| - * @param cvsRepo |
558 |
| - * @see <a |
559 |
| - * href="https://www.cvshome.org/docs/manual/cvs-1.12.12/cvs_16.html#SEC115">https://www.cvshome.org/docs/manual/cvs-1.12.12/cvs_16.html#SEC115</a> |
560 |
| - */ |
561 |
| - // CHECKSTYLE_ON: LineLength |
562 |
| - private void developerAccessCVS(CvsScmProviderRepository cvsRepo) { |
563 |
| - paragraph(getI18nString("devaccess.cvs.intro")); |
564 |
| - |
565 |
| - // Safety: remove the username if present |
566 |
| - String cvsRoot = StringUtils.replace(cvsRepo.getCvsRoot(), cvsRepo.getUser(), "username"); |
567 |
| - |
568 |
| - verbatimText( |
569 |
| - "$ cvs -d " + cvsRoot + " login" + LS + "$ cvs -z3 -d " + cvsRoot + " co " + cvsRepo.getModule()); |
570 |
| - } |
571 |
| - |
572 | 461 | // Git
|
573 | 462 |
|
574 | 463 | /**
|
@@ -607,81 +496,6 @@ private void developerAccessMercurial(HgScmProviderRepository hgRepo) {
|
607 | 496 | verbatimText("$ hg clone " + hgRepo.getURI());
|
608 | 497 | }
|
609 | 498 |
|
610 |
| - // Perforce |
611 |
| - |
612 |
| - // CHECKSTYLE_OFF: LineLength |
613 |
| - /** |
614 |
| - * Create the documentation to provide an developer access with a <code>Perforce</code> SCM. For example, |
615 |
| - * generate the following command line: |
616 |
| - * <p> |
617 |
| - * p4 -H hostname -p port -u username -P password path |
618 |
| - * </p> |
619 |
| - * <p> |
620 |
| - * p4 -H hostname -p port -u username -P password path submit -c changement |
621 |
| - * </p> |
622 |
| - * |
623 |
| - * @param perforceRepo |
624 |
| - * @see <a |
625 |
| - * href="http://www.perforce.com/perforce/doc.051/manuals/cmdref/index.html">http://www.perforce.com/ |
626 |
| - * perforce |
627 |
| - * /doc.051/manuals/cmdref/index.html</> |
628 |
| - */ |
629 |
| - // CHECKSTYLE_ON: LineLength |
630 |
| - private void developerAccessPerforce(PerforceScmProviderRepository perforceRepo) { |
631 |
| - paragraph(getI18nString("devaccess.perforce.intro")); |
632 |
| - |
633 |
| - StringBuilder command = new StringBuilder(); |
634 |
| - command.append("$ p4"); |
635 |
| - if (!StringUtils.isEmpty(perforceRepo.getHost())) { |
636 |
| - command.append(" -H ").append(perforceRepo.getHost()); |
637 |
| - } |
638 |
| - if (perforceRepo.getPort() > 0) { |
639 |
| - command.append(" -p ").append(perforceRepo.getPort()); |
640 |
| - } |
641 |
| - command.append(" -u username"); |
642 |
| - command.append(" -P password"); |
643 |
| - command.append(" "); |
644 |
| - command.append(perforceRepo.getPath()); |
645 |
| - command.append(LS); |
646 |
| - command.append("$ p4 submit -c \"A comment\""); |
647 |
| - |
648 |
| - verbatimText(command.toString()); |
649 |
| - } |
650 |
| - |
651 |
| - // Starteam |
652 |
| - |
653 |
| - /** |
654 |
| - * Create the documentation to provide an developer access with a <code>Starteam</code> SCM. For example, |
655 |
| - * generate the following command line: |
656 |
| - * <p> |
657 |
| - * stcmd co -x -nologo -stop -p myusername:mypassword@myhost:1234/projecturl -is |
658 |
| - * </p> |
659 |
| - * <p> |
660 |
| - * stcmd ci -x -nologo -stop -p myusername:mypassword@myhost:1234/projecturl -f NCI -is |
661 |
| - * </p> |
662 |
| - * |
663 |
| - * @param starteamRepo |
664 |
| - */ |
665 |
| - private void developerAccessStarteam(StarteamScmProviderRepository starteamRepo) { |
666 |
| - paragraph(getI18nString("devaccess.starteam.intro")); |
667 |
| - |
668 |
| - StringBuilder command = new StringBuilder(); |
669 |
| - |
670 |
| - // Safety: remove the username/password if present |
671 |
| - String fullUrl = StringUtils.replace(starteamRepo.getFullUrl(), starteamRepo.getUser(), "username"); |
672 |
| - fullUrl = StringUtils.replace(fullUrl, starteamRepo.getPassword(), "password"); |
673 |
| - |
674 |
| - command.append("$ stcmd co -x -nologo -stop -p "); |
675 |
| - command.append(fullUrl); |
676 |
| - command.append(" -is"); |
677 |
| - command.append(LS); |
678 |
| - command.append("$ stcmd ci -x -nologo -stop -p "); |
679 |
| - command.append(fullUrl); |
680 |
| - command.append(" -f NCI -is"); |
681 |
| - |
682 |
| - verbatimText(command.toString()); |
683 |
| - } |
684 |
| - |
685 | 499 | // Subversion
|
686 | 500 |
|
687 | 501 | /**
|
|
0 commit comments