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 2014/12/18 08:00:52 UTC

[2/2] camel git commit: CAMEL-7999: Skip include spring boot json files.

CAMEL-7999: Skip include spring boot json files.


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

Branch: refs/heads/master
Commit: 0b1a1c5063853de2bc72e191d5eb6b81ee59f02b
Parents: 388b597
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Dec 18 08:00:39 2014 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Dec 18 08:00:39 2014 +0100

----------------------------------------------------------------------
 .../org/apache/camel/maven/packaging/PrepareCatalogMojo.java   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/0b1a1c50/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 7d43e25..ec6c4c7 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
@@ -294,8 +294,10 @@ public class PrepareCatalogMojo extends AbstractMojo {
         File[] files = dir.listFiles(filter);
         if (files != null) {
             for (File file : files) {
-                boolean jsonFile = file.isFile() && file.getName().endsWith(".json");
-                boolean componentFile = file.isFile() && file.getName().equals("component.properties");
+                // skip files in root dirs as Camel does not store information there but others may do
+                boolean rootDir = "classes".equals(dir.getName()) || "META-INF".equals(dir.getName());
+                boolean jsonFile = !rootDir && file.isFile() && file.getName().endsWith(".json");
+                boolean componentFile = !rootDir && file.isFile() && file.getName().equals("component.properties");
                 if (jsonFile) {
                     found.add(file);
                 } else if (componentFile) {