[1/2] camel git commit: CAMEL-7999: apt compiler to generate json schema documentation for the model, whcih we later use to enrich the xml xsd to include documentation. Work in progress.

2014-12-31 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master 4c130488c - 92a351e34


CAMEL-7999: apt compiler to generate json schema documentation for the model, 
whcih we later use to enrich the xml xsd to include documentation. Work in 
progress.


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

Branch: refs/heads/master
Commit: e5bdc179bf7887dff79f814f91791c1a9bb593b9
Parents: 4c13048
Author: Claus Ibsen davscl...@apache.org
Authored: Wed Dec 31 08:35:16 2014 +0100
Committer: Claus Ibsen davscl...@apache.org
Committed: Wed Dec 31 08:35:16 2014 +0100

--
 .../camel/tools/apt/EipAnnotationProcessor.java | 708 +++
 .../ModelDocumentationAnnotationProcessor.java  | 708 ---
 .../javax.annotation.processing.Processor   |   2 +-
 3 files changed, 709 insertions(+), 709 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/e5bdc179/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java
--
diff --git 
a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java
 
b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java
new file mode 100644
index 000..8805c1b
--- /dev/null
+++ 
b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java
@@ -0,0 +1,708 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.tools.apt;
+
+import java.io.PrintWriter;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
+import javax.annotation.processing.RoundEnvironment;
+import javax.annotation.processing.SupportedAnnotationTypes;
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ElementKind;
+import javax.lang.model.element.Modifier;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.type.TypeMirror;
+import javax.lang.model.util.ElementFilter;
+import javax.lang.model.util.Elements;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementRef;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.apache.camel.spi.Label;
+
+import static org.apache.camel.tools.apt.JsonSchemaHelper.sanitizeDescription;
+import static org.apache.camel.tools.apt.Strings.canonicalClassName;
+import static org.apache.camel.tools.apt.Strings.isNullOrEmpty;
+import static org.apache.camel.tools.apt.Strings.safeNull;
+
+// TODO: figure out a way to specify default value in the model classes which 
this APT can read
+
+// TODO: add support for @XmlElements which a few EIPs uses such as resequence
+//@XmlElements({
+//@XmlElement(name = batch-config, type = 
BatchResequencerConfig.class),
+//@XmlElement(name = stream-config, type = 
StreamResequencerConfig.class)}
+//)
+
+
+/**
+ * Process all camel-core's model classes (EIPs and DSL) and generate json 
schema documentation
+ */
+@SupportedAnnotationTypes({javax.xml.bind.annotation.*, 
org.apache.camel.spi.Label})
+@SupportedSourceVersion(SourceVersion.RELEASE_7)
+public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
+
+// special when using expression/predicates in the model
+private static final String ONE_OF_TYPE_NAME = 
org.apache.camel.model.ExpressionSubElementDefinition;
+private static final String ONE_OF_LANGUAGES = 
org.apache.camel.model.language.ExpressionDefinition;
+// special for outputs (these classes have sub classes, so we use this to 
find all classes)
+private static final String[] ONE_OF_OUTPUTS = new String[]{
+

[1/3] camel git commit: CAMEL-7999: apt compiler to generate json schema documentation for the model, whcih we later use to enrich the xml xsd to include documentation. Work in progress.

2014-12-31 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master 92a351e34 - f2fa80268


CAMEL-7999: apt compiler to generate json schema documentation for the model, 
whcih we later use to enrich the xml xsd to include documentation. Work in 
progress.


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

Branch: refs/heads/master
Commit: 1615993b7743218e69cc82fb56ffa99227635a9b
Parents: 92a351e
Author: Claus Ibsen davscl...@apache.org
Authored: Wed Dec 31 10:03:26 2014 +0100
Committer: Claus Ibsen davscl...@apache.org
Committed: Wed Dec 31 10:04:49 2014 +0100

--
 .../camel/tools/apt/EipAnnotationProcessor.java | 62 
 .../tools/apt/EndpointAnnotationProcessor.java  | 35 ---
 .../camel/tools/apt/JsonSchemaHelper.java   | 10 +++-
 3 files changed, 71 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/1615993b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java
--
diff --git 
a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java
 
b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java
index a4aa927..eb877c7 100644
--- 
a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java
+++ 
b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java
@@ -49,8 +49,6 @@ import static org.apache.camel.tools.apt.Strings.safeNull;
 
 // TODO: figure out a way to specify default value in the model classes which 
this APT can read
 
-// TODO: add support for @deprecated
-
 /**
  * Process all camel-core's model classes (EIPs and DSL) and generate json 
schema documentation
  */
@@ -173,7 +171,7 @@ public class EipAnnotationProcessor extends 
AbstractAnnotationProcessor {
 String doc = entry.getDocumentation();
 doc = sanitizeDescription(doc, false);
 buffer.append(JsonSchemaHelper.toJson(entry.getName(), 
entry.getKind(), entry.isRequired(), entry.getType(), entry.getDefaultValue(), 
doc,
-entry.isEnumType(), entry.getEnums(), entry.isOneOf(), 
entry.getOneOfTypes()));
+entry.isDeprecated(), entry.isEnumType(), 
entry.getEnums(), entry.isOneOf(), entry.getOneOfTypes()));
 }
 buffer.append(\n  });
 
