aboutsummaryrefslogtreecommitdiffstats
path: root/vespa-maven-plugin/src
diff options
context:
space:
mode:
Diffstat (limited to 'vespa-maven-plugin/src')
-rw-r--r--vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/DeployMojo.java9
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"))));