This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new e9f5965 CAMEL-14622: camel component options - Favour annotation based options. At first add WARN log from tooling to report when missing @Metadata e9f5965 is described below commit e9f5965b65496f99c22120211fe59e0d432ba07b Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Tue Jun 16 11:14:37 2020 +0200 CAMEL-14622: camel component options - Favour annotation based options. At first add WARN log from tooling to report when missing @Metadata --- .../org/apache/camel/maven/packaging/EndpointSchemaGeneratorMojo.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointSchemaGeneratorMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointSchemaGeneratorMojo.java index e5b37da..d963950 100644 --- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointSchemaGeneratorMojo.java +++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointSchemaGeneratorMojo.java @@ -591,6 +591,10 @@ public class EndpointSchemaGeneratorMojo extends AbstractGeneratorMojo { fields.stream().anyMatch(f -> f.getAnnotation(Metadata.class) != null) || methods.stream().anyMatch(m -> m.getAnnotation(Metadata.class) != null); + if (methods.size() > 0 && !annotationBasedOptions) { + getLog().warn("Component class " + classElement.getName() + " has not been marked up with @Metadata for " + methods.size() + " options."); + } + for (Method method : methods) { String methodName = method.getName(); Metadata metadata = method.getAnnotation(Metadata.class);