@@ -311,7 +309,9 @@ public class EipAnnotationProcessor extends 
AbstractAnnotationProcessor {
 }
 }
 
-EipOption ep = new EipOption(name, attribute, fieldTypeName, 
required, , docComment, isEnum, enums, false, null);
+boolean deprecated = fieldElement.getAnnotation(Deprecated.class) != 
null;
+
+EipOption ep = new EipOption(name, attribute, fieldTypeName, 
required, , docComment, deprecated, isEnum, enums, false, null);
 eipOptions.add(ep);
 
 return false;
@@ -372,7 +372,9 @@ public class EipAnnotationProcessor extends 
AbstractAnnotationProcessor {
 }
 }
 
-EipOption ep = new EipOption(name, kind, fieldTypeName, required, 
, docComment, isEnum, enums, isOneOf, oneOfTypes);
+boolean deprecated = fieldElement.getAnnotation(Deprecated.class) 
!= null;
+
+EipOption ep = new EipOption(name, kind, fieldTypeName, required, 
, docComment, deprecated, isEnum, enums, isOneOf, oneOfTypes);
 eipOptions.add(ep);
 }
 }
@@ -401,7 +403,7 @@ public class EipAnnotationProcessor extends 
AbstractAnnotationProcessor {
 oneOfTypes.add(child);
 }
 
-EipOption ep = new EipOption(name, kind, fieldTypeName, required, 
, docComment, false, null, true, oneOfTypes);
+EipOption ep = new EipOption(name, kind, fieldTypeName, required, 
, docComment, false, false, null, true, oneOfTypes);
 eipOptions.add(ep);
 }
 }
