io.kokuwa.maven.helm.AbstractHandleMojo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of helm-maven-plugin Show documentation
Show all versions of helm-maven-plugin Show documentation
A plugin for executing HELM (https://docs.helm.sh).
The newest version!
package io.kokuwa.maven.helm;
import java.nio.file.Path;
import java.util.List;
import java.util.stream.Collectors;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Parameter;
import lombok.Setter;
import lombok.Value;
/** Base class for dependency build and update mojos. */
@Setter
public abstract class AbstractHandleMojo extends AbstractHelmWithValueOverrideMojo {
/**
* Name of the release to handle.
*
* @since 6.4.0
*/
@Parameter(property = "helm.releaseName")
private String releaseName;
List getCharts() throws MojoExecutionException {
List chartDirectories = getChartDirectories();
if (releaseName != null && chartDirectories.size() > 1) {
throw new MojoExecutionException("For multiple charts releaseName is not supported.");
}
return chartDirectories.stream()
.map(p -> new Chart(releaseName == null ? p.getFileName().toString() : releaseName, p))
.collect(Collectors.toList());
}
@Value
class Chart {
private final String releaseName;
private final Path directory;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy