kokuwaio / helm-maven-plugin

Simple plugin to package helm charts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect using of `@Parameter` annotations

slawekjaranowski opened this issue · comments

  • @Parameter annotation - can be only used for fields in Mojo classes, which implements org.apache.maven.plugin.Mojo interface.

  • Using @Parameter annotation in another classes, like type used as parameter has no effect. eg: in HelmRepository

  • @Parameter(property = "xxx") can be only used for simple type and collections of simple type out of the box.

eg, executing:

mvn helm:init -Dhelm.extraRepos=extra

cause

 Unable to parse configuration of mojo io.kokuwa.maven:helm-maven-plugin:6.4.1:init for parameter #: Cannot find default setter in class io.kokuwa.maven.helm.pojo.HelmRepository 

in such case when you want to use property you should add setter method for HelmRepository which will be called

class HelmRepository {
   void set(String value) {
   }
}

@slawekjaranowski Can you review the pr?