@@ -413,52 +415,52 @@ public class EipAnnotationProcessor extends 
AbstractAnnotationProcessor {
 
 // group
 String docComment = findJavaDoc(elementUtils, null, group, 
classElement, true);
-EipOption ep = new EipOption(group, attribute, java.lang.String, 
false, , docComment, false, null, false, null);
+EipOption ep = new EipOption(group, attribute, java.lang.String, 
false, , docComment, false, false, null, false, null);
 eipOptions.add(ep);
 
 // group
 docComment = findJavaDoc(elementUtils, null, streamCache, 
classElement, true);
-ep = new EipOption(streamCache, attribute, java.lang.String, 
false, , docComment, false, null, false, null);
+ep = new 

[2/3] camel git commit: CAMEL-7999: apt compiler to generate json schema documentation for the model, whcih we later use to enrich the xml xsd to include documentation. Work in progress.

2014-12-31 Thread davsclaus
CAMEL-7999: apt compiler to generate json schema documentation for the model, 
whcih we later use to enrich the xml xsd to include documentation. Work in 
progress.


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

Branch: refs/heads/master
Commit: d42ba1f8984bc3fcba9f41e2f181157566d92f71
Parents: 1615993
Author: Claus Ibsen davscl...@apache.org
Authored: Wed Dec 31 10:37:03 2014 +0100
Committer: Claus Ibsen davscl...@apache.org
Committed: Wed Dec 31 10:37:03 2014 +0100

--
 .../DirectComponentConfigurationAndDocumentationTest.java   | 2 +-
 .../timer/TimerComponentConfigurationAndDocumentationTest.java  | 3 ++-
 .../xslt/XsltComponentConfigurationAndDocumentationTest.java| 2 +-
 .../test/java/org/apache/camel/impl/EipDocumentationTest.java   | 5 +++--
 .../org/apache/camel/management/ManagedCamelContextTest.java| 2 +-
 5 files changed, 8 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/d42ba1f8/camel-core/src/test/java/org/apache/camel/component/direct/DirectComponentConfigurationAndDocumentationTest.java
--
diff --git 
a/camel-core/src/test/java/org/apache/camel/component/direct/DirectComponentConfigurationAndDocumentationTest.java
 
b/camel-core/src/test/java/org/apache/camel/component/direct/DirectComponentConfigurationAndDocumentationTest.java
index 60db3ec..b33c15a 100644
--- 
a/camel-core/src/test/java/org/apache/camel/component/direct/DirectComponentConfigurationAndDocumentationTest.java
+++ 
b/camel-core/src/test/java/org/apache/camel/component/direct/DirectComponentConfigurationAndDocumentationTest.java
@@ -61,7 +61,7 @@ public class DirectComponentConfigurationAndDocumentationTest 
extends ContextTes
 
 // should include javadoc
 assertTrue(Should include javadoc, json.contains(\timeout\: { 
\kind\: \parameter\, \type\: \integer\, \javaType\: \long\,
-+  \defaultValue\: \3\,
++  \deprecated\: \false\, \defaultValue\: \3\,
 +  \description\: \The timeout value to use if block is 
enabled. Is by default 3.\));
 }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d42ba1f8/camel-core/src/test/java/org/apache/camel/component/timer/TimerComponentConfigurationAndDocumentationTest.java
--
diff --git 
a/camel-core/src/test/java/org/apache/camel/component/timer/TimerComponentConfigurationAndDocumentationTest.java
 
b/camel-core/src/test/java/org/apache/camel/component/timer/TimerComponentConfigurationAndDocumentationTest.java
index e64d517..4fffa87 100644
--- 
a/camel-core/src/test/java/org/apache/camel/component/timer/TimerComponentConfigurationAndDocumentationTest.java
+++ 
b/camel-core/src/test/java/org/apache/camel/component/timer/TimerComponentConfigurationAndDocumentationTest.java
@@ -41,7 +41,8 @@ public class TimerComponentConfigurationAndDocumentationTest 
extends ContextTest
 String json = compConf.createParameterJsonSchema();
 assertNotNull(json);
 
-assertTrue(json.contains(\timerName\: { \kind\: \path\, 
\type\: \string\, \javaType\: \java.lang.String\, \description\: 
\The name of the timer\ }));
+assertTrue(json.contains(\timerName\: { \kind\: \path\, 
\type\: \string\, \javaType\: \java.lang.String\
++ , \deprecated\: \false\, \description\: \The name of 
the timer\ }));
 assertTrue(json.contains(\delay\: { \kind\: \parameter\, 
\type\: \integer\));
 }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d42ba1f8/camel-core/src/test/java/org/apache/camel/component/xslt/XsltComponentConfigurationAndDocumentationTest.java
--
diff --git 
a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltComponentConfigurationAndDocumentationTest.java
 
b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltComponentConfigurationAndDocumentationTest.java
index 794d16a..ac069c4 100644
--- 
a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltComponentConfigurationAndDocumentationTest.java
+++ 
b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltComponentConfigurationAndDocumentationTest.java
@@ -41,7 +41,7 @@ public class XsltComponentConfigurationAndDocumentationTest 
extends ContextTestS
 String json = compConf.createParameterJsonSchema();
 assertNotNull(json);
 
-assertTrue(json.contains(\contentCache\: { \kind\: \parameter\, 
\type\: \boolean\, \javaType\: \boolean\, \defaultValue\: \true\ 
}));
+

[3/3] camel git commit: CAMEL-7999: apt compiler to generate json schema documentation for the model, whcih we later use to enrich the xml xsd to include documentation. Work in progress.

2014-12-31 Thread davsclaus
CAMEL-7999: apt compiler to generate json schema documentation for the model, 
whcih we later use to enrich the xml xsd to include documentation. Work in 
progress.


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

Branch: refs/heads/master
Commit: f2fa8026808948e594c57ab2124e12e06484b8f5
Parents: d42ba1f
Author: Claus Ibsen davscl...@apache.org
Authored: Wed Dec 31 11:11:20 2014 +0100
Committer: Claus Ibsen davscl...@apache.org
Committed: Wed Dec 31 11:35:41 2014 +0100

--
 .../management/mbean/CamelOpenMBeanTypes.java   | 12 
 .../apache/camel/impl/DefaultCamelContext.java  | 30 ++--
 .../camel/management/mbean/ManagedEndpoint.java |  5 ++--
 .../management/mbean/ManagedProcessor.java  |  5 ++--
 .../management/ManagedCamelContextTest.java |  6 ++--
 ...ponentConfigurationAndDocumentationTest.java |  2 +-
 .../camel/commands/EipExplainCommand.java   |  5 
 .../camel/commands/EndpointExplainCommand.java  |  5 
 8 files changed, 47 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/f2fa8026/camel-core/src/main/java/org/apache/camel/api/management/mbean/CamelOpenMBeanTypes.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/api/management/mbean/CamelOpenMBeanTypes.java
 
b/camel-core/src/main/java/org/apache/camel/api/management/mbean/CamelOpenMBeanTypes.java
index df14e88..bfb346d 100644
--- 
a/camel-core/src/main/java/org/apache/camel/api/management/mbean/CamelOpenMBeanTypes.java
+++ 
b/camel-core/src/main/java/org/apache/camel/api/management/mbean/CamelOpenMBeanTypes.java
@@ -72,9 +72,9 @@ public final class CamelOpenMBeanTypes {
 }
 
 public static CompositeType explainEndpointsCompositeType() throws 
OpenDataException {
-return new CompositeType(endpoints, Endpoints, new 
String[]{option, kind, type, java type, value, default value, 
description},
-new String[]{Option, Kind, Type, Java Type, Value, 
Default Value, Description},
-new OpenType[]{SimpleType.STRING, SimpleType.STRING, 
SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, 
SimpleType.STRING});
+return new CompositeType(endpoints, Endpoints, new 
String[]{option, kind, type, java type, deprecated, value, default 
value, description},
+new String[]{Option, Kind, Type, Java Type, 
Deprecated, Value, Default Value, Description},
+new OpenType[]{SimpleType.STRING, SimpleType.STRING, 
SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, 
SimpleType.STRING, SimpleType.STRING});
 }
 
 public static TabularType explainEipTabularType() throws OpenDataException 
{
@@ -83,9 +83,9 @@ public final class CamelOpenMBeanTypes {
 }
 
 public static CompositeType explainEipsCompositeType() throws 
OpenDataException {
-return new CompositeType(eips, EIPs, new String[]{option, 
kind, type, java type, value, default value, description},
-new String[]{Option, Kind, Type, Java Type, Value, 
Default Value, Description},
-new OpenType[]{SimpleType.STRING, SimpleType.STRING, 
SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, 
SimpleType.STRING});
+return new CompositeType(eips, EIPs, new String[]{option, 
kind, type, java type, deprecated, value, default value, 
description},
+new String[]{Option, Kind, Type, Java Type, 
Deprecated, Value, Default Value, Description},
+new OpenType[]{SimpleType.STRING, SimpleType.STRING, 
SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, 
SimpleType.STRING, SimpleType.STRING});
 }
 
 public static TabularType listComponentsTabularType() throws 
OpenDataException {

http://git-wip-us.apache.org/repos/asf/camel/blob/f2fa8026/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java 
b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
index 6a41243..f9c8bca 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
@@ -1241,6 +1241,7 @@ public class DefaultCamelContext extends ServiceSupport 
implements ModelCamelCon
 String defaultValue = row.get(defaultValue);
 String type = row.get(type);
 String 

[1/2] camel git commit: CAMEL-7999: apt compiler to generate json schema documentation for the model, whcih we later use to enrich the xml xsd to include documentation. Work in progress.

2014-12-31 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master f2fa80268 - 8081351ff


CAMEL-7999: apt compiler to generate json schema documentation for the model, 
whcih we later use to enrich the xml xsd to include documentation. Work in 
progress.


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

Branch: refs/heads/master
Commit: f93e1d54a63f3459e3999dac03fdbe3a9956d480
Parents: f2fa802
Author: Claus Ibsen davscl...@apache.org
Authored: Wed Dec 31 13:49:37 2014 +0100
Committer: Claus Ibsen davscl...@apache.org
Committed: Wed Dec 31 15:10:21 2014 +0100

--
 camel-core/pom.xml  |   8 ++
 .../java/org/apache/camel/CamelContext.java |   9 ++
 .../management/mbean/CamelOpenMBeanTypes.java   |  11 ++
 .../mbean/ManagedCamelContextMBean.java |  27 
 .../apache/camel/impl/DefaultCamelContext.java  |   4 +
 .../management/mbean/ManagedCamelContext.java   |  42 ++
 .../apache/camel/util/CamelContextHelper.java   |  99 +-
 .../management/ManagedCamelContextTest.java |  69 ++
 .../camel/maven/packaging/PackageHelper.java|  51 +++
 .../camel/maven/packaging/PackageModelMojo.java | 134 +++
 .../camel/maven/packaging/PackageMojo.java  |   2 +-
 .../maven/packaging/PrepareCatalogMojo.java |  25 +---
 12 files changed, 455 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/f93e1d54/camel-core/pom.xml
--
diff --git a/camel-core/pom.xml b/camel-core/pom.xml
index b6328e0..7a3b86b 100644
--- a/camel-core/pom.xml
+++ b/camel-core/pom.xml
@@ -278,11 +278,19 @@
 version${project.version}/version
 executions
   execution
+idcomponents/id
 goals
   goalgenerate-components-list/goal
 /goals
 phasegenerate-resources/phase
   /execution
+  execution
+ideips/id
+goals
+  goalgenerate-eips-list/goal
+/goals
+phaseprocess-classes/phase
+  /execution
 /executions
   /plugin
 /plugins

http://git-wip-us.apache.org/repos/asf/camel/blob/f93e1d54/camel-core/src/main/java/org/apache/camel/CamelContext.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/CamelContext.java 
b/camel-core/src/main/java/org/apache/camel/CamelContext.java
index 830a625..0141473 100644
--- a/camel-core/src/main/java/org/apache/camel/CamelContext.java
+++ b/camel-core/src/main/java/org/apache/camel/CamelContext.java
@@ -1386,6 +1386,15 @@ public interface CamelContext extends 
SuspendableService, RuntimeConfiguration {
 MapString, Properties findComponents() throws LoadPropertiesException, 
IOException;
 
 /**
+ * Find information about all the EIPs from camel-core.
+ *
+ * @return a map with node id, and value with EIP details.
+ * @throws LoadPropertiesException is thrown if error during classpath 
discovery of the EIPs
+ * @throws IOException is thrown if error during classpath discovery of 
the EIPs
+ */
+MapString, Properties findEips() throws LoadPropertiesException, 
IOException;
+
+/**
  * Returns the HTML documentation for the given Camel component
  *
  * @return the HTML or ttnull/tt if the component is bnot/b built 
with HTML document included.

http://git-wip-us.apache.org/repos/asf/camel/blob/f93e1d54/camel-core/src/main/java/org/apache/camel/api/management/mbean/CamelOpenMBeanTypes.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/api/management/mbean/CamelOpenMBeanTypes.java
 
b/camel-core/src/main/java/org/apache/camel/api/management/mbean/CamelOpenMBeanTypes.java
index bfb346d..5d1fa41 100644
--- 
a/camel-core/src/main/java/org/apache/camel/api/management/mbean/CamelOpenMBeanTypes.java
+++ 
b/camel-core/src/main/java/org/apache/camel/api/management/mbean/CamelOpenMBeanTypes.java
@@ -110,4 +110,15 @@ public final class CamelOpenMBeanTypes {
 new OpenType[]{SimpleType.STRING, SimpleType.STRING, 
SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING});
 }
 
+public static TabularType listEipsTabularType() throws OpenDataException {
+CompositeType ct = listEipsCompositeType();
+return new TabularType(listEips, Lists all the EIPs, ct, new 
String[]{name});
+}
+
+public static CompositeType listEipsCompositeType() throws 
OpenDataException {
+return 

camel git commit: [Spring Boot] Polished Spring configuration.

2014-12-31 Thread hekonsek
Repository: camel
Updated Branches:
  refs/heads/master 8081351ff - 7bde7d010


[Spring Boot] Polished Spring configuration.


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

Branch: refs/heads/master
Commit: 7bde7d0104a440fdfec64683036702ce157b78e0
Parents: 8081351
Author: Henryk Konsek hekon...@gmail.com
Authored: Wed Dec 31 16:02:59 2014 +0100
Committer: Henryk Konsek hekon...@gmail.com
Committed: Wed Dec 31 16:02:59 2014 +0100

--
 .../spring/boot/CamelAutoConfiguration.java | 23 +---
 1 file changed, 10 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/7bde7d01/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
--
diff --git 
a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
 
b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
index 9bf17db..9f1e9fa 100644
--- 
a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
+++ 
b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
@@ -104,18 +104,13 @@ import 
org.springframework.context.annotation.Configuration;
 @EnableConfigurationProperties(CamelConfigurationProperties.class)
 public class CamelAutoConfiguration {
 
-@Autowired
-private CamelConfigurationProperties configurationProperties;
-
-@Autowired
-private ApplicationContext applicationContext;
-
 /**
  * Spring-aware Camel context for the application. Auto-detects and loads 
all routes available in the Spring
  * context.
  */
 @Bean
-CamelContext camelContext() throws Exception {
+CamelContext camelContext(ApplicationContext applicationContext,
+  CamelConfigurationProperties 
configurationProperties) {
 CamelContext camelContext = new SpringCamelContext(applicationContext);
 
 if (!configurationProperties.isJmxEnabled()) {
@@ -134,21 +129,23 @@ public class CamelAutoConfiguration {
  * Default producer template for the bootstrapped Camel context.
  */
 @Bean
-ProducerTemplate producerTemplate() throws Exception {
-return 
camelContext().createProducerTemplate(configurationProperties.getProducerTemplateCacheSize());
+ProducerTemplate producerTemplate(CamelContext camelContext,
+  CamelConfigurationProperties 
configurationProperties) {
+return 
camelContext.createProducerTemplate(configurationProperties.getProducerTemplateCacheSize());
 }
 
 /**
  * Default consumer template for the bootstrapped Camel context.
  */
 @Bean
-ConsumerTemplate consumerTemplate() throws Exception {
-return 
camelContext().createConsumerTemplate(configurationProperties.getConsumerTemplateCacheSize());
+ConsumerTemplate consumerTemplate(CamelContext camelContext,
+  CamelConfigurationProperties 
configurationProperties) {
+return 
camelContext.createConsumerTemplate(configurationProperties.getConsumerTemplateCacheSize());
 }
 
 @Bean
-TypeConverter typeConverter() throws Exception {
-return camelContext().getTypeConverter();
+TypeConverter typeConverter(CamelContext camelContext) {
+return camelContext.getTypeConverter();
 }
 
 @Bean



[1/2] camel git commit: upgrade jruby 1.7.16 to 1.7.18

2014-12-31 Thread cmueller
Repository: camel
Updated Branches:
  refs/heads/master 7bde7d010 - b1552656f


upgrade jruby 1.7.16 to 1.7.18


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

Branch: refs/heads/master
Commit: c02a759acba28bd012502feedac51e52f1d9f40d
Parents: 7bde7d0
Author: Christian Mueller cmuel...@apache.org
Authored: Wed Dec 31 17:54:31 2014 +0100
Committer: Christian Mueller cmuel...@apache.org
Committed: Wed Dec 31 18:04:40 2014 +0100

--
 parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/c02a759a/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index ee79596..39e4faf 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -268,7 +268,7 @@
 jolokia-version1.2.3/jolokia-version
 josql-bundle-version1.5_5/josql-bundle-version
 josql-version1.5/josql-version
-jruby-version1.7.16/jruby-version
+jruby-version1.7.18/jruby-version
 jsendnsca-version1.3.1/jsendnsca-version
 jsmpp-version2.1.0_5/jsmpp-version
 jsch-version0.1.51/jsch-version



[2/2] camel git commit: CAMEL-8201: NPE with language:ruby and concurrentConsumers - added unit test which is reproducing the issue

2014-12-31 Thread cmueller
CAMEL-8201: NPE with language:ruby and concurrentConsumers - added unit test 
which is reproducing the issue


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

Branch: refs/heads/master
Commit: b1552656f52b33379773b2e26cf4df8a64790039
Parents: c02a759
Author: Christian Mueller cmuel...@apache.org
Authored: Wed Dec 31 18:04:07 2014 +0100
Committer: Christian Mueller cmuel...@apache.org
Committed: Wed Dec 31 18:04:41 2014 +0100

--
 .../builder/script/RubyScriptTextTest.java  | 71 
 1 file changed, 71 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/b1552656/components/camel-script/src/test/java/org/apache/camel/builder/script/RubyScriptTextTest.java
--
diff --git 
a/components/camel-script/src/test/java/org/apache/camel/builder/script/RubyScriptTextTest.java
 
b/components/camel-script/src/test/java/org/apache/camel/builder/script/RubyScriptTextTest.java
new file mode 100755
index 000..875f309
--- /dev/null
+++ 
b/components/camel-script/src/test/java/org/apache/camel/builder/script/RubyScriptTextTest.java
@@ -0,0 +1,71 @@
+package org.apache.camel.builder.script;
+
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class RubyScriptTextTest extends CamelTestSupport {
+
+@EndpointInject(uri = mock:result)
+MockEndpoint resultEndpoint;
+
+final int messageCount = 500;
+
+@Test
+public void parallelExecutionWithCachedScriptAndReusedScriptEngine() 
throws Exception {
+context.addRoutes(new RouteBuilder() {
+public void configure() throws Exception {
+getContext().getProperties().put(Exchange.REUSE_SCRIPT_ENGINE, 
true);
+//getContext().getProperties().put(Exchange.COMPILE_SCRIPT, 
true);
+
+from(seda:jruby?concurrentConsumers=5)
+.to(language:ruby:puts $request.body;result = 
$request.body?cacheScript=true)
+.to(resultEndpoint);
+}
+});
+
+resultEndpoint.setExpectedMessageCount(messageCount);
+resultEndpoint.assertNoDuplicates(body());
+
+for (int i = 1; i  messageCount + 1; i++) {
+template.sendBody(seda:jruby, BODY + i);
+}
+
+assertMockEndpointsSatisfied(5, TimeUnit.SECONDS);
+}
+
+@Test
+@Ignore
+public void 
parallelExecutionWithoutCachedScriptAndNewScriptEngineForEachExchange() throws 
Exception {
+context.addRoutes(new RouteBuilder() {
+public void configure() throws Exception {
+//getContext().getProperties().put(Exchange.COMPILE_SCRIPT, 
true);
+
+from(seda:jruby?concurrentConsumers=5)
+.to(language:ruby:puts $request.body;result = 
$request.body)
+.to(resultEndpoint);
+}
+});
+
+resultEndpoint.setExpectedMessageCount(messageCount);
+resultEndpoint.assertNoDuplicates(body());
+
+for (int i = 1; i  messageCount + 1; i++) {
+template.sendBody(seda:jruby, BODY + i);
+}
+
+assertMockEndpointsSatisfied(5, TimeUnit.SECONDS);
+}
+}



camel git commit: upgrade jruby 1.7.16 to 1.7.18

2014-12-31 Thread cmueller
Repository: camel
Updated Branches:
  refs/heads/camel-2.14.x c1d61bc62 - fb4cb5c10


upgrade jruby 1.7.16 to 1.7.18

Conflicts:
parent/pom.xml


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

Branch: refs/heads/camel-2.14.x
Commit: fb4cb5c1075c2c92a1314ddd69fb6084cd7b186a
Parents: c1d61bc
Author: Christian Mueller cmuel...@apache.org
Authored: Wed Dec 31 17:54:31 2014 +0100
Committer: Christian Mueller cmuel...@apache.org
Committed: Wed Dec 31 18:07:06 2014 +0100

--
 parent/pom.xml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/fb4cb5c1/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index a8267b8d..711fe6f 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -253,8 +253,7 @@
 jodatime2-bundle-version2.5/jodatime2-bundle-version
 josql-bundle-version1.5_5/josql-bundle-version
 josql-version1.5/josql-version
-!-- jruby-core 1.7.14 and 1.7.15 are not valid OSGI bundles: see 
https://github.com/jruby/jruby/issues/1971 --
-jruby-version1.7.13/jruby-version
+jruby-version1.7.18/jruby-version
 jsendnsca-version1.3.1/jsendnsca-version
 jsmpp-version2.1.0_4/jsmpp-version
 jsch-version0.1.51/jsch-version



camel git commit: upgrade jruby 1.7.16 to 1.7.18

2014-12-31 Thread cmueller
Repository: camel
Updated Branches:
  refs/heads/camel-2.13.x 945c7272c - abde55056


upgrade jruby 1.7.16 to 1.7.18

Conflicts:
parent/pom.xml


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

Branch: refs/heads/camel-2.13.x
Commit: abde5505661b2f9cb900c7a0ab997701b353a077
Parents: 945c727
Author: Christian Mueller cmuel...@apache.org
Authored: Wed Dec 31 17:54:31 2014 +0100
Committer: Christian Mueller cmuel...@apache.org
Committed: Wed Dec 31 18:08:04 2014 +0100

--
 parent/pom.xml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/abde5505/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index e6bf41d..27de44e 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -236,8 +236,7 @@
 jodatime2-bundle-version2.3/jodatime2-bundle-version
 josql-bundle-version1.5_5/josql-bundle-version
 josql-version1.5/josql-version
-!-- jruby-core 1.7.14 and 1.7.15 are not valid OSGI bundles: see 
https://github.com/jruby/jruby/issues/1971 --
-jruby-version1.7.13/jruby-version
+jruby-version1.7.18/jruby-version
 jsendnsca-version1.3.1/jsendnsca-version
 jsmpp-version2.1.0_4/jsmpp-version
 jsch-version0.1.51/jsch-version



svn commit: r934630 - in /websites/production/camel/content: cache/main.pageCache camel-2150-release.html

2014-12-31 Thread buildbot
Author: buildbot
Date: Wed Dec 31 18:19:32 2014
New Revision: 934630

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/camel-2150-release.html

Modified: websites/production/camel/content/cache/main.pageCache
==
Binary files - no diff available.

Modified: websites/production/camel/content/camel-2150-release.html
==
--- websites/production/camel/content/camel-2150-release.html (original)
+++ websites/production/camel/content/camel-2150-release.html Wed Dec 31 
18:19:32 2014
@@ -84,7 +84,7 @@
tbody
 tr
 td valign=top width=100%
-div class=wiki-content maincontenth1 
id=Camel2.15.0Release-Camel2.15.0release(currentlyinprogress)Camel#160;2.15.0
 release (currently in progress)/h1div 
style=padding-right:20px;float:left;margin-left:-20px;pimg 
class=confluence-embedded-image confluence-external-resource 
src=http://camel.apache.org/download.data/camel-box-v1.0-150x200.png; 
data-image-src=http://camel.apache.org/download.data/camel-box-v1.0-150x200.png;/p/divdiv
 style=min-height:200px#160;/divh2 
id=Camel2.15.0Release-NewandNoteworthyNew and Noteworthy/h2pWelcome to 
the 2.15.0 release which approx XXX issues resolved (new features, improvements 
and bug fixes such as...)/pullispanComponent documentation now included 
in the built component JARs. And Java API and JMX API to access that 
documentation. And APIs to explain an endpoint uri and what all those 
configured options mean.#160;/span/lilispanComponent can now 
have#160;associated#160;label(s) which are use
 d for grouping components into: core, database, messaging, http, rest, 
etc./span/lilispanProvide Configurer for user to configure the CXF 
conduit and CXF destination from Java code/span/lilispanspanAdded a 
codeDelegateEndpoint/code#160;interface into Camel 
API/span/span/liliSupport to setup the SslContextParameters in the a 
shape=rect href=restlet.htmlcamel-restlet/a component/liliJava DSL - 
Should support nested choice in doTry .. doCatch/lilia shape=rect 
href=mongodb.htmlMongoDb/a component now a shape=rect 
class=external-link 
href=https://issues.apache.org/jira/browse/CAMEL-7996;stores OIDs/a#160;of 
the inserted records in the message header/lilia shape=rect 
href=recipient-list.htmlRecipient List/a now supports specifying 
custom#160;a shape=rect href=exchange-pattern.htmlExchange Pattern/a 
in the endpoint ur's/lilia shape=rect href=type-converter.htmlType 
Converter/a to enum's is now
  case insensitive, so you can convert safely level=info to an enum with name 
Level.INFO etc./lilia shape=rect href=xslt.htmlXSLT/a and#160;a 
shape=rect 
href=https://cwiki.apache.org/confluence/display/SM/Validation;Validation/a 
components now provides all their endpoint configurations in the endpoint, and 
not only in the component, making these components like any other 
components./liliMade the a shape=rect href=karaf.htmlCamel Karaf 
Commands/a reusable by moving common code into 
a#160;codecamel-commands-core/code module that SPI can extend and plugin 
Camel commands for other environments./liliFurther hardening of the#160;a 
shape=rect href=sjms.htmlSJMS/a#160;component./lilia shape=rect 
href=rest-dsl.htmlRest DSL/a with embedded routes now supports a 
shape=rect href=exception-clause.htmlonException/a, a shape=rect 
href=intercept.htmlintercept/a etc in use for those embedded routes, just 
like any regular r
 outes.#160;/lilia shape=rect href=rest-dsl.htmlRest DSL/a now by 
default uses custom error message as-is without attempting to binding output 
(requires a HTTP error code of 300+ is set as a header)/liliCamel#160;a 
shape=rect href=using-propertyplaceholder.htmlUsing 
PropertyPlaceholder/a now supports specifying a default value together with 
the key to lookup./liliCamel#160;a shape=rect 
href=using-propertyplaceholder.htmlUsing PropertyPlaceholder/a now 
supports not having to define a PropertiesComponent if all the placeholder keys 
has default values which are to be used (less configuration needed in those 
situations)./liliCamel#160;a shape=rect 
href=using-propertyplaceholder.htmlUsing PropertyPlaceholder/a now 
supports 3rd party functions to lookup the property values, this allow end 
users to implement their own logic - we provide 3 out of the box functions to 
lookup values from OS environment variable, JVM system properties, or the 
 service name idiom./lilia shape=rect href=rabbitmq.htmlRabbitMQ/a 
now pools Channels for the producer to avoid sharing same Channel among 
concurrent producers which are not recommended by RabbitMQ 
client./liliCamel commands is now reusable outside Apache Karaf as a base 
by the#160;codecommands-core/code module./liliCamel commands using a 
shape=rect class=external-link href=http://www.jolokia.org/;