@@ -711,17 +711,18 @@ public void testLegacyAltDeploymentRepositoryWithLegacyLayout() throws Exception |
711 | 711 |
|
712 | 712 | setVariableValueToObject(mojo, "project", project); |
713 | 713 | setVariableValueToObject(mojo, "session", session); |
714 | | - setVariableValueToObject(mojo, "altDeploymentRepository", "altDeploymentRepository::legacy::http://localhost"); |
| 714 | + String altDeploymentRepository = "altDeploymentRepository::legacy::http://localhost"; |
| 715 | + setVariableValueToObject(mojo, "altDeploymentRepository", altDeploymentRepository); |
715 | 716 |
|
716 | 717 | project.setVersion("1.0-SNAPSHOT"); |
717 | 718 | try { |
718 | | - mojo.getDeploymentRepository(project, null, null, "altDeploymentRepository::legacy::http://localhost"); |
| 719 | + mojo.getDeploymentRepository(project, null, null, altDeploymentRepository); |
719 | 720 | fail("Should throw: Invalid legacy syntax and layout for repository."); |
720 | 721 | } catch (MojoExecutionException e) { |
721 | | - assertEquals(e.getMessage(), "Invalid legacy syntax and layout for repository."); |
722 | 722 | assertEquals( |
723 | | - e.getLongMessage(), |
724 | | - "Invalid legacy syntax and layout for alternative repository. Use \"altDeploymentRepository::http://localhost\" instead, and only default layout is supported."); |
| 723 | + e.getMessage(), |
| 724 | + "Invalid legacy syntax and layout for alternative repository: \"" + altDeploymentRepository |
| 725 | + + "\". Use \"altDeploymentRepository::http://localhost\" instead, and only default layout is supported."); |
725 | 726 | } |
726 | 727 | } |
727 | 728 |
|
@@ -730,19 +731,18 @@ public void testInsaneAltDeploymentRepository() throws Exception { |
730 | 731 |
|
731 | 732 | setVariableValueToObject(mojo, "project", project); |
732 | 733 | setVariableValueToObject(mojo, "session", session); |
733 | | - setVariableValueToObject( |
734 | | - mojo, "altDeploymentRepository", "altDeploymentRepository::hey::wow::foo::http://localhost"); |
| 734 | + String altDeploymentRepository = "altDeploymentRepository::hey::wow::foo::http://localhost"; |
| 735 | + setVariableValueToObject(mojo, "altDeploymentRepository", altDeploymentRepository); |
735 | 736 |
|
736 | 737 | project.setVersion("1.0-SNAPSHOT"); |
737 | 738 | try { |
738 | | - mojo.getDeploymentRepository( |
739 | | - project, null, null, "altDeploymentRepository::hey::wow::foo::http://localhost"); |
| 739 | + mojo.getDeploymentRepository(project, null, null, altDeploymentRepository); |
740 | 740 | fail("Should throw: Invalid legacy syntax and layout for repository."); |
741 | 741 | } catch (MojoExecutionException e) { |
742 | | - assertEquals(e.getMessage(), "Invalid legacy syntax and layout for repository."); |
743 | 742 | assertEquals( |
744 | | - e.getLongMessage(), |
745 | | - "Invalid legacy syntax and layout for alternative repository. Use \"altDeploymentRepository::wow::foo::http://localhost\" instead, and only default layout is supported."); |
| 743 | + e.getMessage(), |
| 744 | + "Invalid legacy syntax and layout for alternative repository: \"" + altDeploymentRepository |
| 745 | + + "\". Use \"altDeploymentRepository::wow::foo::http://localhost\" instead, and only default layout is supported."); |
746 | 746 | } |
747 | 747 | } |
748 | 748 |
|
@@ -766,19 +766,18 @@ public void testLegacyScmSvnAltDeploymentRepository() throws Exception { |
766 | 766 | mojo = new DeployMojo(); |
767 | 767 |
|
768 | 768 | setVariableValueToObject(mojo, "project", project); |
769 | | - setVariableValueToObject( |
770 | | - mojo, "altDeploymentRepository", "altDeploymentRepository::legacy::scm:svn:http://localhost"); |
| 769 | + String altDeploymentRepository = "altDeploymentRepository::legacy::scm:svn:http://localhost"; |
| 770 | + setVariableValueToObject(mojo, "altDeploymentRepository", altDeploymentRepository); |
771 | 771 |
|
772 | 772 | project.setVersion("1.0-SNAPSHOT"); |
773 | 773 | try { |
774 | | - mojo.getDeploymentRepository( |
775 | | - project, null, null, "altDeploymentRepository::legacy::scm:svn:http://localhost"); |
| 774 | + mojo.getDeploymentRepository(project, null, null, altDeploymentRepository); |
776 | 775 | fail("Should throw: Invalid legacy syntax and layout for repository."); |
777 | 776 | } catch (MojoExecutionException e) { |
778 | | - assertEquals(e.getMessage(), "Invalid legacy syntax and layout for repository."); |
779 | 777 | assertEquals( |
780 | | - e.getLongMessage(), |
781 | | - "Invalid legacy syntax and layout for alternative repository. Use \"altDeploymentRepository::scm:svn:http://localhost\" instead, and only default layout is supported."); |
| 778 | + e.getMessage(), |
| 779 | + "Invalid legacy syntax and layout for alternative repository: \"" + altDeploymentRepository |
| 780 | + + "\". Use \"altDeploymentRepository::scm:svn:http://localhost\" instead, and only default layout is supported."); |
782 | 781 | } |
783 | 782 | } |
784 | 783 |
|
|