camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/6] camel git commit: CAMEL-7999: Report about more missing stuff in the components.
Date Fri, 14 Nov 2014 15:03:02 GMT
Repository: camel
Updated Branches:
  refs/heads/master 921328c78 -> 7acbd5dcf


CAMEL-7999: Report about more missing stuff in the components.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f0fe87f6
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f0fe87f6
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f0fe87f6

Branch: refs/heads/master
Commit: f0fe87f6699697dbc70706807fe490638e3356df
Parents: 921328c
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Fri Nov 14 14:10:08 2014 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Fri Nov 14 14:12:09 2014 +0100

----------------------------------------------------------------------
 .../camel/maven/packaging/PrepareCatalogMojo.java    | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f0fe87f6/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogMojo.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogMojo.java
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogMojo.java
index bb69cc3..8c10a3d 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogMojo.java
@@ -102,6 +102,7 @@ public class PrepareCatalogMojo extends AbstractMojo {
         Set<File> componentFiles = new LinkedHashSet<File>();
         Set<File> missingComponents = new LinkedHashSet<File>();
         Set<File> missingLabels = new LinkedHashSet<File>();
+        Set<File> missingUriPaths = new LinkedHashSet<File>();
 
         // find all json files in components and camel-core
         if (componentsDir != null && componentsDir.isDirectory()) {
@@ -165,6 +166,9 @@ public class PrepareCatalogMojo extends AbstractMojo {
                 if (text.contains("\"label\": \"\"")) {
                     missingLabels.add(file);
                 }
+                if (!text.contains("\"kind\": \"path\"")) {
+                    missingUriPaths.add(file);
+                }
             } catch (IOException e) {
                 // ignore
             }
@@ -199,10 +203,10 @@ public class PrepareCatalogMojo extends AbstractMojo {
             throw new MojoFailureException("Error writing to file " + all);
         }
 
-        printReport(jsonFiles, duplicateJsonFiles, missingComponents, missingLabels);
+        printReport(jsonFiles, duplicateJsonFiles, missingComponents, missingUriPaths, missingLabels);
     }
 
-    private void printReport(Set<File> json, Set<File> duplicate, Set<File>
missing, Set<File> missingLabels) {
+    private void printReport(Set<File> json, Set<File> duplicate, Set<File>
missing, Set<File> missingUriPaths, Set<File> missingLabels) {
         getLog().info("================================================================================");
         getLog().info("");
         getLog().info("Camel component catalog report");
@@ -226,6 +230,13 @@ public class PrepareCatalogMojo extends AbstractMojo {
             }
         }
         getLog().info("");
+        if (!missingUriPaths.isEmpty()) {
+            getLog().warn("\tMissing @UriPath detected: " + missingUriPaths.size());
+            for (File file : missingUriPaths) {
+                getLog().warn("\t\t" + asComponentName(file));
+            }
+        }
+        getLog().info("");
         if (!missing.isEmpty()) {
             getLog().warn("\tMissing components detected: " + missing.size());
             for (File name : missing) {


Mime
View raw message