Repository: camel
Updated Branches:
  refs/heads/master 7d2fb2115 -> 7910e79ed


CAMEL-11049: Camel maven plugin for generating custom component / data format / 
language list should detect if its from Apache Camel vs custom and act 
accordingly.


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

Branch: refs/heads/master
Commit: 7910e79ed0d33422ab9303b087c2592d75955f06
Parents: 7d2fb21
Author: Claus Ibsen <[email protected]>
Authored: Wed Apr 12 13:30:34 2017 +0200
Committer: Claus Ibsen <[email protected]>
Committed: Wed Apr 12 13:30:34 2017 +0200

----------------------------------------------------------------------
 .../apache/camel/maven/packaging/PackageDataFormatMojo.java | 5 ++++-
 .../apache/camel/maven/packaging/PackageLanguageMojo.java   | 9 ++++++---
 2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/7910e79e/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java
----------------------------------------------------------------------
diff --git 
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java
 
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java
index 3509ac0..2a4d029 100644
--- 
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java
+++ 
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java
@@ -144,10 +144,13 @@ public class PackageDataFormatMojo extends AbstractMojo {
             }
         }
 
+        // is this from Apache Camel then the data format is out of the box 
and we should enrich the json schema with more details
+        boolean apacheCamel = "org.apache.camel".equals(project.getGroupId());
+
         // find camel-core and grab the data format model from there, and 
enrich this model with information from this artifact
         // and create json schema model file for this data format
         try {
-            if (count > 0) {
+            if (apacheCamel && count > 0) {
                 Artifact camelCore = findCamelCoreArtifact(project);
                 if (camelCore != null) {
                     File core = camelCore.getFile();

http://git-wip-us.apache.org/repos/asf/camel/blob/7910e79e/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLanguageMojo.java
----------------------------------------------------------------------
diff --git 
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLanguageMojo.java
 
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLanguageMojo.java
index 9dc618d..e6ff6d2 100644
--- 
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLanguageMojo.java
+++ 
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLanguageMojo.java
@@ -144,10 +144,13 @@ public class PackageLanguageMojo extends AbstractMojo {
             }
         }
 
-        // find camel-core and grab the data format model from there, and 
enrich this model with information from this artifact
-        // and create json schema model file for this data format
+        // is this from Apache Camel then the data format is out of the box 
and we should enrich the json schema with more details
+        boolean apacheCamel = "org.apache.camel".equals(project.getGroupId());
+
+        // find camel-core and grab the language model from there, and enrich 
this model with information from this artifact
+        // and create json schema model file for this language
         try {
-            if (count > 0) {
+            if (apacheCamel && count > 0) {
                 Artifact camelCore = findCamelCoreArtifact(project);
                 if (camelCore != null) {
                     File core = camelCore.getFile();

Reply via email to