-
Notifications
You must be signed in to change notification settings - Fork 56
Description
Context: 6.17.0 introduced a new clean goal.
Starting with 6.17.0 the helm-maven-plugin fails in the clean goal, if the chart directory is not present.
The issue occurs if the chartDirectory is set to maven's project.build.directory.
As it is very common to run maven with a preceding clean e.g. maven clean deploy, this error is usually hit, because clean already removes the directory in the target directory.
This issue did not occur with version 6.16.0.
I'd propose to first check if the directory is present and skip the removal otherwise.
Current work around is disabling the clean stage of the helm-maven-plugin:
<execution>
<id>default-clean</id>
<phase>none</phase>
</execution>
EDIT:
The error actually does not occur during the actual deletion, as this already deletes the directory only if it exists:
| Files.deleteIfExists(path); |
With the following error message:
[ERROR] Failed to execute goal io.kokuwa.maven:helm-maven-plugin:6.17.0:clean (default-clean) on project helm: Unable to scan chart directory at [...]/helm/target/uniport-gateway -> [Help 1]
The issue is here:
helm-maven-plugin/src/main/java/io/kokuwa/maven/helm/AbstractChartDirectoryMojo.java
Line 76 in 744ec8a
| throw new MojoExecutionException("Unable to scan chart directory at " + chartDirectory, e); |