From 3b346405415f7deb2547a21c8bbfcf055e7fcaf8 Mon Sep 17 00:00:00 2001 From: manusa Date: Thu, 26 Mar 2020 12:04:51 +0100 Subject: [PATCH] fix: Missed Mojo parameters in OpenshiftHelmMojo Signed-off-by: Marc Nuri --- .../jkube/maven/plugin/mojo/build/HelmMojo.java | 6 ++++-- .../plugin/mojo/build/OpenshiftHelmMojo.java | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/kubernetes-maven-plugin/plugin/src/main/java/org/eclipse/jkube/maven/plugin/mojo/build/HelmMojo.java b/kubernetes-maven-plugin/plugin/src/main/java/org/eclipse/jkube/maven/plugin/mojo/build/HelmMojo.java index bc0e1d6797..b83acbe57b 100644 --- a/kubernetes-maven-plugin/plugin/src/main/java/org/eclipse/jkube/maven/plugin/mojo/build/HelmMojo.java +++ b/kubernetes-maven-plugin/plugin/src/main/java/org/eclipse/jkube/maven/plugin/mojo/build/HelmMojo.java @@ -65,6 +65,8 @@ public class HelmMojo extends AbstractJKubeMojo { private static final String PROPERTY_OUTPUT_DIR = "jkube.helm.outputDir"; private static final String PROPERTY_TARBALL_OUTPUT_DIR = "jkube.helm.tarballOutputDir"; private static final String DEFAULT_CHART_EXTENSION = "tar.gz"; + static final String PROPERTY_KUBERNETES_MANIFEST = "jkube.kubernetesManifest"; + static final String PROPERTY_KUBERNETES_TEMPLATE = "jkube.kubernetesTemplate"; @Parameter HelmConfig helm; @@ -72,13 +74,13 @@ public class HelmMojo extends AbstractJKubeMojo { /** * The generated kubernetes YAML file */ - @Parameter(property = "jkube.kubernetesManifest", defaultValue = "${basedir}/target/classes/META-INF/jkube/kubernetes.yml") + @Parameter(property = PROPERTY_KUBERNETES_MANIFEST, defaultValue = "${basedir}/target/classes/META-INF/jkube/kubernetes.yml") File kubernetesManifest; /** * The generated kubernetes YAML file */ - @Parameter(property = "jkube.kubernetesTemplate", defaultValue = "${basedir}/target/classes/META-INF/jkube/kubernetes") + @Parameter(property = PROPERTY_KUBERNETES_TEMPLATE, defaultValue = "${basedir}/target/classes/META-INF/jkube/kubernetes") File kubernetesTemplate; @Component diff --git a/openshift-maven-plugin/plugin/src/main/java/org/eclipse/jkube/maven/plugin/mojo/build/OpenshiftHelmMojo.java b/openshift-maven-plugin/plugin/src/main/java/org/eclipse/jkube/maven/plugin/mojo/build/OpenshiftHelmMojo.java index fc42145ceb..a9cb1631c8 100644 --- a/openshift-maven-plugin/plugin/src/main/java/org/eclipse/jkube/maven/plugin/mojo/build/OpenshiftHelmMojo.java +++ b/openshift-maven-plugin/plugin/src/main/java/org/eclipse/jkube/maven/plugin/mojo/build/OpenshiftHelmMojo.java @@ -15,11 +15,26 @@ import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.eclipse.jkube.kit.resource.helm.HelmConfig; +import java.io.File; + @Mojo(name = "helm", defaultPhase = LifecyclePhase.PRE_INTEGRATION_TEST) public class OpenshiftHelmMojo extends HelmMojo { + /** + * The generated kubernetes YAML file + */ + @Parameter(property = PROPERTY_KUBERNETES_MANIFEST, defaultValue = "${basedir}/target/classes/META-INF/jkube/openshift.yml") + File kubernetesManifest; // NOSONAR (Override Mojo Property en HelmMojo) + + /** + * The generated kubernetes YAML file + */ + @Parameter(property = PROPERTY_KUBERNETES_TEMPLATE, defaultValue = "${basedir}/target/classes/META-INF/jkube/openshift") + File kubernetesTemplate; // NOSONAR (Override Mojo Property en HelmMojo) + @Override protected HelmConfig.HelmType getDefaultHelmType() { return HelmConfig.HelmType.OPENSHIFT;