Incorrect using of `@Parameter` annotations
slawekjaranowski opened this issue · comments
Slawomir Jaranowski commented
-
@Parameter
annotation - can be only used for fields in Mojo classes, which implementsorg.apache.maven.plugin.Mojo
interface. -
Using
@Parameter
annotation in another classes, like type used as parameter has no effect. eg: inHelmRepository
-
@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) {
}
}
Stephan Schnabel commented
@slawekjaranowski Can you review the pr?