diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2019-08-22 12:59:13 +0200 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2019-08-22 12:59:13 +0200 |
commit | 6a056e5fe0e321f4a5c3084f8902bf9dab3c9a2a (patch) | |
tree | 957778bad644bea9cce48d75ef66d7354c28ef7d /vespa-maven-plugin/src | |
parent | 483aeab1a54bde8a24f428b937f700da35564047 (diff) |
Add delete mojo
Diffstat (limited to 'vespa-maven-plugin/src')
-rw-r--r-- | vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/DeleteMojo.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/DeleteMojo.java b/vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/DeleteMojo.java new file mode 100644 index 00000000000..64395ce9bfe --- /dev/null +++ b/vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/DeleteMojo.java @@ -0,0 +1,26 @@ +package ai.vespa.hosted.plugin; + +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; + +/** + * Deploys a Vespa application package to the hosted Vespa API. + * + * @author jonmv + */ +@Mojo(name = "delete") +public class DeleteMojo extends AbstractVespaMojo { + + @Parameter(property = "environment") + private String environment; + + @Parameter(property = "region") + private String region; + + @Override + protected void doExecute() { + getLog().info(controller.deactivate(id, zoneOf(environment, region))); + } + +} + |