You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2021/06/02 05:29:03 UTC

[camel] branch main updated: CAMEL-16670: camel-component-maven-plugin - Should ignore validating json files that are not Camel component json files.

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 5a4d814  CAMEL-16670: camel-component-maven-plugin - Should ignore validating json files that are not Camel component json files.
5a4d814 is described below

commit 5a4d81495b1106ebff13f6d03800dacd7c655f28
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Jun 2 07:28:11 2021 +0200

    CAMEL-16670: camel-component-maven-plugin - Should ignore validating json files that are not Camel component json files.
---
 .../org/apache/camel/maven/packaging/ValidateComponentMojo.java     | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/ValidateComponentMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/ValidateComponentMojo.java
index 6445d48..716b5c2 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/ValidateComponentMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/ValidateComponentMojo.java
@@ -79,7 +79,11 @@ public class ValidateComponentMojo extends AbstractGeneratorMojo {
                 final ErrorDetail detail = new ErrorDetail();
 
                 getLog().debug("Validating file " + file);
-                ValidateHelper.validate(file.toFile(), detail);
+                try {
+                    ValidateHelper.validate(file.toFile(), detail);
+                } catch (Exception e) {
+                    // ignore as it may not be a camel component json file
+                }
 
                 if (detail.hasErrors()) {
                     failed = true;