camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: Camel catalog - Report missing doc for component options
Date Fri, 10 Apr 2015 07:24:53 GMT
Repository: camel
Updated Branches:
  refs/heads/master 1a14e18a9 -> c3daec67e


Camel catalog - Report missing doc for component options


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

Branch: refs/heads/master
Commit: c3daec67e62a0fe77718f9381c2882da10b07433
Parents: 1a14e18
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Fri Apr 10 09:27:38 2015 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Fri Apr 10 09:27:38 2015 +0200

----------------------------------------------------------------------
 .../maven/packaging/PrepareCatalogMojo.java     | 44 ++++++++++++--------
 1 file changed, 26 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c3daec67/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 3a6bd6a..f0563bf 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
@@ -279,7 +279,8 @@ public class PrepareCatalogMojo extends AbstractMojo {
         Set<File> missingComponents = new TreeSet<File>();
         Set<File> missingLabels = new TreeSet<File>();
         Set<File> missingUriPaths = new TreeSet<File>();
-        Set<File> missingJavaDoc = new TreeSet<File>();
+        Set<File> missingComponentJavaDoc = new TreeSet<File>();
+        Set<File> missingEndpointJavaDoc = new TreeSet<File>();
         Map<String, Set<String>> usedLabels = new TreeMap<String, Set<String>>();
 
         // find all json files in components and camel-core
@@ -378,7 +379,7 @@ public class PrepareCatalogMojo extends AbstractMojo {
                 for (Map<String, String> row : rows) {
                     String doc = row.get("description");
                     if (doc == null || doc.isEmpty()) {
-                        missingJavaDoc.add(file);
+                        missingComponentJavaDoc.add(file);
                         break;
                     }
                 }
@@ -388,7 +389,7 @@ public class PrepareCatalogMojo extends AbstractMojo {
                 for (Map<String, String> row : rows) {
                     String doc = row.get("description");
                     if (doc == null || doc.isEmpty()) {
-                        missingJavaDoc.add(file);
+                        missingEndpointJavaDoc.add(file);
                         break;
                     }
                 }
@@ -424,7 +425,7 @@ public class PrepareCatalogMojo extends AbstractMojo {
             throw new MojoFailureException("Error writing to file " + all);
         }
 
-        printComponentsReport(jsonFiles, duplicateJsonFiles, missingComponents, missingJavaDoc,
missingUriPaths, missingLabels, usedLabels);
+        printComponentsReport(jsonFiles, duplicateJsonFiles, missingComponents, missingEndpointJavaDoc,
missingComponentJavaDoc, missingUriPaths, missingLabels, usedLabels);
     }
 
     protected void executeDataFormats() throws MojoExecutionException, MojoFailureException
{
@@ -722,7 +723,7 @@ public class PrepareCatalogMojo extends AbstractMojo {
         getLog().info("================================================================================");
     }
 
-    private void printComponentsReport(Set<File> json, Set<File> duplicate, Set<File>
missing, Set<File> missingJavaDoc,
+    private void printComponentsReport(Set<File> json, Set<File> duplicate, Set<File>
missing, Set<File> missingEndpointJavaDoc, Set<File> missingComponentJavaDoc,
                                        Set<File> missingUriPaths, Set<File>missingLabels,
Map<String, Set<String>> usedLabels) {
         getLog().info("================================================================================");
         getLog().info("");
@@ -739,6 +740,16 @@ public class PrepareCatalogMojo extends AbstractMojo {
                 getLog().warn("\t\t" + asComponentName(file));
             }
         }
+        if (!usedLabels.isEmpty()) {
+            getLog().info("");
+            getLog().info("\tUsed labels: " + usedLabels.size());
+            for (Map.Entry<String, Set<String>> entry : usedLabels.entrySet())
{
+                getLog().info("\t\t" + entry.getKey() + ":");
+                for (String name : entry.getValue()) {
+                    getLog().info("\t\t\t" + name);
+                }
+            }
+        }
         if (!missingLabels.isEmpty()) {
             getLog().info("");
             getLog().warn("\tMissing labels detected: " + missingLabels.size());
@@ -746,27 +757,24 @@ public class PrepareCatalogMojo extends AbstractMojo {
                 getLog().warn("\t\t" + asComponentName(file));
             }
         }
-        if (!missingJavaDoc.isEmpty()) {
+        if (!missingUriPaths.isEmpty()) {
             getLog().info("");
-            getLog().warn("\tMissing javadoc detected: " + missingJavaDoc.size());
-            for (File file : missingJavaDoc) {
+            getLog().warn("\tMissing @UriPath detected: " + missingUriPaths.size());
+            for (File file : missingUriPaths) {
                 getLog().warn("\t\t" + asComponentName(file));
             }
         }
-        if (!usedLabels.isEmpty()) {
+        if (!missingComponentJavaDoc.isEmpty()) {
             getLog().info("");
-            getLog().info("\tUsed labels: " + usedLabels.size());
-            for (Map.Entry<String, Set<String>> entry : usedLabels.entrySet())
{
-                getLog().info("\t\t" + entry.getKey() + ":");
-                for (String name : entry.getValue()) {
-                    getLog().info("\t\t\t" + name);
-                }
+            getLog().warn("\tMissing component options javadoc detected: " + missingComponentJavaDoc.size());
+            for (File file : missingComponentJavaDoc) {
+                getLog().warn("\t\t" + asComponentName(file));
             }
         }
-        if (!missingUriPaths.isEmpty()) {
+        if (!missingEndpointJavaDoc.isEmpty()) {
             getLog().info("");
-            getLog().warn("\tMissing @UriPath detected: " + missingUriPaths.size());
-            for (File file : missingUriPaths) {
+            getLog().warn("\tMissing endpoint options javadoc detected: " + missingEndpointJavaDoc.size());
+            for (File file : missingEndpointJavaDoc) {
                 getLog().warn("\t\t" + asComponentName(file));
             }
         }


Mime
View raw message