Maven filtering isn't supported.
jackson-chris opened this issue · comments
BUG REPORT
Environment (plugin version, maven version, OS, ...):
Plugin Version: 5.3
Maven home: /usr/local/Cellar/maven/3.6.2/libexec
Java version: 1.8.0_222, vendor: AdoptOpenJDK, runtime: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.14.5", arch: "x86_64", family: "mac"
What happened:
Tried to include maven properties in my Chart.yaml file. Linting failed because the plugin does not first filter the resources to replace maven properties with their values.
What you expected to happen:
I would expect all maven plugins to support maven filtering.
How to reproduce it (as minimally and precisely as possible):
Define a maven property in your pom. Reference it in your Chart.yaml and try and run the lint goal.
Anything else we need to know:
You're right, the plugin itself did not modify/ filter the sources.
It is recommended to do this upfront with the maven-resource-plugin
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-helm-src</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/helm/src</outputDirectory>
<resources>
<resource>
<directory>src/main/helm</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.kiwigrid</groupId>
<artifactId>helm-maven-plugin</artifactId>
<version>${version.helm-maven-plugin}</version>
<configuration>
<chartDirectory>${project.build.directory}</chartDirectory>
<chartVersion>${project.version}</chartVersion>
...
</configuration>
</plugin>
</plugins>
</build>
From our point of view this is not a bug. Feel free to re-open, if you still have trouble with this.