public void execute() throws MojoExecutionException, MojoFailureException {
File json = getKubernetesJson();
if (!Files.isFile(json)) {
throw new MojoFailureException("No such kubernetes json file: " + json);
}
KubernetesClient api = getKubernetes();
getLog().info("Deploying " + json + " to " + api.getAddress());
try {
Object dto = KubernetesHelper.loadJson(json);
if (dto == null) {
throw new MojoFailureException("Could not load kubernetes json: " + json);