diff --git a/src/it/gav-validation/invoker.properties b/src/it/gav-validation/invoker.properties index 6635374e..051dc7ed 100644 --- a/src/it/gav-validation/invoker.properties +++ b/src/it/gav-validation/invoker.properties @@ -18,5 +18,5 @@ invoker.goals = org.apache.maven.plugins:maven-deploy-plugin:${project.version}:deploy-file invoker.buildResult = failure -invoker.systemPropertiesFile.1 = test-invalid.properties -invoker.systemPropertiesFile.2 = test-missing.properties +invoker.userPropertiesFile.1 = test-invalid.properties +invoker.userPropertiesFile.2 = test-missing.properties diff --git a/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java b/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java index 2c586615..82c03f51 100644 --- a/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java +++ b/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java @@ -383,8 +383,6 @@ RemoteRepository getDeploymentRepository( repo = getRemoteRepository(id, url); } else { throw new MojoExecutionException( - altDeploymentRepo, - "Invalid legacy syntax and layout for repository.", "Invalid legacy syntax and layout for alternative repository. Use \"" + id + "::" + url + "\" instead, and only default layout is supported."); } @@ -392,10 +390,7 @@ RemoteRepository getDeploymentRepository( matcher = ALT_REPO_SYNTAX_PATTERN.matcher(altDeploymentRepo); if (!matcher.matches()) { - throw new MojoExecutionException( - altDeploymentRepo, - "Invalid syntax for repository.", - "Invalid syntax for alternative repository. Use \"id::url\"."); + throw new MojoExecutionException("Invalid syntax for alternative repository. Use \"id::url\"."); } else { String id = matcher.group(1).trim(); String url = matcher.group(2).trim(); diff --git a/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java b/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java index 52964cc5..cd0be134 100644 --- a/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java +++ b/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java @@ -718,9 +718,8 @@ public void testLegacyAltDeploymentRepositoryWithLegacyLayout() throws Exception mojo.getDeploymentRepository(project, null, null, "altDeploymentRepository::legacy::http://localhost"); fail("Should throw: Invalid legacy syntax and layout for repository."); } catch (MojoExecutionException e) { - assertEquals(e.getMessage(), "Invalid legacy syntax and layout for repository."); assertEquals( - e.getLongMessage(), + e.getMessage(), "Invalid legacy syntax and layout for alternative repository. Use \"altDeploymentRepository::http://localhost\" instead, and only default layout is supported."); } } @@ -739,9 +738,8 @@ public void testInsaneAltDeploymentRepository() throws Exception { project, null, null, "altDeploymentRepository::hey::wow::foo::http://localhost"); fail("Should throw: Invalid legacy syntax and layout for repository."); } catch (MojoExecutionException e) { - assertEquals(e.getMessage(), "Invalid legacy syntax and layout for repository."); assertEquals( - e.getLongMessage(), + e.getMessage(), "Invalid legacy syntax and layout for alternative repository. Use \"altDeploymentRepository::wow::foo::http://localhost\" instead, and only default layout is supported."); } } @@ -775,9 +773,8 @@ public void testLegacyScmSvnAltDeploymentRepository() throws Exception { project, null, null, "altDeploymentRepository::legacy::scm:svn:http://localhost"); fail("Should throw: Invalid legacy syntax and layout for repository."); } catch (MojoExecutionException e) { - assertEquals(e.getMessage(), "Invalid legacy syntax and layout for repository."); assertEquals( - e.getLongMessage(), + e.getMessage(), "Invalid legacy syntax and layout for alternative repository. Use \"altDeploymentRepository::scm:svn:http://localhost\" instead, and only default layout is supported."); } }