diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2019-10-11 09:47:30 +0200 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2019-10-11 09:47:30 +0200 |
commit | 1e95910431b64e2c0653c5a1a2f0be5e40141544 (patch) | |
tree | 79866b6129365ab85fc39a54f0256c3ffd4a34e2 /vespa-maven-plugin | |
parent | 28913b4f7dc9597966c6e93f1a77af923549eea2 (diff) |
Direct user to console when application does not exist or is forbidden
Diffstat (limited to 'vespa-maven-plugin')
-rw-r--r-- | vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/DeployMojo.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/DeployMojo.java b/vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/DeployMojo.java index db4d7a4c522..210151c450d 100644 --- a/vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/DeployMojo.java +++ b/vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/DeployMojo.java @@ -37,6 +37,15 @@ public class DeployMojo extends AbstractVespaDeploymentMojo { @Override protected void doExecute() throws MojoFailureException, MojoExecutionException { + try { + controller.compileVersion(id); + } + catch (IllegalArgumentException e) { + throw new MojoFailureException( "The application " + id.tenant() + "." + id.application() + " does not exist, " + + "or you do not have the required privileges to access it; " + + "please visit the Vespa cloud web UI and make sure the application exists and you have access!"); + } + loggable = DeploymentLog.Level.valueOf(vespaLogLevel); Deployment deployment = Deployment.ofPackage(Paths.get(firstNonBlank(applicationZip, projectPathOf("target", "application.zip")))); |