Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MDEPLOY-320] Simplify and unify message #75

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/it/gav-validation/invoker.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -383,19 +383,14 @@ 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.");
}
} else {
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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}
}
Expand All @@ -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.");
}
}
Expand Down Expand Up @@ -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.");
}
}
Expand Down