From 41c63493a0ddb626def686ca710859da6b014141 Mon Sep 17 00:00:00 2001 From: Jon Marius Venstad Date: Mon, 11 Jan 2021 10:50:17 +0100 Subject: Actually add new plugin goal :facepalm: --- .../java/ai/vespa/hosted/plugin/SuspendMojo.java | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/SuspendMojo.java (limited to 'vespa-maven-plugin') diff --git a/vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/SuspendMojo.java b/vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/SuspendMojo.java new file mode 100644 index 00000000000..f2bcb5288e0 --- /dev/null +++ b/vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/SuspendMojo.java @@ -0,0 +1,24 @@ +// Copyright 2020 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package ai.vespa.hosted.plugin; + +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; + +/** + * Sets suspension status for a Vespa application deployment. + * + * @author jonmv + */ +@Mojo(name = "suspend") +public class SuspendMojo extends AbstractVespaDeploymentMojo { + + @Parameter(property = "suspend", required = true) + protected boolean suspend; + + @Override + protected void doExecute() { + getLog().info(controller.suspend(id, zoneOf(environment, region), suspend)); + } + +} + -- cgit v1.2.3