Repository: camel
Updated Branches:
  refs/heads/master 1c49b5226 -> 9491da8f3


Camel catalog should not warn certain components lack of docs.


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

Branch: refs/heads/master
Commit: 9491da8f393fa95fb33cf3afcb65dab88be63f86
Parents: 1c49b52
Author: Claus Ibsen <davscl...@apache.org>
Authored: Thu Jun 9 15:41:55 2016 +0200
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Thu Jun 9 15:41:55 2016 +0200

----------------------------------------------------------------------
 .../camel/maven/packaging/PrepareCatalogMojo.java      | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/9491da8f/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 e45ee8b..0035c64 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
@@ -50,6 +50,8 @@ public class PrepareCatalogMojo extends AbstractMojo {
 
     public static final int BUFFER_SIZE = 128 * 1024;
 
+    private static final String[] EXCLUDE_DOC_FILES = {"camel-core-osgi", 
"camel-core-xml", "camel-http-common", "camel-jetty-common"};
+
     private static final Pattern LABEL_PATTERN = 
Pattern.compile("\\\"label\\\":\\s\\\"([\\w,]+)\\\"");
 
     private static final int UNUSED_LABELS_WARN = 15;
@@ -708,7 +710,7 @@ public class PrepareCatalogMojo extends AbstractMojo {
             File[] components = componentsDir.listFiles();
             if (components != null) {
                 for (File dir : components) {
-                    if (dir.isDirectory() && !"target".equals(dir.getName()) 
&& !dir.getName().startsWith(".")) {
+                    if (dir.isDirectory() && !"target".equals(dir.getName()) 
&& !dir.getName().startsWith(".") && !excludeDocumentDir(dir.getName())) {
                         File target = new File(dir, "src/main/docs");
 
                         int before = adocFiles.size();
@@ -1134,4 +1136,13 @@ public class PrepareCatalogMojo extends AbstractMojo {
         }
     }
 
+    private static boolean excludeDocumentDir(String name) {
+        for (String exclude : EXCLUDE_DOC_FILES) {
+            if (exclude.equals(name)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
 }
\ No newline at end of file

Reply via email to