camel git commit: ServiceCall: add support for expression builder dsl

2017-04-11 Thread lburgazzoli
Repository: camel
Updated Branches:
  refs/heads/master fbd8d65fd -> 70e08b750


ServiceCall: add support for expression builder dsl


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

Branch: refs/heads/master
Commit: 70e08b7500d4cc1ebea8c93a62bf2d16bfc5df8c
Parents: fbd8d65
Author: lburgazzoli 
Authored: Tue Apr 11 22:19:27 2017 +0200
Committer: lburgazzoli 
Committed: Tue Apr 11 22:19:27 2017 +0200

--
 .../cloud/ServiceCallConfigurationDefinition.java  | 13 +
 .../camel/model/cloud/ServiceCallDefinition.java   | 13 +
 2 files changed, 26 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/70e08b75/camel-core/src/main/java/org/apache/camel/model/cloud/ServiceCallConfigurationDefinition.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/model/cloud/ServiceCallConfigurationDefinition.java
 
b/camel-core/src/main/java/org/apache/camel/model/cloud/ServiceCallConfigurationDefinition.java
index 2d09680..73950fe 100644
--- 
a/camel-core/src/main/java/org/apache/camel/model/cloud/ServiceCallConfigurationDefinition.java
+++ 
b/camel-core/src/main/java/org/apache/camel/model/cloud/ServiceCallConfigurationDefinition.java
@@ -26,6 +26,7 @@ import javax.xml.bind.annotation.XmlTransient;
 
 import org.apache.camel.ExchangePattern;
 import org.apache.camel.Expression;
+import org.apache.camel.builder.ExpressionClause;
 import org.apache.camel.cloud.LoadBalancer;
 import org.apache.camel.cloud.ServiceChooser;
 import org.apache.camel.cloud.ServiceDiscovery;
@@ -405,6 +406,18 @@ public class ServiceCallConfigurationDefinition extends 
IdentifiedType {
 }
 
 /**
+ * Sets a custom {@link Expression} to use through an expression builder 
clause.
+ *
+ * @return a expression builder clause to set the body
+ */
+public ExpressionClause expression() {
+ExpressionClause clause = new 
ExpressionClause<>(this);
+setExpression(clause);
+
+return clause;
+}
+
+/**
  * Configures the ServiceDiscovery using the given configuration.
  */
 public ServiceCallConfigurationDefinition 
serviceDiscoveryConfiguration(ServiceCallServiceDiscoveryConfiguration 
serviceDiscoveryConfiguration) {

http://git-wip-us.apache.org/repos/asf/camel/blob/70e08b75/camel-core/src/main/java/org/apache/camel/model/cloud/ServiceCallDefinition.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/model/cloud/ServiceCallDefinition.java
 
b/camel-core/src/main/java/org/apache/camel/model/cloud/ServiceCallDefinition.java
index f0bf660..53821ff 100644
--- 
a/camel-core/src/main/java/org/apache/camel/model/cloud/ServiceCallDefinition.java
+++ 
b/camel-core/src/main/java/org/apache/camel/model/cloud/ServiceCallDefinition.java
@@ -31,6 +31,7 @@ import org.apache.camel.CamelContextAware;
 import org.apache.camel.ExchangePattern;
 import org.apache.camel.Expression;
 import org.apache.camel.Processor;
+import org.apache.camel.builder.ExpressionClause;
 import org.apache.camel.cloud.LoadBalancer;
 import org.apache.camel.cloud.ServiceChooser;
 import org.apache.camel.cloud.ServiceChooserAware;
@@ -475,6 +476,18 @@ public class ServiceCallDefinition extends 
NoOutputDefinition expression() {
+ExpressionClause clause = new 
ExpressionClause<>(this);
+setExpression(clause);
+
+return clause;
+}
+
+/**
  * Configures the ServiceDiscovery using the given configuration.
  */
 public ServiceCallDefinition 
serviceDiscoveryConfiguration(ServiceCallServiceDiscoveryConfiguration 
serviceDiscoveryConfiguration) {



[2/2] camel git commit: Regen docs

2017-04-11 Thread davsclaus
Regen docs


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

Branch: refs/heads/master
Commit: fbd8d65fd4557779988ad5235090b9c1583c8f95
Parents: 2213f71
Author: Claus Ibsen 
Authored: Tue Apr 11 20:46:44 2017 +0200
Committer: Claus Ibsen 
Committed: Tue Apr 11 20:46:44 2017 +0200

--
 .../camel-snakeyaml/src/main/docs/yaml-snakeyaml-dataformat.adoc   | 2 +-
 .../snakeyaml/springboot/SnakeYAMLDataFormatConfiguration.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/fbd8d65f/components/camel-snakeyaml/src/main/docs/yaml-snakeyaml-dataformat.adoc
--
diff --git 
a/components/camel-snakeyaml/src/main/docs/yaml-snakeyaml-dataformat.adoc 
b/components/camel-snakeyaml/src/main/docs/yaml-snakeyaml-dataformat.adoc
index bcfa3c6..15b5691 100644
--- a/components/camel-snakeyaml/src/main/docs/yaml-snakeyaml-dataformat.adoc
+++ b/components/camel-snakeyaml/src/main/docs/yaml-snakeyaml-dataformat.adoc
@@ -24,7 +24,7 @@ The YAML SnakeYAML dataformat supports 11 options which are 
listed below.
 [width="100%",cols="2s,1m,1m,6",options="header"]
 |===
 | Name | Default | Java Type | Description
-| library | SnakeYAML | YAMLLibrary | Which yaml library to use such. Is by 
default SnakeYAML
+| library | SnakeYAML | YAMLLibrary | Which yaml library to use. By default it 
is SnakeYAML
 | unmarshalTypeName |  | String | Class name of the java type to use when 
unarmshalling
 | constructor |  | String | BaseConstructor to construct incoming documents.
 | representer |  | String | Representer to emit outgoing objects.

http://git-wip-us.apache.org/repos/asf/camel/blob/fbd8d65f/platforms/spring-boot/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatConfiguration.java
--
diff --git 
a/platforms/spring-boot/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatConfiguration.java
 
b/platforms/spring-boot/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatConfiguration.java
index 0bd61ab..368e1e4 100644
--- 
a/platforms/spring-boot/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatConfiguration.java
+++ 
b/platforms/spring-boot/components-starter/camel-snakeyaml-starter/src/main/java/org/apache/camel/component/snakeyaml/springboot/SnakeYAMLDataFormatConfiguration.java
@@ -31,7 +31,7 @@ import 
org.springframework.boot.context.properties.ConfigurationProperties;
 public class SnakeYAMLDataFormatConfiguration {
 
 /**
- * Which yaml library to use such. Is by default SnakeYAML
+ * Which yaml library to use. By default it is SnakeYAML
  */
 private YAMLLibrary library = YAMLLibrary.SnakeYAML;
 /**



[1/2] camel git commit: Component docs - apt compiler plugin should support @Metadata enums for eip/data formats as well.

2017-04-11 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master ab1842307 -> fbd8d65fd


Component docs - apt compiler plugin should support @Metadata enums for 
eip/data formats as well.


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

Branch: refs/heads/master
Commit: 2213f71944aec8020c1023b5a389aec84e685893
Parents: ab18423
Author: Claus Ibsen 
Authored: Tue Apr 11 20:18:47 2017 +0200
Committer: Claus Ibsen 
Committed: Tue Apr 11 20:18:47 2017 +0200

--
 .../ProtobufDataFormatConfiguration.java|  1 +
 .../tools/apt/CoreEipAnnotationProcessor.java   | 66 +---
 2 files changed, 44 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/2213f719/platforms/spring-boot/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatConfiguration.java
--
diff --git 
a/platforms/spring-boot/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatConfiguration.java
 
b/platforms/spring-boot/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatConfiguration.java
index 7b693cc..85a6319 100644
--- 
a/platforms/spring-boot/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatConfiguration.java
+++ 
b/platforms/spring-boot/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatConfiguration.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.dataformat.protobuf.springboot;
 
+import org.apache.camel.dataformat.protobuf.ProtobufDataFormat;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**

http://git-wip-us.apache.org/repos/asf/camel/blob/2213f719/tooling/apt/src/main/java/org/apache/camel/tools/apt/CoreEipAnnotationProcessor.java
--
diff --git 
a/tooling/apt/src/main/java/org/apache/camel/tools/apt/CoreEipAnnotationProcessor.java
 
b/tooling/apt/src/main/java/org/apache/camel/tools/apt/CoreEipAnnotationProcessor.java
index 73eb1bf..2a0b720 100644
--- 
a/tooling/apt/src/main/java/org/apache/camel/tools/apt/CoreEipAnnotationProcessor.java
+++ 
b/tooling/apt/src/main/java/org/apache/camel/tools/apt/CoreEipAnnotationProcessor.java
@@ -337,6 +337,8 @@ public class CoreEipAnnotationProcessor {
 }
 }
 
+Metadata metadata = fieldElement.getAnnotation(Metadata.class);
+
 name = prefix + name;
 TypeMirror fieldType = fieldElement.asType();
 String fieldTypeName = fieldType.toString();
@@ -350,16 +352,25 @@ public class CoreEipAnnotationProcessor {
 
 // gather enums
 Set enums = new TreeSet();
-boolean isEnum = fieldTypeElement != null && 
fieldTypeElement.getKind() == ElementKind.ENUM;
-if (isEnum) {
-TypeElement enumClass = findTypeElement(processingEnv, roundEnv, 
fieldTypeElement.asType().toString());
-if (enumClass != null) {
-// find all the enum constants which has the possible enum 
value that can be used
-List fields = 
ElementFilter.fieldsIn(enumClass.getEnclosedElements());
-for (VariableElement var : fields) {
-if (var.getKind() == ElementKind.ENUM_CONSTANT) {
-String val = var.toString();
-enums.add(val);
+boolean isEnum;
+if (metadata != null && !Strings.isNullOrEmpty(metadata.enums())) {
+isEnum = true;
+String[] values = metadata.enums().split(",");
+for (String val : values) {
+enums.add(val);
+}
+} else {
+isEnum = fieldTypeElement != null && fieldTypeElement.getKind() == 
ElementKind.ENUM;
+if (isEnum) {
+TypeElement enumClass = findTypeElement(processingEnv, 
roundEnv, fieldTypeElement.asType().toString());
+if (enumClass != null) {
+// find all the enum constants which has the possible enum 
value that can be used
+List fields = 
ElementFilter.fieldsIn(enumClass.getEnclosedElements());
+for (VariableElement var : fields) {
+if (var.getKind() == ElementKind.ENUM_CONSTANT) {
+String val = var.toString();
+  

[5/5] camel git commit: CAMEL-11135: Polished. This closes #1614

2017-04-11 Thread davsclaus
CAMEL-11135: Polished. This closes #1614


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

Branch: refs/heads/master
Commit: ab184230708b868ac643de4db5609c1a18f36fcf
Parents: 04d584f
Author: Claus Ibsen 
Authored: Tue Apr 11 20:04:39 2017 +0200
Committer: Claus Ibsen 
Committed: Tue Apr 11 20:04:39 2017 +0200

--
 .../org/apache/camel/model/dataformat/ProtobufDataFormat.java | 7 ---
 .../camel-protobuf/src/main/docs/protobuf-dataformat.adoc | 2 +-
 .../protobuf/springboot/ProtobufDataFormatConfiguration.java  | 5 +++--
 3 files changed, 8 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/ab184230/camel-core/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java
 
b/camel-core/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java
index dee0ec4..1d1146b1 100644
--- 
a/camel-core/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java
+++ 
b/camel-core/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java
@@ -38,7 +38,7 @@ import org.apache.camel.spi.Metadata;
 public class ProtobufDataFormat extends DataFormatDefinition {
 @XmlAttribute
 private String instanceClass;
-@XmlAttribute
+@XmlAttribute @Metadata(enums = "native,json", defaultValue = "native")
 private String contentTypeFormat;
 @XmlTransient
 private Object defaultInstance;
@@ -71,8 +71,9 @@ public class ProtobufDataFormat extends DataFormatDefinition {
 
 /**
  * Defines a content type format in which protobuf message will be
- * serialized/deserialized from(to) the Java been. It can be native 
protobuf
- * format or json fields representation. The default value is 'native'.
+ * serialized/deserialized from(to) the Java been.
+ * The format can either be native or json for either native protobuf or 
json fields representation.
+ * The default value is native.
  */
 public void setContentTypeFormat(String contentTypeFormat) {
 this.contentTypeFormat = contentTypeFormat;

http://git-wip-us.apache.org/repos/asf/camel/blob/ab184230/components/camel-protobuf/src/main/docs/protobuf-dataformat.adoc
--
diff --git a/components/camel-protobuf/src/main/docs/protobuf-dataformat.adoc 
b/components/camel-protobuf/src/main/docs/protobuf-dataformat.adoc
index 61276e3..c832c73 100644
--- a/components/camel-protobuf/src/main/docs/protobuf-dataformat.adoc
+++ b/components/camel-protobuf/src/main/docs/protobuf-dataformat.adoc
@@ -32,7 +32,7 @@ The Protobuf dataformat supports 3 options which are listed 
below.
 |===
 | Name | Default | Java Type | Description
 | instanceClass |  | String | Name of class to use when unarmshalling
-| contentTypeFormat |  | String | Defines a content type format in which 
protobuf message will be serialized/deserialized from(to) the Java been. It can 
be native protobuf format or json fields representation. The default value is 
'native'.
+| contentTypeFormat | native | String | Defines a content type format in which 
protobuf message will be serialized/deserialized from(to) the Java been. The 
format can either be native or json for either native protobuf or json fields 
representation. The default value is native.
 | contentTypeHeader | false | Boolean | Whether the data format should set the 
Content-Type header with the type from the data format if the data format is 
capable of doing so. For example application/xml for data formats marshalling 
to XML or application/json for data formats marshalling to JSon etc.
 |===
 // dataformat options: END

http://git-wip-us.apache.org/repos/asf/camel/blob/ab184230/platforms/spring-boot/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatConfiguration.java
--
diff --git 
a/platforms/spring-boot/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatConfiguration.java
 
b/platforms/spring-boot/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatConfiguration.java
index be7267c..7b693cc 

[4/5] camel git commit: CAMEL-11135: camel-protobuf component improvements

2017-04-11 Thread davsclaus
CAMEL-11135: camel-protobuf component improvements

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

Branch: refs/heads/master
Commit: 327dfcbd8f312c78ffe1cc4a293612c2432d3867
Parents: 3b977b0
Author: Dmitry Volodin 
Authored: Tue Apr 11 17:49:27 2017 +0300
Committer: Claus Ibsen 
Committed: Tue Apr 11 19:53:20 2017 +0200

--
 .../apache/camel/builder/DataFormatClause.java  |   11 +
 .../model/dataformat/ProtobufDataFormat.java|   20 +
 components/camel-protobuf/ReadMe.md |5 +-
 components/camel-protobuf/pom.xml   |   42 +-
 .../src/main/docs/protobuf-dataformat.adoc  |   82 +-
 .../dataformat/protobuf/ProtobufDataFormat.java |   84 +-
 .../ProtobufMarshalAndUnmarshalJsonTest.java|   73 +
 .../ProtobufMarshalAndUnmarshalSpringTest.java  |2 +-
 .../ProtobufMarshalAndUnmarshalTest.java|   97 +
 .../ProtobufMarshalAndUnmarshallTest.java   |  100 -
 .../protobuf/generated/AddressBookProtos.java   | 2548 --
 .../src/test/proto/addressbook.proto|   29 +
 .../camel-protobuf/src/test/proto/readme.txt|5 +
 .../src/test/resources/addressbook.proto|   27 -
 .../src/test/resources/readme.txt   |5 -
 .../ProtobufDataFormatConfiguration.java|   14 +
 16 files changed, 432 insertions(+), 2712 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/327dfcbd/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java 
b/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java
index 25bea0f..0b18e91 100644
--- a/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java
+++ b/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java
@@ -714,10 +714,21 @@ public class DataFormatClause> {
 dataFormat.setDefaultInstance(defaultInstance);
 return dataFormat(dataFormat);
 }
+
+public T protobuf(Object defaultInstance, String contentTypeFormat) {
+ProtobufDataFormat dataFormat = new ProtobufDataFormat();
+dataFormat.setDefaultInstance(defaultInstance);
+dataFormat.setContentTypeFormat(contentTypeFormat);
+return dataFormat(dataFormat);
+}
 
 public T protobuf(String instanceClassName) {
 return dataFormat(new ProtobufDataFormat(instanceClassName));
 }
+
+public T protobuf(String instanceClassName, String contentTypeFormat) {
+return dataFormat(new ProtobufDataFormat(instanceClassName, 
contentTypeFormat));
+}
 
 /**
  * Uses the RSS data format

http://git-wip-us.apache.org/repos/asf/camel/blob/327dfcbd/camel-core/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java
 
b/camel-core/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java
index 723a6f6..dee0ec4 100644
--- 
a/camel-core/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java
+++ 
b/camel-core/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java
@@ -38,6 +38,8 @@ import org.apache.camel.spi.Metadata;
 public class ProtobufDataFormat extends DataFormatDefinition {
 @XmlAttribute
 private String instanceClass;
+@XmlAttribute
+private String contentTypeFormat;
 @XmlTransient
 private Object defaultInstance;
 
@@ -49,6 +51,12 @@ public class ProtobufDataFormat extends DataFormatDefinition 
{
 this();
 setInstanceClass(instanceClass); 
 }
+
+public ProtobufDataFormat(String instanceClass, String contentTypeFormat) {
+this();
+setInstanceClass(instanceClass);
+setContentTypeFormat(contentTypeFormat);
+}
 
 public String getInstanceClass() {
 return instanceClass;
@@ -60,6 +68,15 @@ public class ProtobufDataFormat extends DataFormatDefinition 
{
 public void setInstanceClass(String instanceClass) {
 this.instanceClass = instanceClass;
 }
+
+/**
+ * Defines a content type format in which protobuf message will be
+ * serialized/deserialized from(to) the Java been. It can be native 
protobuf
+ * format or json fields representation. The default value is 'native'.
+ */
+public void setContentTypeFormat(String contentTypeFormat) {
+this.contentTypeFormat = contentTypeFormat;

[2/5] camel git commit: CAMEL-11135: camel-protobuf component improvements

2017-04-11 Thread davsclaus
http://git-wip-us.apache.org/repos/asf/camel/blob/327dfcbd/components/camel-protobuf/src/test/proto/addressbook.proto
--
diff --git a/components/camel-protobuf/src/test/proto/addressbook.proto 
b/components/camel-protobuf/src/test/proto/addressbook.proto
new file mode 100644
index 000..7fce508
--- /dev/null
+++ b/components/camel-protobuf/src/test/proto/addressbook.proto
@@ -0,0 +1,29 @@
+syntax = "proto2";
+
+package org.apache.camel.dataformat.protobuf.generated;
+
+option java_package = "org.apache.camel.dataformat.protobuf.generated";
+option java_outer_classname = "AddressBookProtos";
+
+message Person {
+  required string name = 1;
+  required int32 id = 2;
+  optional string email = 3;
+
+  enum PhoneType {
+MOBILE = 0;
+HOME = 1;
+WORK = 2;
+  }
+
+  message PhoneNumber {
+required string number = 1;
+required PhoneType type = 2 [default = HOME];
+  }
+
+  repeated PhoneNumber phone = 4;
+}
+
+message AddressBook {
+  repeated Person person = 1;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/327dfcbd/components/camel-protobuf/src/test/proto/readme.txt
--
diff --git a/components/camel-protobuf/src/test/proto/readme.txt 
b/components/camel-protobuf/src/test/proto/readme.txt
new file mode 100644
index 000..633a81a
--- /dev/null
+++ b/components/camel-protobuf/src/test/proto/readme.txt
@@ -0,0 +1,5 @@
+Examples taken from the Protobuf Java tutorial 
https://developers.google.com/protocol-buffers/docs/javatutorial
+
+AddressBookProtos.java generation (if your operating system is not supporting 
by Protobuf Java code generator maven plugin)
+   cd src/test/resources
+   protoc --java_out=. ./addressbook.proto
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/327dfcbd/components/camel-protobuf/src/test/resources/addressbook.proto
--
diff --git a/components/camel-protobuf/src/test/resources/addressbook.proto 
b/components/camel-protobuf/src/test/resources/addressbook.proto
deleted file mode 100755
index 7832032..000
--- a/components/camel-protobuf/src/test/resources/addressbook.proto
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.apache.camel.dataformat.protobuf.generated;
-
-option java_package = "org.apache.camel.dataformat.protobuf.generated";
-option java_outer_classname = "AddressBookProtos";
-
-message Person {
-  required string name = 1;
-  required int32 id = 2;
-  optional string email = 3;
-
-  enum PhoneType {
-MOBILE = 0;
-HOME = 1;
-WORK = 2;
-  }
-
-  message PhoneNumber {
-required string number = 1;
-optional PhoneType type = 2 [default = HOME];
-  }
-
-  repeated PhoneNumber phone = 4;
-}
-
-message AddressBook {
-  repeated Person person = 1;
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/327dfcbd/components/camel-protobuf/src/test/resources/readme.txt
--
diff --git a/components/camel-protobuf/src/test/resources/readme.txt 
b/components/camel-protobuf/src/test/resources/readme.txt
deleted file mode 100755
index 5d1b22e..000
--- a/components/camel-protobuf/src/test/resources/readme.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-Examples taken from the Protobuf Java tutorial 
http://code.google.com/apis/protocolbuffers/docs/javatutorial.html
-
-AddressBookProtos.java generation
-   cd src/test/resources
-   protoc --java_out=. ./addressbook.proto
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/327dfcbd/platforms/spring-boot/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatConfiguration.java
--
diff --git 
a/platforms/spring-boot/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatConfiguration.java
 
b/platforms/spring-boot/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatConfiguration.java
index 02fbd99..be7267c 100644
--- 
a/platforms/spring-boot/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatConfiguration.java
+++ 
b/platforms/spring-boot/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatConfiguration.java
@@ -31,6 +31,12 @@ public class ProtobufDataFormatConfiguration {
  */
 private String instanceClass;
 /**
+ * Defines a content type format in which protobuf message will be
+ * serialized/deserialized from(to) the Java been. It can be native 
protobuf
+ * format or json fields representation. The default value is 

[3/5] camel git commit: CAMEL-11135: camel-protobuf component improvements

2017-04-11 Thread davsclaus
http://git-wip-us.apache.org/repos/asf/camel/blob/327dfcbd/components/camel-protobuf/src/test/java/org/apache/camel/dataformat/protobuf/generated/AddressBookProtos.java
--
diff --git 
a/components/camel-protobuf/src/test/java/org/apache/camel/dataformat/protobuf/generated/AddressBookProtos.java
 
b/components/camel-protobuf/src/test/java/org/apache/camel/dataformat/protobuf/generated/AddressBookProtos.java
deleted file mode 100644
index fc54b04..000
--- 
a/components/camel-protobuf/src/test/java/org/apache/camel/dataformat/protobuf/generated/AddressBookProtos.java
+++ /dev/null
@@ -1,2548 +0,0 @@
-/**
- * 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.
- */
-
-// Generated by the protocol buffer compiler.  DO NOT EDIT!
-// source: addressbook.proto
-package org.apache.camel.dataformat.protobuf.generated;
-
-//CHECKSTYLE:OFF
-public final class AddressBookProtos {
-  private AddressBookProtos() {}
-  public static void registerAllExtensions(
-  com.google.protobuf.ExtensionRegistry registry) {
-  }
-  public interface PersonOrBuilder extends
-  // 
@@protoc_insertion_point(interface_extends:org.apache.camel.dataformat.protobuf.generated.Person)
-  com.google.protobuf.MessageOrBuilder {
-
-/**
- * required string name = 1;
- */
-boolean hasName();
-/**
- * required string name = 1;
- */
-java.lang.String getName();
-/**
- * required string name = 1;
- */
-com.google.protobuf.ByteString
-getNameBytes();
-
-/**
- * required int32 id = 2;
- */
-boolean hasId();
-/**
- * required int32 id = 2;
- */
-int getId();
-
-/**
- * optional string email = 3;
- */
-boolean hasEmail();
-/**
- * optional string email = 3;
- */
-java.lang.String getEmail();
-/**
- * optional string email = 3;
- */
-com.google.protobuf.ByteString
-getEmailBytes();
-
-/**
- * repeated 
.org.apache.camel.dataformat.protobuf.generated.Person.PhoneNumber phone = 
4;
- */
-
java.util.List
 
-getPhoneList();
-/**
- * repeated 
.org.apache.camel.dataformat.protobuf.generated.Person.PhoneNumber phone = 
4;
- */
-
org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber
 getPhone(int index);
-/**
- * repeated 
.org.apache.camel.dataformat.protobuf.generated.Person.PhoneNumber phone = 
4;
- */
-int getPhoneCount();
-/**
- * repeated 
.org.apache.camel.dataformat.protobuf.generated.Person.PhoneNumber phone = 
4;
- */
-java.util.List
 
-getPhoneOrBuilderList();
-/**
- * repeated 
.org.apache.camel.dataformat.protobuf.generated.Person.PhoneNumber phone = 
4;
- */
-
org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumberOrBuilder
 getPhoneOrBuilder(
-int index);
-  }
-  /**
-   * Protobuf type {@code 
org.apache.camel.dataformat.protobuf.generated.Person}
-   */
-  public static final class Person extends
-  com.google.protobuf.GeneratedMessage implements
-  // 
@@protoc_insertion_point(message_implements:org.apache.camel.dataformat.protobuf.generated.Person)
-  PersonOrBuilder {
-// Use Person.newBuilder() to construct.
-private Person(com.google.protobuf.GeneratedMessage.Builder builder) {
-  super(builder);
-  this.unknownFields = builder.getUnknownFields();
-}
-private Person(boolean noInit) { this.unknownFields = 
com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
-
-private static final Person defaultInstance;
-public static Person getDefaultInstance() {
-  return defaultInstance;
-}
-
-public Person getDefaultInstanceForType() {
-  return defaultInstance;
-}
-
-private final com.google.protobuf.UnknownFieldSet unknownFields;
-@java.lang.Override
-public final com.google.protobuf.UnknownFieldSet
-getUnknownFields() {
-  return this.unknownFields;
-}
-private Person(
-com.google.protobuf.CodedInputStream input,
-com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-throws 

[1/5] camel git commit: CAMEL-11135: fixing sourcecheck issues

2017-04-11 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master 3b977b01c -> ab1842307


CAMEL-11135: fixing sourcecheck issues

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

Branch: refs/heads/master
Commit: 04d584f5beaa0ef05e940e90953703086dd4ed0a
Parents: 327dfcb
Author: Dmitry Volodin 
Authored: Tue Apr 11 17:59:38 2017 +0300
Committer: Claus Ibsen 
Committed: Tue Apr 11 19:53:20 2017 +0200

--
 .../apache/camel/dataformat/protobuf/ProtobufDataFormat.java   | 2 +-
 .../protobuf/ProtobufMarshalAndUnmarshalJsonTest.java  | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/04d584f5/components/camel-protobuf/src/main/java/org/apache/camel/dataformat/protobuf/ProtobufDataFormat.java
--
diff --git 
a/components/camel-protobuf/src/main/java/org/apache/camel/dataformat/protobuf/ProtobufDataFormat.java
 
b/components/camel-protobuf/src/main/java/org/apache/camel/dataformat/protobuf/ProtobufDataFormat.java
index b8cba4f..991599c 100755
--- 
a/components/camel-protobuf/src/main/java/org/apache/camel/dataformat/protobuf/ProtobufDataFormat.java
+++ 
b/components/camel-protobuf/src/main/java/org/apache/camel/dataformat/protobuf/ProtobufDataFormat.java
@@ -47,7 +47,7 @@ public class ProtobufDataFormat extends ServiceSupport 
implements DataFormat, Da
 private CamelContext camelContext;
 private Message defaultInstance;
 private String instanceClassName;
-private boolean contentTypeHeader = false;
+private boolean contentTypeHeader;
 private String contentTypeFormat = CONTENT_TYPE_FORMAT_NATIVE;
 
 public ProtobufDataFormat() {

http://git-wip-us.apache.org/repos/asf/camel/blob/04d584f5/components/camel-protobuf/src/test/java/org/apache/camel/dataformat/protobuf/ProtobufMarshalAndUnmarshalJsonTest.java
--
diff --git 
a/components/camel-protobuf/src/test/java/org/apache/camel/dataformat/protobuf/ProtobufMarshalAndUnmarshalJsonTest.java
 
b/components/camel-protobuf/src/test/java/org/apache/camel/dataformat/protobuf/ProtobufMarshalAndUnmarshalJsonTest.java
index b1e789e..f66be1b 100644
--- 
a/components/camel-protobuf/src/test/java/org/apache/camel/dataformat/protobuf/ProtobufMarshalAndUnmarshalJsonTest.java
+++ 
b/components/camel-protobuf/src/test/java/org/apache/camel/dataformat/protobuf/ProtobufMarshalAndUnmarshalJsonTest.java
@@ -25,9 +25,9 @@ import org.junit.Test;
 
 public class ProtobufMarshalAndUnmarshalJsonTest extends CamelTestSupport {
 
-private final static String PERSON_TEST_NAME = "Martin";
-private final static int PERSON_TEST_ID = 1234;
-private final static String PERSON_TEST_JSON = "{\"name\": 
\"Martin\",\"id\": 1234}";
+private static final String PERSON_TEST_NAME = "Martin";
+private static final String PERSON_TEST_JSON = "{\"name\": 
\"Martin\",\"id\": 1234}";
+private static final int PERSON_TEST_ID = 1234;
 
 @Test
 public void testMarshalAndUnmarshal() throws Exception {



camel git commit: camel-grpc: hangs on async invocation with exception (missed callback.done)

2017-04-11 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master 3bf99ccaf -> 3b977b01c


camel-grpc: hangs on async invocation with exception (missed
callback.done)

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

Branch: refs/heads/master
Commit: 3b977b01c914e76a65e1ad10bf4597deeecf0b35
Parents: 3bf99cc
Author: Dmitry Volodin 
Authored: Tue Apr 11 19:28:34 2017 +0300
Committer: Dmitry Volodin 
Committed: Tue Apr 11 19:28:34 2017 +0300

--
 .../main/java/org/apache/camel/component/grpc/GrpcProducer.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/3b977b01/components/camel-grpc/src/main/java/org/apache/camel/component/grpc/GrpcProducer.java
--
diff --git 
a/components/camel-grpc/src/main/java/org/apache/camel/component/grpc/GrpcProducer.java
 
b/components/camel-grpc/src/main/java/org/apache/camel/component/grpc/GrpcProducer.java
index ec07022..10d8faf 100644
--- 
a/components/camel-grpc/src/main/java/org/apache/camel/component/grpc/GrpcProducer.java
+++ 
b/components/camel-grpc/src/main/java/org/apache/camel/component/grpc/GrpcProducer.java
@@ -69,7 +69,7 @@ public class GrpcProducer extends DefaultProducer implements 
AsyncProcessor {
 @Override
 public void onError(Throwable t) {
 exchange.setException(t);
-callback.done(true);
+callback.done(false);
 }
 
 @Override
@@ -82,6 +82,7 @@ public class GrpcProducer extends DefaultProducer implements 
AsyncProcessor {
 GrpcUtils.invokeAsyncMethod(grpcStub, configuration.getMethod(), 
message.getBody(), asyncHandler);
 } catch (Exception e) {
 exchange.setException(e);
+callback.done(true);
 return true;
 }
 return false;



[3/3] camel git commit: CAMEL-10650: fix documentation on http4 component

2017-04-11 Thread nferraro
CAMEL-10650: fix documentation on http4 component


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

Branch: refs/heads/apache-master
Commit: 9142fcb4cff088cf8a530c5cd135b0e16efb639a
Parents: 3ce78e0
Author: Nicola Ferraro 
Authored: Tue Apr 11 18:16:23 2017 +0200
Committer: Nicola Ferraro 
Committed: Tue Apr 11 18:16:23 2017 +0200

--
 .../main/java/org/apache/camel/component/http4/HttpComponent.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/9142fcb4/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java
--
diff --git 
a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java
 
b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java
index b465374..7bff7e2 100644
--- 
a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java
+++ 
b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java
@@ -85,7 +85,7 @@ public class HttpComponent extends HttpCommonComponent 
implements RestProducerFa
 + " Important: Only one instance of 
org.apache.camel.util.jsse.SSLContextParameters is supported per HttpComponent."
 + " If you need to use 2 or more different instances, you need to 
define a new HttpComponent per instance you need.")
 protected SSLContextParameters sslContextParameters;
-@Metadata(label = "security", defaultValue = "false")
+@Metadata(description = "Enable usage of global SSL context parameters", 
label = "security", defaultValue = "false")
 private boolean useGlobalSslContextParameters;
 @Metadata(label = "security", description = "To use a custom 
X509HostnameVerifier such as DefaultHostnameVerifier or NoopHostnameVerifier.")
 protected HostnameVerifier x509HostnameVerifier = new 
DefaultHostnameVerifier();



[2/3] camel git commit: CAMEL-11134: enable ignored tests for https4

2017-04-11 Thread nferraro
CAMEL-11134: enable ignored tests for https4


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

Branch: refs/heads/apache-master
Commit: 3ce78e0a92ba38234ccaf28b7a570168669e4440
Parents: 085736d
Author: Nicola Ferraro 
Authored: Tue Apr 11 18:07:35 2017 +0200
Committer: Nicola Ferraro 
Committed: Tue Apr 11 18:07:35 2017 +0200

--
 .../java/org/apache/camel/component/jetty9/Jetty9SSLTest.java  | 2 --
 .../component/netty4/http/springboot/Netty4HttpSSLTest.java| 6 +-
 2 files changed, 1 insertion(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/3ce78e0a/platforms/spring-boot/components-starter/camel-jetty9-starter/src/test/java/org/apache/camel/component/jetty9/Jetty9SSLTest.java
--
diff --git 
a/platforms/spring-boot/components-starter/camel-jetty9-starter/src/test/java/org/apache/camel/component/jetty9/Jetty9SSLTest.java
 
b/platforms/spring-boot/components-starter/camel-jetty9-starter/src/test/java/org/apache/camel/component/jetty9/Jetty9SSLTest.java
index 6b40ff6..7e80043 100644
--- 
a/platforms/spring-boot/components-starter/camel-jetty9-starter/src/test/java/org/apache/camel/component/jetty9/Jetty9SSLTest.java
+++ 
b/platforms/spring-boot/components-starter/camel-jetty9-starter/src/test/java/org/apache/camel/component/jetty9/Jetty9SSLTest.java
@@ -22,7 +22,6 @@ import 
org.apache.camel.component.jetty9.springboot.JettyHttpComponentAutoConfig
 import org.apache.camel.spring.boot.CamelAutoConfiguration;
 import org.apache.camel.test.AvailablePortFinder;
 import org.junit.BeforeClass;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -55,7 +54,6 @@ import static org.junit.Assert.assertEquals;
 "camel.component.jetty.use-global-ssl-context-parameters=true",
 "camel.component.http4.use-global-ssl-context-parameters=true",
 })
-@Ignore("Bug in https4 spring-boot configuration")
 public class Jetty9SSLTest {
 
 private static int port;

http://git-wip-us.apache.org/repos/asf/camel/blob/3ce78e0a/platforms/spring-boot/components-starter/camel-netty4-http-starter/src/test/java/org/apache/camel/component/netty4/http/springboot/Netty4HttpSSLTest.java
--
diff --git 
a/platforms/spring-boot/components-starter/camel-netty4-http-starter/src/test/java/org/apache/camel/component/netty4/http/springboot/Netty4HttpSSLTest.java
 
b/platforms/spring-boot/components-starter/camel-netty4-http-starter/src/test/java/org/apache/camel/component/netty4/http/springboot/Netty4HttpSSLTest.java
index d8451b7..68d10fa 100644
--- 
a/platforms/spring-boot/components-starter/camel-netty4-http-starter/src/test/java/org/apache/camel/component/netty4/http/springboot/Netty4HttpSSLTest.java
+++ 
b/platforms/spring-boot/components-starter/camel-netty4-http-starter/src/test/java/org/apache/camel/component/netty4/http/springboot/Netty4HttpSSLTest.java
@@ -16,12 +16,9 @@
  */
 package org.apache.camel.component.netty4.http.springboot;
 
-import org.apache.camel.Exchange;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.spring.boot.CamelAutoConfiguration;
-import org.junit.Assert;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -53,9 +50,8 @@ import static org.junit.Assert.assertEquals;
 "camel.ssl.config.trust-managers.key-store.password=changeit",
 "camel.ssl.config.trust-managers.key-store.type=jks",
 "camel.component.netty4-http.use-global-ssl-context-parameters=true",
-"camel.component.http.use-global-ssl-context-parameters=true"
+"camel.component.http4.use-global-ssl-context-parameters=true"
 })
-@Ignore("Bug in https4 spring-boot configuration")
 public class Netty4HttpSSLTest {
 
 @Autowired



[1/3] camel git commit: CAMEL-11134: fix https4 configuration

2017-04-11 Thread nferraro
Repository: camel
Updated Branches:
  refs/heads/apache-master [created] 9142fcb4c


CAMEL-11134: fix https4 configuration


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

Branch: refs/heads/apache-master
Commit: 085736d21e074a07a2d19f0c3a57633005888d00
Parents: 3bf99cc
Author: Nicola Ferraro 
Authored: Tue Apr 11 18:05:12 2017 +0200
Committer: Nicola Ferraro 
Committed: Tue Apr 11 18:05:12 2017 +0200

--
 .../camel/component/http4/HttpEndpoint.java |  2 +-
 .../main/docs/yaml-snakeyaml-dataformat.adoc|  2 +-
 .../HttpComponentAutoConfiguration.java |  2 +-
 .../SnakeYAMLDataFormatConfiguration.java   |  2 +-
 .../SpringBootAutoConfigurationMojo.java| 20 +++-
 5 files changed, 23 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/085736d2/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEndpoint.java
--
diff --git 
a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEndpoint.java
 
b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEndpoint.java
index 0ffaab4..eb631f8 100644
--- 
a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEndpoint.java
+++ 
b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEndpoint.java
@@ -48,7 +48,7 @@ import org.slf4j.LoggerFactory;
 /**
  * For calling out to external HTTP servers using Apache HTTP Client 4.x.
  */
-@UriEndpoint(firstVersion = "2.3.0", scheme = "http4,http4s", title = 
"HTTP4,HTTP4S", syntax = "http4:httpUri",
+@UriEndpoint(firstVersion = "2.3.0", scheme = "http4,https4", title = 
"HTTP4,HTTPS4", syntax = "http4:httpUri",
 producerOnly = true, label = "http", lenientProperties = true)
 public class HttpEndpoint extends HttpCommonEndpoint {
 

http://git-wip-us.apache.org/repos/asf/camel/blob/085736d2/components/camel-snakeyaml/src/main/docs/yaml-snakeyaml-dataformat.adoc
--
diff --git 
a/components/camel-snakeyaml/src/main/docs/yaml-snakeyaml-dataformat.adoc 
b/components/camel-snakeyaml/src/main/docs/yaml-snakeyaml-dataformat.adoc
index bcfa3c6..15b5691 100644
--- a/components/camel-snakeyaml/src/main/docs/yaml-snakeyaml-dataformat.adoc
+++ b/components/camel-snakeyaml/src/main/docs/yaml-snakeyaml-dataformat.adoc
@@ -24,7 +24,7 @@ The YAML SnakeYAML dataformat supports 11 options which are 
listed below.
 [width="100%",cols="2s,1m,1m,6",options="header"]
 |===
 | Name | Default | Java Type | Description
-| library | SnakeYAML | YAMLLibrary | Which yaml library to use such. Is by 
default SnakeYAML
+| library | SnakeYAML | YAMLLibrary | Which yaml library to use. By default it 
is SnakeYAML
 | unmarshalTypeName |  | String | Class name of the java type to use when 
unarmshalling
 | constructor |  | String | BaseConstructor to construct incoming documents.
 | representer |  | String | Representer to emit outgoing objects.

http://git-wip-us.apache.org/repos/asf/camel/blob/085736d2/platforms/spring-boot/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java
--
diff --git 
a/platforms/spring-boot/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java
 
b/platforms/spring-boot/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java
index 4530a87..e675a70 100644
--- 
a/platforms/spring-boot/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java
+++ 
b/platforms/spring-boot/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java
@@ -48,7 +48,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
 public class HttpComponentAutoConfiguration {
 
 @Lazy
-@Bean(name = "http4-component")
+@Bean(name = {"http4-component", "https4-component"})
 @ConditionalOnClass(CamelContext.class)
 @ConditionalOnMissingBean(HttpComponent.class)
 public HttpComponent configureHttpComponent(CamelContext camelContext,


[12/13] camel git commit: CAMEL-10650: putting flag to enable global SSL config in all components

2017-04-11 Thread nferraro
CAMEL-10650: putting flag to enable global SSL config in all components


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

Branch: refs/heads/master
Commit: d51aa65d312d0399d3927b1b4b4b2205594f00d6
Parents: aab30b4
Author: Nicola Ferraro 
Authored: Tue Apr 11 13:29:31 2017 +0200
Committer: Nicola Ferraro 
Committed: Tue Apr 11 16:04:22 2017 +0200

--
 .../apache/camel/SSLContextParametersAware.java | 17 +++-
 .../camel/component/ahc/AhcComponent.java   | 15 +++
 ...entConfigGlobalSslContextParametersTest.java |  3 ++
 .../camel/component/cometd/CometdComponent.java | 15 +++
 ...extParametersCometdProducerConsumerTest.java |  3 ++
 .../camel/component/consul/ConsulComponent.java | 17 +++-
 .../component/consul/ConsulConfiguration.java   | 14 +--
 .../camel/component/cxf/CxfComponent.java   | 15 +++
 .../component/cxf/jaxrs/CxfRsComponent.java | 17 
 .../cxf/jaxrs/CxfRsGlobalSslProducerTest.java   |  2 +
 .../camel/component/cxf/ssl/SslGlobalTest.java  |  2 +
 .../camel/component/etcd/EtcdComponent.java | 17 +++-
 .../camel/component/etcd/EtcdConfiguration.java | 18 ++--
 .../component/file/remote/FtpsComponent.java| 17 
 ...ntAuthAndGlobalSSLContextParametersTest.java |  3 ++
 .../src/main/docs/http-component.adoc   |  5 ++-
 .../camel/component/http/HttpComponent.java | 18 +++-
 .../camel/component/http4/HttpComponent.java| 15 +++
 .../camel/component/irc/IrcComponent.java   | 17 
 .../component/jetty/JettyHttpComponent.java | 15 +++
 .../camel/component/kafka/KafkaComponent.java   | 17 +++-
 .../component/kafka/KafkaConfiguration.java | 13 +-
 .../lumberjack/LumberjackComponent.java | 17 
 .../LumberjackComponentGlobalSSLTest.java   |  7 ++--
 .../camel/component/mail/MailComponent.java | 15 +++
 .../camel/component/mina2/Mina2Component.java   | 18 +++-
 .../component/mina2/Mina2Configuration.java | 13 --
 .../Mina2SslGlobalContextParametersTcpTest.java | 13 +-
 .../camel/component/nats/NatsComponent.java | 17 
 .../netty/http/NettyHttpComponent.java  | 15 +++
 .../netty/http/NettyHttpGlobalSSLTest.java  |  3 ++
 .../camel/component/netty/NettyComponent.java   | 15 +++
 .../NettyGlobalSSLContextParametersTest.java|  3 ++
 .../netty4/http/NettyHttpComponent.java | 15 +++
 .../camel/component/netty4/NettyComponent.java  | 15 +++
 .../NettyGlobalSSLContextParametersTest.java|  3 ++
 .../component/olingo2/Olingo2Component.java | 17 
 .../component/olingo4/Olingo4Component.java | 17 
 .../component/restlet/RestletComponent.java | 15 +++
 ...HttpsWithGlobalSSLContextParametersTest.java |  3 ++
 .../salesforce/SalesforceComponent.java | 12 ++
 .../servicenow/ServiceNowComponent.java | 17 +++-
 .../servicenow/ServiceNowConfiguration.java | 14 +--
 .../spring/ws/SpringWebserviceComponent.java| 17 
 .../camel/component/stomp/StompComponent.java   | 17 +++-
 .../component/stomp/StompConfiguration.java | 12 --
 .../stomp/StompGlobalSslConsumerTest.java   |  5 ++-
 .../component/undertow/UndertowComponent.java   | 14 +++
 .../component/websocket/WebsocketComponent.java | 24 +--
 .../component/websocket/WebsocketEndpoint.java  | 13 --
 ...bsocketSSLContextGlobalRouteExampleTest.java |  3 ++
 .../springboot/HttpComponentConfiguration.java  | 13 ++
 .../HttpComponentSSLAutoConfiguration.java  | 37 +
 .../HttpComponentSSLConfiguration.java  | 43 
 54 files changed, 538 insertions(+), 199 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/camel-core/src/main/java/org/apache/camel/SSLContextParametersAware.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/SSLContextParametersAware.java 
b/camel-core/src/main/java/org/apache/camel/SSLContextParametersAware.java
index b76c041..07f684a 100644
--- a/camel-core/src/main/java/org/apache/camel/SSLContextParametersAware.java
+++ b/camel-core/src/main/java/org/apache/camel/SSLContextParametersAware.java
@@ -24,10 +24,23 @@ import org.apache.camel.util.jsse.SSLContextParameters;
 public interface SSLContextParametersAware extends CamelContextAware {
 
 /**
- * Returns the global {@link SSLContextParameters} if configured.
+ * Returns the global {@link SSLContextParameters} if enabled on the 
implementing 

[07/13] camel git commit: CAMEL-10650: moving global config to Camel context

2017-04-11 Thread nferraro
CAMEL-10650: moving global config to Camel context


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

Branch: refs/heads/master
Commit: 8471034ce6d027b1614ca8e98633321b5e26410f
Parents: ef916c2
Author: Nicola Ferraro 
Authored: Mon Apr 10 17:17:44 2017 +0200
Committer: Nicola Ferraro 
Committed: Tue Apr 11 16:04:22 2017 +0200

--
 .../java/org/apache/camel/CamelContext.java |  11 ++
 .../apache/camel/SSLContextParametersAware.java |  33 ++
 .../apache/camel/impl/DefaultCamelContext.java  |  12 +++
 .../camel/component/ahc/AhcComponent.java   |   9 +-
 ...entConfigGlobalSslContextParametersTest.java |  13 +--
 .../apache/camel/component/ahc/BaseAhcTest.java |   6 +-
 .../camel/component/cometd/CometdComponent.java |   9 +-
 ...extParametersCometdProducerConsumerTest.java |  11 +-
 .../camel/component/consul/ConsulComponent.java |   8 +-
 .../camel/component/cxf/CxfComponent.java   |   8 +-
 .../component/cxf/jaxrs/CxfRsComponent.java |   8 +-
 .../cxf/jaxrs/CxfRsGlobalSslProducerTest.java   |  10 ++
 .../camel/component/cxf/ssl/SslGlobalTest.java  |  20 ++--
 .../util/CxfSSLContextParameterSupplier.java|  43 
 .../camel/component/cxf/CxfGlobalSslContext.xml |   3 -
 .../cxf/jaxrs/CxfRsSpringGlobalSslProducer.xml  |   3 -
 .../camel/component/etcd/EtcdComponent.java |   8 +-
 .../component/file/remote/FtpsComponent.java|   9 +-
 ...ntAuthAndGlobalSSLContextParametersTest.java |  16 ++-
 .../camel/component/http4/HttpComponent.java|   8 +-
 .../camel/component/irc/IrcComponent.java   |   9 +-
 .../component/jetty/JettyHttpComponent.java | 107 +--
 .../camel/component/kafka/KafkaComponent.java   |   9 +-
 .../lumberjack/LumberjackComponent.java |   9 +-
 .../LumberjackComponentGlobalSSLTest.java   |  11 +-
 .../camel/component/mail/MailComponent.java |   9 +-
 .../camel/component/mina2/Mina2Component.java   |   9 +-
 .../Mina2SslGlobalContextParametersTcpTest.java |  16 +--
 .../camel/component/nats/NatsComponent.java |   9 +-
 .../netty/http/NettyHttpComponent.java  |   9 +-
 .../util/NettySSLContextParameterSupplier.java  |  43 
 .../netty/http/NettyHttpGlobalSSLTest.java  | 104 ++
 .../http/SpringNettyHttpGlobalSSLTest.java  |  80 --
 .../netty/http/SpringNettyHttpGlobalSSLTest.xml |  65 ---
 .../camel/component/netty/NettyComponent.java   |   9 +-
 .../NettyGlobalSSLContextParametersTest.java|  17 ++-
 .../netty4/http/NettyHttpComponent.java |   9 +-
 .../camel/component/netty4/NettyComponent.java  |   9 +-
 .../NettyGlobalSSLContextParametersTest.java|  17 ++-
 .../component/olingo2/Olingo2Component.java |   9 +-
 .../component/olingo4/Olingo4Component.java |   9 +-
 .../component/restlet/RestletComponent.java |   9 +-
 ...HttpsWithGlobalSSLContextParametersTest.java |  15 ++-
 .../salesforce/SalesforceComponent.java |   9 +-
 .../servicenow/ServiceNowComponent.java |   9 +-
 .../spring/boot/CamelAutoConfiguration.java |   6 ++
 .../security/CamelSSLAutoConfiguration.java |   8 +-
 .../spring/ws/SpringWebserviceComponent.java|   8 +-
 .../camel/component/stomp/StompComponent.java   |   9 +-
 .../stomp/StompGlobalSslConsumerTest.java   |  11 +-
 .../component/undertow/UndertowComponent.java   |   5 +-
 .../component/websocket/WebsocketComponent.java |   9 +-
 ...bsocketSSLContextGlobalRouteExampleTest.java |  12 +--
 .../HttpComponentSSLAutoConfiguration.java  |  24 +++--
 .../component/undertow/UndertowSSLTest.java |   4 +-
 55 files changed, 398 insertions(+), 556 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/8471034c/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 b0789c4..d4fd6ae 100644
--- a/camel-core/src/main/java/org/apache/camel/CamelContext.java
+++ b/camel-core/src/main/java/org/apache/camel/CamelContext.java
@@ -85,6 +85,7 @@ import org.apache.camel.spi.UuidGenerator;
 import org.apache.camel.spi.Validator;
 import org.apache.camel.spi.ValidatorRegistry;
 import org.apache.camel.util.LoadPropertiesException;
+import org.apache.camel.util.jsse.SSLContextParameters;
 
 /**
  * Interface used to represent the CamelContext used to configure routes and 
the
@@ -1977,4 +1978,14 @@ public interface CamelContext extends 
SuspendableService, RuntimeConfiguration {
  

[02/13] camel git commit: CAMEL-10650: adding sslContextParameters to spring-boot configuration

2017-04-11 Thread nferraro
http://git-wip-us.apache.org/repos/asf/camel/blob/ef916c22/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Component.java
--
diff --git 
a/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Component.java
 
b/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Component.java
index 6413c26..62319ac 100644
--- 
a/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Component.java
+++ 
b/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Component.java
@@ -18,13 +18,17 @@ package org.apache.camel.component.mina2;
 
 import java.net.URI;
 import java.util.Map;
+import java.util.Optional;
+import java.util.function.Supplier;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
 import org.apache.camel.ExchangePattern;
 import org.apache.camel.impl.UriEndpointComponent;
 import org.apache.camel.spi.Metadata;
+import org.apache.camel.util.CamelContextHelper;
 import org.apache.camel.util.ObjectHelper;
+import org.apache.camel.util.jsse.GlobalSSLContextParametersSupplier;
 import org.apache.mina.core.filterchain.IoFilter;
 
 /**
@@ -67,6 +71,10 @@ public class Mina2Component extends UriEndpointComponent {
 config.setFilters(resolveAndRemoveReferenceListParameter(parameters, 
"filters", IoFilter.class));
 setProperties(config, parameters);
 
+if (config.isUseGlobalSslContextParameters() && 
config.getSslContextParameters() == null) {
+
config.setSslContextParameters(Optional.ofNullable(CamelContextHelper.findByType(getCamelContext(),
 GlobalSSLContextParametersSupplier.class)).map(Supplier::get).orElse(null));
+}
+
 return createEndpoint(uri, config);
 }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/ef916c22/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Configuration.java
--
diff --git 
a/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Configuration.java
 
b/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Configuration.java
index 2721791..e05d438 100644
--- 
a/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Configuration.java
+++ 
b/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Configuration.java
@@ -76,6 +76,8 @@ public class Mina2Configuration implements Cloneable {
 @UriParam(label = "security")
 private SSLContextParameters sslContextParameters;
 @UriParam(label = "security", defaultValue = "true")
+private boolean useGlobalSslContextParameters = true;
+@UriParam(label = "security", defaultValue = "true")
 private boolean autoStartTls = true;
 @UriParam(label = "advanced", defaultValue = "16")
 private int maximumPoolSize = 16; // 16 is the default mina setting
@@ -341,6 +343,17 @@ public class Mina2Configuration implements Cloneable {
 this.sslContextParameters = sslContextParameters;
 }
 
+public boolean isUseGlobalSslContextParameters() {
+return useGlobalSslContextParameters;
+}
+
+/**
+ * Enable usage of Camel global sslContextParameters.
+ */
+public void setUseGlobalSslContextParameters(boolean 
useGlobalSslContextParameters) {
+this.useGlobalSslContextParameters = useGlobalSslContextParameters;
+}
+
 public boolean isAutoStartTls() {
 return autoStartTls;
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/ef916c22/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/BaseMina2Test.java
--
diff --git 
a/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/BaseMina2Test.java
 
b/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/BaseMina2Test.java
index 204a2b9..e8fc6e3 100644
--- 
a/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/BaseMina2Test.java
+++ 
b/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/BaseMina2Test.java
@@ -61,6 +61,10 @@ public class BaseMina2Test extends CamelTestSupport {
 }
 
 protected void addSslContextParametersToRegistry(JndiRegistry registry) {
+registry.bind("sslContextParameters", createSslContextParameters());
+}
+
+protected SSLContextParameters createSslContextParameters() {
 KeyStoreParameters ksp = new KeyStoreParameters();
 
ksp.setResource(this.getClass().getClassLoader().getResource("jsse/localhost.ks").toString());
 ksp.setPassword(KEY_STORE_PASSWORD);
@@ -76,12 +80,11 @@ public class BaseMina2Test extends CamelTestSupport {
 // is provided.  We turn on WANT client-auth to prefer using 
authentication
 SSLContextServerParameters scsp = new 

[13/13] camel git commit: CAMEL-10650: rebase

2017-04-11 Thread nferraro
CAMEL-10650: rebase


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

Branch: refs/heads/master
Commit: 3bf99ccaf810c229d2f355fe5dbc37a913bf5c95
Parents: 6cfdf42
Author: Nicola Ferraro 
Authored: Tue Apr 11 16:05:09 2017 +0200
Committer: Nicola Ferraro 
Committed: Tue Apr 11 16:05:09 2017 +0200

--
 .../org/apache/camel/component/undertow/UndertowComponent.java   | 4 
 1 file changed, 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/3bf99cca/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java
--
diff --git 
a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java
 
b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java
index 22b2b66..54affd1 100644
--- 
a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java
+++ 
b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java
@@ -21,9 +21,7 @@ import java.net.URISyntaxException;
 import java.util.HashMap;
 import java.util.Locale;
 import java.util.Map;
-import java.util.Optional;
 import java.util.concurrent.ConcurrentHashMap;
-import java.util.function.Supplier;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.ComponentVerifier;
@@ -39,7 +37,6 @@ import org.apache.camel.spi.RestApiConsumerFactory;
 import org.apache.camel.spi.RestConfiguration;
 import org.apache.camel.spi.RestConsumerFactory;
 import org.apache.camel.spi.RestProducerFactory;
-import org.apache.camel.util.CamelContextHelper;
 import org.apache.camel.util.FileUtil;
 import org.apache.camel.util.HostUtils;
 import org.apache.camel.util.IntrospectionSupport;
@@ -48,7 +45,6 @@ import org.apache.camel.util.ServiceHelper;
 import org.apache.camel.util.URISupport;
 import org.apache.camel.util.UnsafeUriCharactersEncoder;
 import org.apache.camel.util.jsse.SSLContextParameters;
-import org.apache.camel.util.jsse.GlobalSSLContextParametersSupplier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 



[06/13] camel git commit: CAMEL-10650: moving global config to Camel context

2017-04-11 Thread nferraro
http://git-wip-us.apache.org/repos/asf/camel/blob/8471034c/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpGlobalSSLTest.java
--
diff --git 
a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpGlobalSSLTest.java
 
b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpGlobalSSLTest.java
new file mode 100644
index 000..180b463
--- /dev/null
+++ 
b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpGlobalSSLTest.java
@@ -0,0 +1,104 @@
+/**
+ * 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.component.netty.http;
+
+import java.net.URL;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Produce;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.RoutesBuilder;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.AvailablePortFinder;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.camel.util.jsse.KeyManagersParameters;
+import org.apache.camel.util.jsse.KeyStoreParameters;
+import org.apache.camel.util.jsse.SSLContextParameters;
+import org.apache.camel.util.jsse.TrustManagersParameters;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class NettyHttpGlobalSSLTest extends CamelTestSupport {
+
+@Produce
+private ProducerTemplate template;
+
+@EndpointInject(uri = "mock:input")
+private MockEndpoint mockEndpoint;
+
+private Integer port;
+
+@BeforeClass
+public static void setUpJaas() throws Exception {
+// ensure jsse clients can validate the self signed dummy localhost 
cert,
+// use the server keystore as the trust store for these tests
+URL trustStoreUrl = 
NettyHttpSSLTest.class.getClassLoader().getResource("jsse/localhost.ks");
+System.setProperty("javax.net.ssl.trustStore", 
trustStoreUrl.toURI().getPath());
+}
+
+@AfterClass
+public static void tearDownJaas() throws Exception {
+System.clearProperty("java.security.auth.login.config");
+System.clearProperty("javax.net.ssl.trustStore");
+}
+
+@Override
+protected CamelContext createCamelContext() throws Exception {
+port = AvailablePortFinder.getNextAvailable(9000);
+
+CamelContext context = super.createCamelContext();
+SSLContextParameters sslContextParameters = new SSLContextParameters();
+KeyManagersParameters keyManagers = new KeyManagersParameters();
+keyManagers.setKeyPassword("changeit");
+KeyStoreParameters keyStore = new KeyStoreParameters();
+keyStore.setResource("jsse/localhost.ks");
+keyStore.setPassword("changeit");
+keyManagers.setKeyStore(keyStore);
+sslContextParameters.setKeyManagers(keyManagers);
+TrustManagersParameters trustManagers = new TrustManagersParameters();
+trustManagers.setKeyStore(keyStore);
+sslContextParameters.setTrustManagers(trustManagers);
+context.setSSLContextParameters(sslContextParameters);
+return context;
+}
+
+@Test
+public void testSSLInOutWithNettyConsumer() throws Exception {
+mockEndpoint.expectedBodiesReceived("Hello World");
+
+String out = template.requestBody("https://localhost:; + port, "Hello 
World", String.class);
+assertEquals("Bye World", out);
+
+mockEndpoint.assertIsSatisfied();
+}
+
+@Override
+protected RoutesBuilder createRouteBuilder() throws Exception {
+return new RouteBuilder() {
+@Override
+public void configure() throws Exception {
+from("netty-http:https://localhost:; + port +"?ssl=true")
+.to("mock:input")
+.transform().simple("Bye World");
+}
+};
+}
+}
+


[10/13] camel git commit: CAMEL-10650: fix source style

2017-04-11 Thread nferraro
CAMEL-10650: fix source style


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

Branch: refs/heads/master
Commit: aab30b4aa6225d813c24142d04f09ac652ec3452
Parents: 8471034
Author: Nicola Ferraro 
Authored: Mon Apr 10 17:59:56 2017 +0200
Committer: Nicola Ferraro 
Committed: Tue Apr 11 16:04:22 2017 +0200

--
 .../GlobalSSLContextParametersSupplier.java | 21 ++--
 .../component/consul/ConsulConfiguration.java   |  2 +-
 .../groovy/converter/GPathResultConverter.java  |  6 --
 .../dataformat/AbstractXmlDataFormat.java   |  8 +---
 .../netty/http/NettyHttpGlobalSSLTest.java  |  6 +++---
 .../boot/CamelConfigurationProperties.java  |  2 +-
 .../CamelSSLConfigurationProperties.java|  2 +-
 .../camel/component/jetty9/Jetty9SSLTest.java   |  4 ++--
 8 files changed, 28 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/aab30b4a/camel-core/src/main/java/org/apache/camel/util/jsse/GlobalSSLContextParametersSupplier.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/util/jsse/GlobalSSLContextParametersSupplier.java
 
b/camel-core/src/main/java/org/apache/camel/util/jsse/GlobalSSLContextParametersSupplier.java
index 31c415d..1ae2656 100644
--- 
a/camel-core/src/main/java/org/apache/camel/util/jsse/GlobalSSLContextParametersSupplier.java
+++ 
b/camel-core/src/main/java/org/apache/camel/util/jsse/GlobalSSLContextParametersSupplier.java
@@ -1,17 +1,18 @@
-/*
- * Copyright 2016 Red Hat, Inc.
- *
- * Red Hat 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
+/**
+ * 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
+ *  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.
+ * 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.util.jsse;
 

http://git-wip-us.apache.org/repos/asf/camel/blob/aab30b4a/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulConfiguration.java
--
diff --git 
a/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulConfiguration.java
 
b/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulConfiguration.java
index f28e9f4..06d270f 100644
--- 
a/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulConfiguration.java
+++ 
b/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulConfiguration.java
@@ -49,7 +49,7 @@ public class ConsulConfiguration implements 
CamelContextAware, Cloneable {
 @UriParam(label = "security")
 private SSLContextParameters sslContextParameters;
 @UriParam(label = "security", defaultValue = "false")
-private boolean useGlobalSslContextParameters = false;
+private boolean useGlobalSslContextParameters;
 @UriParam(label = "security", secret = true)
 private String aclToken;
 @UriParam(label = "security", secret = true)

http://git-wip-us.apache.org/repos/asf/camel/blob/aab30b4a/components/camel-groovy-dsl/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
--
diff --git 
a/components/camel-groovy-dsl/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
 
b/components/camel-groovy-dsl/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java
index fdf4971..94b989e 100644
--- 

[03/13] camel git commit: CAMEL-10650: adding sslContextParameters to spring-boot configuration

2017-04-11 Thread nferraro
CAMEL-10650: adding sslContextParameters to spring-boot configuration


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

Branch: refs/heads/master
Commit: ef916c22e02a6ff88be69568e6a9e89abfd747b3
Parents: 1fbc447
Author: Nicola Ferraro 
Authored: Thu Apr 6 14:52:06 2017 +0200
Committer: Nicola Ferraro 
Committed: Tue Apr 11 16:00:59 2017 +0200

--
 .../GlobalSSLContextParametersSupplier.java |  24 +++
 .../camel/component/ahc/AhcComponent.java   |  11 +-
 ...entConfigGlobalSslContextParametersTest.java |  41 
 .../camel/component/cometd/CometdComponent.java |  12 +-
 ...extParametersCometdProducerConsumerTest.java | 126 +
 .../camel/component/consul/ConsulComponent.java |   8 +
 .../component/consul/ConsulConfiguration.java   |  13 ++
 .../camel/component/cxf/CxfComponent.java   |   8 +
 .../component/cxf/jaxrs/CxfRsComponent.java |   9 +
 .../cxf/jaxrs/CxfRsGlobalSslProducerTest.java   | 105 +++
 .../camel/component/cxf/ssl/SslGlobalTest.java  |  91 +
 .../util/CxfSSLContextParameterSupplier.java|  43 +
 .../camel/component/cxf/CxfGlobalSslContext.xml |  94 ++
 .../cxf/jaxrs/CxfRsSpringGlobalSslProducer.xml  |  97 ++
 .../src/main/docs/etcd-component.adoc   |   3 +-
 .../camel/component/etcd/EtcdComponent.java |   7 +
 .../camel/component/etcd/EtcdConfiguration.java |  13 ++
 .../component/file/remote/FtpsComponent.java|  10 +-
 ...ntAuthAndGlobalSSLContextParametersTest.java |  49 +
 .../camel/component/http4/HttpComponent.java|   7 +-
 .../camel/component/irc/IrcComponent.java   |  20 +-
 .../camel/component/irc/IrcConfiguration.java   |   2 +-
 .../component/jetty/JettyHttpComponent.java |   5 +
 .../src/main/docs/kafka-component.adoc  |   3 +-
 .../camel/component/kafka/KafkaComponent.java   |   9 +
 .../component/kafka/KafkaConfiguration.java |  14 ++
 .../src/main/docs/lumberjack-component.adoc |   3 +-
 .../lumberjack/LumberjackComponent.java |  26 ++-
 .../LumberjackComponentGlobalSSLTest.java   | 113 +++
 .../camel/component/mail/MailComponent.java |   9 +
 .../src/main/docs/mina2-component.adoc  |   3 +-
 .../camel/component/mina2/Mina2Component.java   |   8 +
 .../component/mina2/Mina2Configuration.java |  13 ++
 .../camel/component/mina2/BaseMina2Test.java|   9 +-
 .../Mina2SslGlobalContextParametersTcpTest.java |  79 
 .../camel/component/nats/NatsComponent.java |   9 +
 .../netty/http/NettyHttpComponent.java  |   8 +
 .../util/NettySSLContextParameterSupplier.java  |  43 +
 .../http/SpringNettyHttpGlobalSSLTest.java  |  80 
 .../netty/http/SpringNettyHttpGlobalSSLTest.xml |  65 +++
 .../camel/component/netty/NettyComponent.java   |   8 +
 .../NettyGlobalSSLContextParametersTest.java|  93 +
 .../netty4/http/NettyHttpComponent.java |   9 +
 .../camel/component/netty4/NettyComponent.java  |   8 +
 .../NettyGlobalSSLContextParametersTest.java|  93 +
 .../component/olingo2/Olingo2Component.java |   8 +
 .../component/olingo4/Olingo4Component.java |   8 +
 .../component/restlet/RestletComponent.java |   8 +
 ...HttpsWithGlobalSSLContextParametersTest.java | 104 +++
 .../salesforce/SalesforceComponent.java |  13 +-
 .../src/main/docs/servicenow-component.adoc |   3 +-
 .../servicenow/ServiceNowComponent.java |   8 +
 .../servicenow/ServiceNowConfiguration.java |  13 ++
 .../security/CamelSSLAutoConfiguration.java |  42 +
 .../CamelSSLConfigurationProperties.java|  55 ++
 .../main/resources/META-INF/spring.factories|   3 +-
 .../spring/ws/SpringWebserviceComponent.java|   8 +
 .../camel/component/stomp/StompComponent.java   |  10 +
 .../component/stomp/StompConfiguration.java |  12 ++
 .../stomp/StompGlobalSslConsumerTest.java   |  47 +
 .../component/undertow/UndertowComponent.java   |  12 +-
 .../src/main/docs/websocket-component.adoc  |   6 +-
 .../component/websocket/WebsocketComponent.java |  28 ++-
 .../component/websocket/WebsocketEndpoint.java  |  13 ++
 ...bsocketSSLContextGlobalRouteExampleTest.java | 187 +++
 .../ConsulComponentConfiguration.java   |  13 ++
 .../springboot/EtcdComponentConfiguration.java  |  13 ++
 .../HttpComponentSSLAutoConfiguration.java  |  85 +
 .../HttpComponentSSLConfiguration.java  |  43 +
 .../main/resources/META-INF/spring.factories|   3 +-
 .../camel-jetty9-starter/pom.xml|   6 +
 .../camel/component/jetty9/Jetty9SSLTest.java   |  89 +
 

[08/13] camel git commit: CAMEL-10650: renaming common methods

2017-04-11 Thread nferraro
http://git-wip-us.apache.org/repos/asf/camel/blob/1f3c10ed/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketComponent.java
--
diff --git 
a/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketComponent.java
 
b/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketComponent.java
index d69706b..c1753cf 100644
--- 
a/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketComponent.java
+++ 
b/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketComponent.java
@@ -67,7 +67,7 @@ public class WebsocketComponent extends UriEndpointComponent 
implements SSLConte
 @Metadata(label = "security")
 protected SSLContextParameters sslContextParameters;
 @Metadata(label = "security", defaultValue = "false")
-protected boolean useGlobalSSLContextParameters;
+protected boolean useGlobalSslContextParameters;
 @Metadata(label = "advanced")
 protected ThreadPool threadPool;
 @Metadata(defaultValue = "9292")
@@ -300,7 +300,7 @@ public class WebsocketComponent extends 
UriEndpointComponent implements SSLConte
 sslContextParameters = getSslContextParameters();
 }
 if (sslContextParameters == null) {
-sslContextParameters = getGlobalSSLContextParameters();
+sslContextParameters = retrieveGlobalSslContextParameters();
 }
 
 // prefer to use endpoint configured over component configured
@@ -735,16 +735,16 @@ public class WebsocketComponent extends 
UriEndpointComponent implements SSLConte
 }
 
 @Override
-public boolean isUseGlobalSSLContextParameters() {
-return this.useGlobalSSLContextParameters;
+public boolean isUseGlobalSslContextParameters() {
+return this.useGlobalSslContextParameters;
 }
 
 /**
  * Enable usage of global SSL context parameters.
  */
 @Override
-public void setUseGlobalSSLContextParameters(boolean 
useGlobalSSLContextParameters) {
-this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+public void setUseGlobalSslContextParameters(boolean 
useGlobalSslContextParameters) {
+this.useGlobalSslContextParameters = useGlobalSslContextParameters;
 }
 
 public Map getSocketFactory() {

http://git-wip-us.apache.org/repos/asf/camel/blob/1f3c10ed/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLContextGlobalRouteExampleTest.java
--
diff --git 
a/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLContextGlobalRouteExampleTest.java
 
b/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLContextGlobalRouteExampleTest.java
index 7dee865..ebd2242 100644
--- 
a/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLContextGlobalRouteExampleTest.java
+++ 
b/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLContextGlobalRouteExampleTest.java
@@ -96,7 +96,7 @@ public class WebsocketSSLContextGlobalRouteExampleTest 
extends CamelTestSupport
 sslContextParameters.setServerParameters(scsp);
 context.setSSLContextParameters(sslContextParameters);
 
-((SSLContextParametersAware) 
context.getComponent("websocket")).setUseGlobalSSLContextParameters(true);
+((SSLContextParametersAware) 
context.getComponent("websocket")).setUseGlobalSslContextParameters(true);
 return context;
 }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/1f3c10ed/platforms/spring-boot/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentConfiguration.java
--
diff --git 
a/platforms/spring-boot/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentConfiguration.java
 
b/platforms/spring-boot/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentConfiguration.java
index c0c7a25..e06efc2 100644
--- 
a/platforms/spring-boot/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentConfiguration.java
+++ 
b/platforms/spring-boot/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentConfiguration.java
@@ -65,7 +65,7 @@ public class HttpComponentConfiguration {
 /**
  * Enable usage of global SSL context parameters.
  */
-private Boolean useGlobalSSLContextParameters = false;
+private Boolean useGlobalSslContextParameters = false;
 /**
  * To use a custom 

[04/13] camel git commit: CAMEL-10650: adding docs and fixing tests

2017-04-11 Thread nferraro
http://git-wip-us.apache.org/repos/asf/camel/blob/6cfdf421/platforms/spring-boot/components-starter/camel-irc-starter/src/main/java/org/apache/camel/component/irc/springboot/IrcComponentAutoConfiguration.java
--
diff --git 
a/platforms/spring-boot/components-starter/camel-irc-starter/src/main/java/org/apache/camel/component/irc/springboot/IrcComponentAutoConfiguration.java
 
b/platforms/spring-boot/components-starter/camel-irc-starter/src/main/java/org/apache/camel/component/irc/springboot/IrcComponentAutoConfiguration.java
index 34a6718..67d9cf8 100644
--- 
a/platforms/spring-boot/components-starter/camel-irc-starter/src/main/java/org/apache/camel/component/irc/springboot/IrcComponentAutoConfiguration.java
+++ 
b/platforms/spring-boot/components-starter/camel-irc-starter/src/main/java/org/apache/camel/component/irc/springboot/IrcComponentAutoConfiguration.java
@@ -16,8 +16,11 @@
  */
 package org.apache.camel.component.irc.springboot;
 
+import java.util.HashMap;
+import java.util.Map;
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.irc.IrcComponent;
+import org.apache.camel.util.IntrospectionSupport;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
 import org.springframework.boot.autoconfigure.condition.ConditionMessage;
 import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
@@ -26,6 +29,7 @@ import 
org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import 
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
 import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
 import org.springframework.boot.bind.RelaxedPropertyResolver;
+import 
org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ConditionContext;
 import org.springframework.context.annotation.Conditional;
@@ -40,16 +44,42 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
 @ConditionalOnBean(type = 
"org.apache.camel.spring.boot.CamelAutoConfiguration")
 @Conditional(IrcComponentAutoConfiguration.Condition.class)
 @AutoConfigureAfter(name = 
"org.apache.camel.spring.boot.CamelAutoConfiguration")
+@EnableConfigurationProperties(IrcComponentConfiguration.class)
 public class IrcComponentAutoConfiguration {
 
 @Lazy
 @Bean(name = "irc-component")
 @ConditionalOnClass(CamelContext.class)
 @ConditionalOnMissingBean(IrcComponent.class)
-public IrcComponent configureIrcComponent(CamelContext camelContext)
-throws Exception {
+public IrcComponent configureIrcComponent(CamelContext camelContext,
+IrcComponentConfiguration configuration) throws Exception {
 IrcComponent component = new IrcComponent();
 component.setCamelContext(camelContext);
+Map parameters = new HashMap<>();
+IntrospectionSupport.getProperties(configuration, parameters, null,
+false);
+for (Map.Entry entry : parameters.entrySet()) {
+Object value = entry.getValue();
+Class paramClass = value.getClass();
+if (paramClass.getName().endsWith("NestedConfiguration")) {
+Class nestedClass = null;
+try {
+nestedClass = (Class) paramClass.getDeclaredField(
+"CAMEL_NESTED_CLASS").get(null);
+HashMap nestedParameters = new HashMap<>();
+IntrospectionSupport.getProperties(value, nestedParameters,
+null, false);
+Object nestedProperty = nestedClass.newInstance();
+IntrospectionSupport.setProperties(camelContext,
+camelContext.getTypeConverter(), nestedProperty,
+nestedParameters);
+entry.setValue(nestedProperty);
+} catch (NoSuchFieldException e) {
+}
+}
+}
+IntrospectionSupport.setProperties(camelContext,
+camelContext.getTypeConverter(), component, parameters);
 return component;
 }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/6cfdf421/platforms/spring-boot/components-starter/camel-irc-starter/src/main/java/org/apache/camel/component/irc/springboot/IrcComponentConfiguration.java
--
diff --git 
a/platforms/spring-boot/components-starter/camel-irc-starter/src/main/java/org/apache/camel/component/irc/springboot/IrcComponentConfiguration.java
 
b/platforms/spring-boot/components-starter/camel-irc-starter/src/main/java/org/apache/camel/component/irc/springboot/IrcComponentConfiguration.java
index 1998f9f..02daefb 100644
--- 

[11/13] camel git commit: CAMEL-10650: putting flag to enable global SSL config in all components

2017-04-11 Thread nferraro
http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompComponent.java
--
diff --git 
a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompComponent.java
 
b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompComponent.java
index bed8ba4..3b6854d 100644
--- 
a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompComponent.java
+++ 
b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompComponent.java
@@ -33,6 +33,8 @@ public class StompComponent extends UriEndpointComponent 
implements SSLContextPa
 @Metadata(label = "security", secret = true)
 private String passcode;
 private String host;
+@Metadata(label = "security", defaultValue = "false")
+private boolean useGlobalSSLContextParameters;
 
 public StompComponent() {
 super(StompEndpoint.class);
@@ -50,7 +52,7 @@ public class StompComponent extends UriEndpointComponent 
implements SSLContextPa
 StompEndpoint endpoint = new StompEndpoint(uri, this, config, 
destination);
 setProperties(endpoint, parameters);
 
-if (config.isUseGlobalSslContextParameters() && 
config.getSslContextParameters() == null) {
+if (config.getSslContextParameters() == null) {
 config.setSslContextParameters(getGlobalSSLContextParameters());
 }
 
@@ -96,4 +98,17 @@ public class StompComponent extends UriEndpointComponent 
implements SSLContextPa
 configuration.setHost(host);
 }
 
+@Override
+public boolean isUseGlobalSSLContextParameters() {
+return this.useGlobalSSLContextParameters;
+}
+
+/**
+ * Enable usage of global SSL context parameters.
+ */
+@Override
+public void setUseGlobalSSLContextParameters(boolean 
useGlobalSSLContextParameters) {
+this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+}
+
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompConfiguration.java
--
diff --git 
a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompConfiguration.java
 
b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompConfiguration.java
index f46a173..61ddd0d 100644
--- 
a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompConfiguration.java
+++ 
b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompConfiguration.java
@@ -35,8 +35,6 @@ public class StompConfiguration implements Cloneable {
 private String host;
 @UriParam(label = "security")
 private SSLContextParameters sslContextParameters;
-@Metadata(label = "security", defaultValue = "false")
-private boolean useGlobalSslContextParameters;
 
 /**
  * Returns a copy of this configuration
@@ -105,14 +103,4 @@ public class StompConfiguration implements Cloneable {
 this.sslContextParameters = sslContextParameters;
 }
 
-public boolean isUseGlobalSslContextParameters() {
-return useGlobalSslContextParameters;
-}
-
-/**
- * Enable usage of Camel global SSL configuration
- */
-public void setUseGlobalSslContextParameters(boolean 
useGlobalSslContextParameters) {
-this.useGlobalSslContextParameters = useGlobalSslContextParameters;
-}
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-stomp/src/test/java/org/apache/camel/component/stomp/StompGlobalSslConsumerTest.java
--
diff --git 
a/components/camel-stomp/src/test/java/org/apache/camel/component/stomp/StompGlobalSslConsumerTest.java
 
b/components/camel-stomp/src/test/java/org/apache/camel/component/stomp/StompGlobalSslConsumerTest.java
index 99ce061..aa1d942 100644
--- 
a/components/camel-stomp/src/test/java/org/apache/camel/component/stomp/StompGlobalSslConsumerTest.java
+++ 
b/components/camel-stomp/src/test/java/org/apache/camel/component/stomp/StompGlobalSslConsumerTest.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.stomp;
 
 import org.apache.camel.CamelContext;
+import org.apache.camel.SSLContextParametersAware;
 import org.apache.camel.builder.RouteBuilder;
 
 public class StompGlobalSslConsumerTest extends StompConsumerTest {
@@ -25,6 +26,8 @@ public class StompGlobalSslConsumerTest extends 
StompConsumerTest {
 protected CamelContext createCamelContext() throws Exception {
 CamelContext context = super.createCamelContext();
 context.setSSLContextParameters(getClientSSLContextParameters());
+
+((SSLContextParametersAware) 
context.getComponent("stomp")).setUseGlobalSSLContextParameters(true);
 return context;
 }

[09/13] camel git commit: CAMEL-10650: renaming common methods

2017-04-11 Thread nferraro
CAMEL-10650: renaming common methods


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

Branch: refs/heads/master
Commit: 1f3c10edd2a00b85165069b1cd03fb6e1be3dd75
Parents: d51aa65
Author: Nicola Ferraro 
Authored: Tue Apr 11 13:34:42 2017 +0200
Committer: Nicola Ferraro 
Committed: Tue Apr 11 16:04:22 2017 +0200

--
 .../org/apache/camel/SSLContextParametersAware.java |  8 
 .../org/apache/camel/component/ahc/AhcComponent.java| 12 ++--
 ...onentClientConfigGlobalSslContextParametersTest.java |  4 ++--
 .../apache/camel/component/cometd/CometdComponent.java  | 12 ++--
 ...obalContextParametersCometdProducerConsumerTest.java |  2 +-
 .../apache/camel/component/consul/ConsulComponent.java  | 12 ++--
 .../org/apache/camel/component/cxf/CxfComponent.java| 12 ++--
 .../camel/component/cxf/jaxrs/CxfRsComponent.java   | 12 ++--
 .../component/cxf/jaxrs/CxfRsGlobalSslProducerTest.java |  2 +-
 .../apache/camel/component/cxf/ssl/SslGlobalTest.java   |  2 +-
 .../org/apache/camel/component/etcd/EtcdComponent.java  | 12 ++--
 .../camel/component/file/remote/FtpsComponent.java  | 12 ++--
 ...houtClientAuthAndGlobalSSLContextParametersTest.java |  2 +-
 .../org/apache/camel/component/http/HttpComponent.java  | 10 +-
 .../org/apache/camel/component/http4/HttpComponent.java | 12 ++--
 .../org/apache/camel/component/irc/IrcComponent.java| 12 ++--
 .../camel/component/jetty/JettyHttpComponent.java   | 12 ++--
 .../apache/camel/component/kafka/KafkaComponent.java| 12 ++--
 .../camel/component/lumberjack/LumberjackComponent.java | 12 ++--
 .../lumberjack/LumberjackComponentGlobalSSLTest.java|  2 +-
 .../org/apache/camel/component/mail/MailComponent.java  | 12 ++--
 .../apache/camel/component/mina2/Mina2Component.java| 12 ++--
 .../mina2/Mina2SslGlobalContextParametersTcpTest.java   |  2 +-
 .../org/apache/camel/component/nats/NatsComponent.java  | 12 ++--
 .../camel/component/netty/http/NettyHttpComponent.java  | 12 ++--
 .../component/netty/http/NettyHttpGlobalSSLTest.java|  2 +-
 .../apache/camel/component/netty/NettyComponent.java| 12 ++--
 .../netty/NettyGlobalSSLContextParametersTest.java  |  2 +-
 .../camel/component/netty4/http/NettyHttpComponent.java | 12 ++--
 .../apache/camel/component/netty4/NettyComponent.java   | 12 ++--
 .../netty4/NettyGlobalSSLContextParametersTest.java |  2 +-
 .../camel/component/olingo2/Olingo2Component.java   | 12 ++--
 .../camel/component/olingo4/Olingo4Component.java   | 12 ++--
 .../camel/component/restlet/RestletComponent.java   | 12 ++--
 .../RestletHttpsWithGlobalSSLContextParametersTest.java |  2 +-
 .../camel/component/salesforce/SalesforceComponent.java | 12 ++--
 .../camel/component/servicenow/ServiceNowComponent.java | 12 ++--
 .../component/spring/ws/SpringWebserviceComponent.java  | 12 ++--
 .../apache/camel/component/stomp/StompComponent.java| 12 ++--
 .../component/stomp/StompGlobalSslConsumerTest.java |  2 +-
 .../camel/component/undertow/UndertowComponent.java | 12 ++--
 .../camel/component/websocket/WebsocketComponent.java   | 12 ++--
 .../WebsocketSSLContextGlobalRouteExampleTest.java  |  2 +-
 .../http/springboot/HttpComponentConfiguration.java |  8 
 44 files changed, 195 insertions(+), 195 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/1f3c10ed/camel-core/src/main/java/org/apache/camel/SSLContextParametersAware.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/SSLContextParametersAware.java 
b/camel-core/src/main/java/org/apache/camel/SSLContextParametersAware.java
index 07f684a..7c10e20 100644
--- a/camel-core/src/main/java/org/apache/camel/SSLContextParametersAware.java
+++ b/camel-core/src/main/java/org/apache/camel/SSLContextParametersAware.java
@@ -26,8 +26,8 @@ public interface SSLContextParametersAware extends 
CamelContextAware {
 /**
  * Returns the global {@link SSLContextParameters} if enabled on the 
implementing object, null otherwise.
  */
-default SSLContextParameters getGlobalSSLContextParameters() {
-if (isUseGlobalSSLContextParameters()) {
+default SSLContextParameters retrieveGlobalSslContextParameters() {
+if (isUseGlobalSslContextParameters()) {
 return 

[05/13] camel git commit: CAMEL-10650: adding docs and fixing tests

2017-04-11 Thread nferraro
CAMEL-10650: adding docs and fixing tests


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

Branch: refs/heads/master
Commit: 6cfdf4214288854d2f91a0fbf407ee1df99a8a01
Parents: 1f3c10e
Author: Nicola Ferraro 
Authored: Tue Apr 11 15:58:43 2017 +0200
Committer: Nicola Ferraro 
Committed: Tue Apr 11 16:04:22 2017 +0200

--
 .../src/main/docs/ahc-ws-component.adoc |  3 +-
 .../camel-ahc/src/main/docs/ahc-component.adoc  |  3 +-
 .../src/main/docs/cometd-component.adoc |  3 +-
 .../src/main/docs/consul-component.adoc |  3 +-
 .../camel-cxf/src/main/docs/cxf-component.adoc  |  3 +-
 .../src/main/docs/cxfrs-component.adoc  |  3 +-
 .../src/main/docs/etcd-component.adoc   |  6 ++--
 .../camel-ftp/src/main/docs/ftps-component.adoc | 11 ++-
 .../src/main/docs/http-component.adoc   |  2 +-
 .../src/main/docs/http4-component.adoc  |  3 +-
 .../camel-irc/src/main/docs/irc-component.adoc  | 11 ++-
 .../src/main/docs/jetty-component.adoc  |  3 +-
 .../src/main/docs/kafka-component.adoc  |  6 ++--
 .../src/main/docs/lumberjack-component.adoc |  2 +-
 .../src/main/docs/mail-component.adoc   |  3 +-
 .../src/main/docs/mina2-component.adoc  |  6 ++--
 .../src/main/docs/nats-component.adoc   | 11 ++-
 .../src/main/docs/netty-http-component.adoc |  3 +-
 .../src/main/docs/netty-component.adoc  |  3 +-
 .../src/main/docs/netty4-http-component.adoc|  3 +-
 .../src/main/docs/netty4-component.adoc |  3 +-
 .../src/main/docs/olingo2-component.adoc|  3 +-
 .../src/main/docs/olingo4-component.adoc|  3 +-
 .../src/main/docs/restlet-component.adoc|  3 +-
 .../src/main/docs/salesforce-component.adoc |  3 +-
 .../src/main/docs/servicenow-component.adoc |  6 ++--
 .../src/main/docs/spring-ws-component.adoc  | 11 ++-
 .../src/main/docs/stomp-component.adoc  |  3 +-
 .../src/main/docs/undertow-component.adoc   |  3 +-
 .../src/main/docs/websocket-component.adoc  |  5 ++-
 .../springboot/AhcComponentConfiguration.java   | 13 
 .../ws/springboot/WsComponentConfiguration.java | 13 
 .../CometdComponentConfiguration.java   | 13 
 .../ConsulComponentConfiguration.java   | 26 +++
 .../springboot/CxfRsComponentConfiguration.java | 13 
 .../springboot/CxfComponentConfiguration.java   | 13 
 .../springboot/EtcdComponentConfiguration.java  | 26 +++
 .../FtpsComponentAutoConfiguration.java | 34 ++--
 .../springboot/FtpsComponentConfiguration.java  | 13 
 .../springboot/HttpComponentConfiguration.java  |  4 +--
 .../HttpComponentSSLAutoConfiguration.java  |  2 +-
 .../springboot/HttpComponentConfiguration.java  | 13 
 .../IrcComponentAutoConfiguration.java  | 34 ++--
 .../springboot/IrcComponentConfiguration.java   | 13 
 .../JettyHttpComponentConfiguration9.java   | 13 
 .../camel/component/jetty9/Jetty9SSLTest.java   |  6 +++-
 .../springboot/KafkaComponentConfiguration.java | 26 +++
 .../LumberjackComponentConfiguration.java   |  2 +-
 .../springboot/MailComponentConfiguration.java  | 13 
 .../springboot/Mina2ComponentConfiguration.java | 26 +++
 .../NatsComponentAutoConfiguration.java | 34 ++--
 .../springboot/NatsComponentConfiguration.java  | 13 
 .../NettyHttpComponentConfiguration.java| 13 
 .../springboot/NettyComponentConfiguration.java | 13 
 .../NettyHttpComponentConfiguration.java| 13 
 .../http/springboot/Netty4HttpSSLTest.java  |  6 +++-
 .../springboot/NettyComponentConfiguration.java | 13 
 .../Olingo2ComponentConfiguration.java  | 13 
 .../Olingo4ComponentConfiguration.java  | 13 
 .../RestletComponentConfiguration.java  | 13 
 .../SalesforceComponentConfiguration.java   | 13 
 .../ServiceNowComponentConfiguration.java   | 26 +++
 ...ingWebserviceComponentAutoConfiguration.java | 34 +++-
 .../SpringWebserviceComponentConfiguration.java | 13 
 .../springboot/StompComponentConfiguration.java | 26 +++
 .../UndertowComponentConfiguration.java | 13 
 .../component/undertow/UndertowSSLTest.java |  3 +-
 .../WebsocketComponentConfiguration.java|  4 +--
 68 files changed, 592 insertions(+), 134 deletions(-)
--



[01/13] camel git commit: CAMEL-10650: adding sslContextParameters to spring-boot configuration

2017-04-11 Thread nferraro
Repository: camel
Updated Branches:
  refs/heads/master 1fbc447f9 -> 3bf99ccaf


http://git-wip-us.apache.org/repos/asf/camel/blob/ef916c22/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLContextGlobalRouteExampleTest.java
--
diff --git 
a/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLContextGlobalRouteExampleTest.java
 
b/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLContextGlobalRouteExampleTest.java
new file mode 100644
index 000..d38e0fe
--- /dev/null
+++ 
b/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLContextGlobalRouteExampleTest.java
@@ -0,0 +1,187 @@
+/**
+ * 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.component.websocket;
+
+import java.io.IOException;
+import java.net.URL;
+import java.security.GeneralSecurityException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import javax.net.ssl.SSLContext;
+
+import io.netty.handler.ssl.ClientAuth;
+import io.netty.handler.ssl.JdkSslContext;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.impl.JndiRegistry;
+import org.apache.camel.test.AvailablePortFinder;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.camel.util.jsse.KeyManagersParameters;
+import org.apache.camel.util.jsse.KeyStoreParameters;
+import org.apache.camel.util.jsse.SSLContextParameters;
+import org.apache.camel.util.jsse.GlobalSSLContextParametersSupplier;
+import org.apache.camel.util.jsse.SSLContextServerParameters;
+import org.apache.camel.util.jsse.TrustManagersParameters;
+import org.asynchttpclient.AsyncHttpClient;
+import org.asynchttpclient.AsyncHttpClientConfig;
+import org.asynchttpclient.DefaultAsyncHttpClient;
+import org.asynchttpclient.DefaultAsyncHttpClientConfig;
+import org.asynchttpclient.ws.WebSocket;
+import org.asynchttpclient.ws.WebSocketTextListener;
+import org.asynchttpclient.ws.WebSocketUpgradeHandler;
+import org.junit.Before;
+import org.junit.Test;
+
+public class WebsocketSSLContextGlobalRouteExampleTest extends 
CamelTestSupport {
+
+private static final String NULL_VALUE_MARKER = 
CamelTestSupport.class.getCanonicalName();
+private static List received = new ArrayList();
+private static CountDownLatch latch = new CountDownLatch(10);
+private Properties originalValues = new Properties();
+private String pwd = "changeit";
+private String uri;
+private String server = "127.0.0.1";
+private int port;
+
+@Override
+@Before
+public void setUp() throws Exception {
+port = AvailablePortFinder.getNextAvailable(16300);
+
+URL trustStoreUrl = 
this.getClass().getClassLoader().getResource("jsse/localhost.ks");
+setSystemProp("javax.net.ssl.trustStore", 
trustStoreUrl.toURI().getPath());
+uri = "websocket://" + server + ":" + port + "/test";
+
+super.setUp();
+}
+
+@Override
+protected JndiRegistry createRegistry() throws Exception {
+KeyStoreParameters ksp = new KeyStoreParameters();
+ksp.setResource("jsse/localhost.ks");
+ksp.setPassword(pwd);
+
+KeyManagersParameters kmp = new KeyManagersParameters();
+kmp.setKeyPassword(pwd);
+kmp.setKeyStore(ksp);
+
+TrustManagersParameters tmp = new TrustManagersParameters();
+tmp.setKeyStore(ksp);
+
+// NOTE: Needed since the client uses a loose trust configuration when 
no ssl context
+// is provided.  We turn on WANT client-auth to prefer using 
authentication
+SSLContextServerParameters scsp = new SSLContextServerParameters();
+
+SSLContextParameters sslContextParameters = new SSLContextParameters();
+sslContextParameters.setKeyManagers(kmp);
+sslContextParameters.setTrustManagers(tmp);
+sslContextParameters.setServerParameters(scsp);
+
+JndiRegistry registry = super.createRegistry();
+

camel git commit: CAMEL-10947: camel-box

2017-04-11 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master bea861f84 -> 1fbc447f9


CAMEL-10947: camel-box


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

Branch: refs/heads/master
Commit: 1fbc447f97c48dfcae77ede370a92b8f78d7e666
Parents: bea861f
Author: Claus Ibsen 
Authored: Tue Apr 11 15:48:26 2017 +0200
Committer: Claus Ibsen 
Committed: Tue Apr 11 15:49:14 2017 +0200

--
 platforms/karaf/features/src/main/resources/features.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/1fbc447f/platforms/karaf/features/src/main/resources/features.xml
--
diff --git a/platforms/karaf/features/src/main/resources/features.xml 
b/platforms/karaf/features/src/main/resources/features.xml
index 6b0c5bb5..eec9fe5 100644
--- a/platforms/karaf/features/src/main/resources/features.xml
+++ b/platforms/karaf/features/src/main/resources/features.xml
@@ -246,7 +246,7 @@
 mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xerces/${xerces-bundle-version}
 mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xmlresolver/${xmlresolver-bundle-version}
 wrap:mvn:com.box/box-java-sdk/${box-java-sdk-version}
-mvn:org.apache.camel/camel-box-api/${project.version}
+mvn:org.apache.camel/camel-box-api/${project.version}
 mvn:org.apache.camel/camel-box/${project.version}
   
   



camel git commit: Add yaml to Marshal/Unmarshal definitions

2017-04-11 Thread lburgazzoli
Repository: camel
Updated Branches:
  refs/heads/master 80156b3c1 -> bea861f84


Add yaml to Marshal/Unmarshal definitions


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

Branch: refs/heads/master
Commit: bea861f844f6995149df398771be9f27d39d871d
Parents: 80156b3
Author: lburgazzoli 
Authored: Tue Apr 11 15:43:12 2017 +0200
Committer: lburgazzoli 
Committed: Tue Apr 11 15:43:33 2017 +0200

--
 .../src/main/java/org/apache/camel/model/MarshalDefinition.java  | 2 ++
 .../main/java/org/apache/camel/model/UnmarshalDefinition.java| 2 ++
 .../java/org/apache/camel/model/dataformat/YAMLDataFormat.java   | 4 ++--
 3 files changed, 6 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/bea861f8/camel-core/src/main/java/org/apache/camel/model/MarshalDefinition.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/model/MarshalDefinition.java 
b/camel-core/src/main/java/org/apache/camel/model/MarshalDefinition.java
index be08866..e149b7e 100644
--- a/camel-core/src/main/java/org/apache/camel/model/MarshalDefinition.java
+++ b/camel-core/src/main/java/org/apache/camel/model/MarshalDefinition.java
@@ -58,6 +58,7 @@ import 
org.apache.camel.model.dataformat.XMLSecurityDataFormat;
 import org.apache.camel.model.dataformat.XStreamDataFormat;
 import org.apache.camel.model.dataformat.XmlJsonDataFormat;
 import org.apache.camel.model.dataformat.XmlRpcDataFormat;
+import org.apache.camel.model.dataformat.YAMLDataFormat;
 import org.apache.camel.model.dataformat.ZipDataFormat;
 import org.apache.camel.model.dataformat.ZipFileDataFormat;
 import org.apache.camel.processor.MarshalProcessor;
@@ -113,6 +114,7 @@ public class MarshalDefinition extends 
NoOutputDefinition {
 @XmlElement(required = false, name = "xmlrpc", type = 
XmlRpcDataFormat.class),
 @XmlElement(required = false, name = "xstream", type = 
XStreamDataFormat.class),
 @XmlElement(required = false, name = "pgp", type = 
PGPDataFormat.class),
+@XmlElement(required = false, name = "yaml", type = 
YAMLDataFormat.class),
 @XmlElement(required = false, name = "zip", type = 
ZipDataFormat.class),
 @XmlElement(required = false, name = "zipFile", type = 
ZipFileDataFormat.class)}
 )

http://git-wip-us.apache.org/repos/asf/camel/blob/bea861f8/camel-core/src/main/java/org/apache/camel/model/UnmarshalDefinition.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/model/UnmarshalDefinition.java 
b/camel-core/src/main/java/org/apache/camel/model/UnmarshalDefinition.java
index c4af19b..34756f1 100644
--- a/camel-core/src/main/java/org/apache/camel/model/UnmarshalDefinition.java
+++ b/camel-core/src/main/java/org/apache/camel/model/UnmarshalDefinition.java
@@ -58,6 +58,7 @@ import 
org.apache.camel.model.dataformat.XMLSecurityDataFormat;
 import org.apache.camel.model.dataformat.XStreamDataFormat;
 import org.apache.camel.model.dataformat.XmlJsonDataFormat;
 import org.apache.camel.model.dataformat.XmlRpcDataFormat;
+import org.apache.camel.model.dataformat.YAMLDataFormat;
 import org.apache.camel.model.dataformat.ZipDataFormat;
 import org.apache.camel.model.dataformat.ZipFileDataFormat;
 import org.apache.camel.processor.UnmarshalProcessor;
@@ -113,6 +114,7 @@ public class UnmarshalDefinition extends 
NoOutputDefinition
 @XmlElement(required = false, name = "xmlrpc", type = 
XmlRpcDataFormat.class),
 @XmlElement(required = false, name = "xstream", type = 
XStreamDataFormat.class),
 @XmlElement(required = false, name = "pgp", type = 
PGPDataFormat.class),
+@XmlElement(required = false, name = "yaml", type = 
YAMLDataFormat.class),
 @XmlElement(required = false, name = "zip", type = 
ZipDataFormat.class),
 @XmlElement(required = false, name = "zipFile", type = 
ZipFileDataFormat.class)}
 )

http://git-wip-us.apache.org/repos/asf/camel/blob/bea861f8/camel-core/src/main/java/org/apache/camel/model/dataformat/YAMLDataFormat.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/model/dataformat/YAMLDataFormat.java
 
b/camel-core/src/main/java/org/apache/camel/model/dataformat/YAMLDataFormat.java
index 56f9dda..1f76113 100644
--- 
a/camel-core/src/main/java/org/apache/camel/model/dataformat/YAMLDataFormat.java
+++ 
b/camel-core/src/main/java/org/apache/camel/model/dataformat/YAMLDataFormat.java
@@ -86,9 +86,9 @@ public 

camel git commit: Update OpenTracing agent version to 0.0.11, and update rule file name/location.

2017-04-11 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master a421db268 -> 80156b3c1


Update OpenTracing agent version to 0.0.11, and update rule file name/location.


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

Branch: refs/heads/master
Commit: 80156b3c1f3d749aec703ce6620015aee5db43c4
Parents: a421db2
Author: Gary Brown 
Authored: Tue Apr 11 14:31:00 2017 +0100
Committer: Claus Ibsen 
Committed: Tue Apr 11 15:36:31 2017 +0200

--
 .../src/main/resources/otagent/apache-camel.btm | 32 
 .../src/main/resources/otarules.btm | 32 
 parent/pom.xml  |  2 +-
 3 files changed, 33 insertions(+), 33 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/80156b3c/components/camel-opentracing/src/main/resources/otagent/apache-camel.btm
--
diff --git 
a/components/camel-opentracing/src/main/resources/otagent/apache-camel.btm 
b/components/camel-opentracing/src/main/resources/otagent/apache-camel.btm
deleted file mode 100644
index 609153b..000
--- a/components/camel-opentracing/src/main/resources/otagent/apache-camel.btm
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# 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.
-#
-
-# State 0 - camel context not initialized
-# State 1 - camel context initialized
-
-RULE apache-camel: Install OpenTracing tracer
-CLASS org.apache.camel.impl.DefaultCamelContext
-METHOD startRouteDefinitions
-HELPER io.opentracing.contrib.agent.OpenTracingHelper
-BIND
-  ottracer:org.apache.camel.opentracing.OpenTracingTracer = new 
org.apache.camel.opentracing.OpenTracingTracer();
-AT ENTRY
-IF getState($0) == 0
-DO
-  ottracer.init($0);
-  setState($0, 1);
-ENDRULE

http://git-wip-us.apache.org/repos/asf/camel/blob/80156b3c/components/camel-opentracing/src/main/resources/otarules.btm
--
diff --git a/components/camel-opentracing/src/main/resources/otarules.btm 
b/components/camel-opentracing/src/main/resources/otarules.btm
new file mode 100644
index 000..609153b
--- /dev/null
+++ b/components/camel-opentracing/src/main/resources/otarules.btm
@@ -0,0 +1,32 @@
+#
+# 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.
+#
+
+# State 0 - camel context not initialized
+# State 1 - camel context initialized
+
+RULE apache-camel: Install OpenTracing tracer
+CLASS org.apache.camel.impl.DefaultCamelContext
+METHOD startRouteDefinitions
+HELPER io.opentracing.contrib.agent.OpenTracingHelper
+BIND
+  ottracer:org.apache.camel.opentracing.OpenTracingTracer = new 
org.apache.camel.opentracing.OpenTracingTracer();
+AT ENTRY
+IF getState($0) == 0
+DO
+  ottracer.init($0);
+  setState($0, 1);
+ENDRULE

http://git-wip-us.apache.org/repos/asf/camel/blob/80156b3c/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index 3ffb3a7..6812d24 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -498,7 +498,7 @@
 2.7.0.Final
 3.0.2
 17.0
-0.0.10
+

camel git commit: CAMEL-11130: Lets output the jps command so we can see what the CI server outputs

2017-04-11 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master 0b4cae9fb -> a421db268


CAMEL-11130: Lets output the jps command so we can see what the CI server 
outputs


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

Branch: refs/heads/master
Commit: a421db26809b78126b2de5f5064cd5c33259856e
Parents: 0b4cae9
Author: Claus Ibsen 
Authored: Tue Apr 11 15:32:03 2017 +0200
Committer: Claus Ibsen 
Committed: Tue Apr 11 15:32:03 2017 +0200

--
 tests/camel-itest-karaf/kill-karaf.sh | 3 +++
 tests/camel-itest-osgi/kill-karaf.sh  | 3 +++
 2 files changed, 6 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/a421db26/tests/camel-itest-karaf/kill-karaf.sh
--
diff --git a/tests/camel-itest-karaf/kill-karaf.sh 
b/tests/camel-itest-karaf/kill-karaf.sh
index b306d21..c1b709b 100755
--- a/tests/camel-itest-karaf/kill-karaf.sh
+++ b/tests/camel-itest-karaf/kill-karaf.sh
@@ -17,5 +17,8 @@
 ## limitations under the License.
 ## ---
 
+echo "Listing all karaf processes"
+jps -l | grep karaf
+
 echo "Killing all karaf processes"
 jps -l | grep karaf | cut -d ' ' -f 1 | xargs -n1 kill
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/a421db26/tests/camel-itest-osgi/kill-karaf.sh
--
diff --git a/tests/camel-itest-osgi/kill-karaf.sh 
b/tests/camel-itest-osgi/kill-karaf.sh
index b306d21..c1b709b 100755
--- a/tests/camel-itest-osgi/kill-karaf.sh
+++ b/tests/camel-itest-osgi/kill-karaf.sh
@@ -17,5 +17,8 @@
 ## limitations under the License.
 ## ---
 
+echo "Listing all karaf processes"
+jps -l | grep karaf
+
 echo "Killing all karaf processes"
 jps -l | grep karaf | cut -d ' ' -f 1 | xargs -n1 kill
\ No newline at end of file



camel git commit: CAMEL-11059: camel-spring-dm - Should be removed

2017-04-11 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master 542e54d28 -> 0b4cae9fb


CAMEL-11059: camel-spring-dm - Should be removed


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

Branch: refs/heads/master
Commit: 0b4cae9fb467df91451ca2cade544b9f3f83f51a
Parents: 542e54d
Author: Claus Ibsen 
Authored: Tue Apr 11 15:23:11 2017 +0200
Committer: Claus Ibsen 
Committed: Tue Apr 11 15:23:11 2017 +0200

--
 .../src/test/java/org/apache/camel/itest/CamelSpringTest.java  | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/0b4cae9f/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelSpringTest.java
--
diff --git 
a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelSpringTest.java
 
b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelSpringTest.java
index 13fccee..d312b2e 100644
--- 
a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelSpringTest.java
+++ 
b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelSpringTest.java
@@ -23,12 +23,14 @@ import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.karaf.AbstractFeatureTest;
 import org.apache.camel.test.karaf.CamelKarafTestSupport;
 import org.apache.camel.util.ObjectHelper;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Configuration;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.PaxExam;
 
+@Ignore("spring-dm not work and is to be removed")
 @RunWith(PaxExam.class)
 public class CamelSpringTest extends AbstractFeatureTest {
 



[1/2] camel git commit: CAMEL-11130: Remove -kill option as CI server dont use it

2017-04-11 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master 1c6cf329c -> 542e54d28


CAMEL-11130: Remove -kill option as CI server dont use it


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

Branch: refs/heads/master
Commit: 7ec03d6ded82b534b8fec6ccda71db6528379200
Parents: 1c6cf32
Author: Claus Ibsen 
Authored: Tue Apr 11 14:49:11 2017 +0200
Committer: Claus Ibsen 
Committed: Tue Apr 11 14:49:21 2017 +0200

--
 tests/camel-itest-karaf/kill-karaf.sh | 2 +-
 tests/camel-itest-osgi/kill-karaf.sh  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/7ec03d6d/tests/camel-itest-karaf/kill-karaf.sh
--
diff --git a/tests/camel-itest-karaf/kill-karaf.sh 
b/tests/camel-itest-karaf/kill-karaf.sh
index cec2b33..b306d21 100755
--- a/tests/camel-itest-karaf/kill-karaf.sh
+++ b/tests/camel-itest-karaf/kill-karaf.sh
@@ -18,4 +18,4 @@
 ## ---
 
 echo "Killing all karaf processes"
-jps -l | grep karaf | cut -d ' ' -f 1 | xargs -n1 kill -kill
\ No newline at end of file
+jps -l | grep karaf | cut -d ' ' -f 1 | xargs -n1 kill
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/7ec03d6d/tests/camel-itest-osgi/kill-karaf.sh
--
diff --git a/tests/camel-itest-osgi/kill-karaf.sh 
b/tests/camel-itest-osgi/kill-karaf.sh
index cec2b33..b306d21 100755
--- a/tests/camel-itest-osgi/kill-karaf.sh
+++ b/tests/camel-itest-osgi/kill-karaf.sh
@@ -18,4 +18,4 @@
 ## ---
 
 echo "Killing all karaf processes"
-jps -l | grep karaf | cut -d ' ' -f 1 | xargs -n1 kill -kill
\ No newline at end of file
+jps -l | grep karaf | cut -d ' ' -f 1 | xargs -n1 kill
\ No newline at end of file



[2/2] camel git commit: CAMEL-11130: Only include test files. And skip flaky test

2017-04-11 Thread davsclaus
CAMEL-11130: Only include test files. And skip flaky test


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

Branch: refs/heads/master
Commit: 542e54d284178c92bda2fa17c3ee5796f5020fa9
Parents: 7ec03d6
Author: Claus Ibsen 
Authored: Tue Apr 11 14:53:08 2017 +0200
Committer: Claus Ibsen 
Committed: Tue Apr 11 14:53:08 2017 +0200

--
 tests/camel-itest-karaf/run-tests.sh   | 2 +-
 tests/camel-itest-osgi/run-tests.sh| 2 +-
 .../java/org/apache/camel/itest/cxf/CamelCxfBeanInjectTest.java| 2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/542e54d2/tests/camel-itest-karaf/run-tests.sh
--
diff --git a/tests/camel-itest-karaf/run-tests.sh 
b/tests/camel-itest-karaf/run-tests.sh
index 471ac08..39a4657 100755
--- a/tests/camel-itest-karaf/run-tests.sh
+++ b/tests/camel-itest-karaf/run-tests.sh
@@ -37,7 +37,7 @@ else
 fi  
 
 ## ensure the files are sorted
-for filename in $(ls -f $testdir/* | sort);
+for filename in $(ls -f $testdir/*Test* | sort);
 do
   testname=$(basename ${filename%.*})
 

http://git-wip-us.apache.org/repos/asf/camel/blob/542e54d2/tests/camel-itest-osgi/run-tests.sh
--
diff --git a/tests/camel-itest-osgi/run-tests.sh 
b/tests/camel-itest-osgi/run-tests.sh
index 1c90466..a865370 100755
--- a/tests/camel-itest-osgi/run-tests.sh
+++ b/tests/camel-itest-osgi/run-tests.sh
@@ -37,7 +37,7 @@ else
 fi  
 
 ## ensure the files are sorted
-for filename in $(ls -f $testdir/* | sort);
+for filename in $(ls -f $testdir/*Test* | sort);
 do
   testname=$(basename ${filename%.*})
 

http://git-wip-us.apache.org/repos/asf/camel/blob/542e54d2/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/cxf/CamelCxfBeanInjectTest.java
--
diff --git 
a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/cxf/CamelCxfBeanInjectTest.java
 
b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/cxf/CamelCxfBeanInjectTest.java
index 3a62707..dc7fe01 100644
--- 
a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/cxf/CamelCxfBeanInjectTest.java
+++ 
b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/cxf/CamelCxfBeanInjectTest.java
@@ -32,6 +32,7 @@ import org.apache.cxf.frontend.ClientProxyFactoryBean;
 import org.apache.cxf.message.Message;
 import org.junit.Assert;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Configuration;
@@ -43,6 +44,7 @@ import org.osgi.framework.Bundle;
 import org.osgi.framework.Constants;
 
 @RunWith(PaxExam.class)
+@Ignore("Flaky on CI server")
 public class CamelCxfBeanInjectTest extends AbstractFeatureTest {
 
 private static final int PORT = 
AvailablePortFinder.getNextAvailable(3);



camel git commit: CAMEL-11118: PingCheck : validate rest component

2017-04-11 Thread lburgazzoli
Repository: camel
Updated Branches:
  refs/heads/master 95314057c -> 1c6cf329c


CAMEL-8: PingCheck : validate rest component


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

Branch: refs/heads/master
Commit: 1c6cf329c3ea91a7ab4417bd0e9fa43d12f8b1d8
Parents: 9531405
Author: lburgazzoli 
Authored: Thu Apr 6 18:53:36 2017 +0200
Committer: lburgazzoli 
Committed: Tue Apr 11 14:09:33 2017 +0200

--
 .../camel/component/rest/RestComponent.java |  15 +-
 .../component/rest/RestComponentVerifier.java   | 152 
 .../verifier/CatalogVerifierCustomizer.java | 104 
 .../impl/verifier/DefaultComponentVerifier.java |  60 +++--
 .../camel/impl/verifier/ResultBuilder.java  |   4 +
 .../camel/impl/verifier/ResultErrorBuilder.java |  16 ++
 .../apache/camel/util/function/Suppliers.java   |  14 ++
 .../util/function/ThrowingTriConsumer.java  |  22 ++
 .../apache/camel/util/function/TriConsumer.java |  22 ++
 .../rest/RestComponentVerifierTest.java | 137 +++
 .../component/http4/HttpComponentVerifier.java  | 156 +++-
 .../rest/RestCamelComponentVerifierTest.java| 178 ++
 .../component/undertow/UndertowComponent.java   |  19 +-
 .../undertow/UndertowComponentVerifier.java | 239 +++
 .../undertow/UndertowComponentVerifierTest.java | 103 
 .../rest/RestUndertowComponentVerifierTest.java | 126 ++
 16 files changed, 1282 insertions(+), 85 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/1c6cf329/camel-core/src/main/java/org/apache/camel/component/rest/RestComponent.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/component/rest/RestComponent.java 
b/camel-core/src/main/java/org/apache/camel/component/rest/RestComponent.java
index 567d315..d1c1963 100644
--- 
a/camel-core/src/main/java/org/apache/camel/component/rest/RestComponent.java
+++ 
b/camel-core/src/main/java/org/apache/camel/component/rest/RestComponent.java
@@ -24,7 +24,9 @@ import java.util.function.Consumer;
 import java.util.function.Supplier;
 
 import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentVerifier;
 import org.apache.camel.Endpoint;
+import org.apache.camel.VerifiableComponent;
 import org.apache.camel.impl.DefaultComponent;
 import org.apache.camel.model.rest.RestConstants;
 import org.apache.camel.spi.Metadata;
@@ -33,13 +35,13 @@ import org.apache.camel.util.CamelContextHelper;
 import org.apache.camel.util.FileUtil;
 import org.apache.camel.util.IntrospectionSupport;
 import org.apache.camel.util.ObjectHelper;
-import org.apache.camel.util.StringHelper;
 import org.apache.camel.util.URISupport;
 
 /**
  * Rest component.
  */
-public class RestComponent extends DefaultComponent {
+@Metadata(label = "verifiers", enums = "parameters,connectivity")
+public class RestComponent extends DefaultComponent implements 
VerifiableComponent {
 
 @Metadata(label = "common")
 private String componentName;
@@ -230,4 +232,13 @@ public class RestComponent extends DefaultComponent {
 }
 }
 
+/**
+ * Get the {@link ComponentVerifier}
+ *
+ * @return the Component Verifier
+ */
+@Override
+public ComponentVerifier getVerifier() {
+return new RestComponentVerifier(this);
+}
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/1c6cf329/camel-core/src/main/java/org/apache/camel/component/rest/RestComponentVerifier.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/component/rest/RestComponentVerifier.java
 
b/camel-core/src/main/java/org/apache/camel/component/rest/RestComponentVerifier.java
new file mode 100644
index 000..5d19e0d
--- /dev/null
+++ 
b/camel-core/src/main/java/org/apache/camel/component/rest/RestComponentVerifier.java
@@ -0,0 +1,152 @@
+/**
+ * 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 

camel git commit: camel-connector - Ensure read lines are trimmed

2017-04-11 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master a5e44fb99 -> 95314057c


camel-connector - Ensure read lines are trimmed


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

Branch: refs/heads/master
Commit: 95314057cf103039c0b44dbf2644ab06ea05d3f5
Parents: a5e44fb
Author: Claus Ibsen 
Authored: Tue Apr 11 13:16:34 2017 +0200
Committer: Claus Ibsen 
Committed: Tue Apr 11 13:16:34 2017 +0200

--
 .../org/apache/camel/component/connector/ConnectorModel.java | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/95314057/connectors/camel-connector/src/main/java/org/apache/camel/component/connector/ConnectorModel.java
--
diff --git 
a/connectors/camel-connector/src/main/java/org/apache/camel/component/connector/ConnectorModel.java
 
b/connectors/camel-connector/src/main/java/org/apache/camel/component/connector/ConnectorModel.java
index 3d14336..2165d41 100644
--- 
a/connectors/camel-connector/src/main/java/org/apache/camel/component/connector/ConnectorModel.java
+++ 
b/connectors/camel-connector/src/main/java/org/apache/camel/component/connector/ConnectorModel.java
@@ -292,6 +292,8 @@ final class ConnectorModel {
 int pos = line.indexOf(':');
 String key = line.substring(0, pos);
 String value = line.substring(pos + 1);
+value = value.trim();
+key = key.trim();
 if (value.endsWith(",")) {
 value = value.substring(0, value.length() - 1);
 }
@@ -319,6 +321,8 @@ final class ConnectorModel {
 int pos = line.indexOf(':');
 String key = line.substring(0, pos);
 String value = line.substring(pos + 1);
+value = value.trim();
+key = key.trim();
 if (value.endsWith(",")) {
 value = value.substring(0, value.length() - 1);
 }



[1/2] camel git commit: camel-connector - should handle lifecycle of before/after processors

2017-04-11 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master c912cd8ae -> a5e44fb99


camel-connector - should handle lifecycle of before/after processors


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

Branch: refs/heads/master
Commit: dad6c8688a7cf48eea5a668f4b376f11d74c77dc
Parents: c912cd8
Author: Claus Ibsen 
Authored: Tue Apr 11 11:23:51 2017 +0200
Committer: Claus Ibsen 
Committed: Tue Apr 11 11:23:51 2017 +0200

--
 .../connector/ConnectorConsumerProcessor.java   | 26 
 .../component/connector/ConnectorProducer.java  |  6 ++---
 2 files changed, 29 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/dad6c868/connectors/camel-connector/src/main/java/org/apache/camel/component/connector/ConnectorConsumerProcessor.java
--
diff --git 
a/connectors/camel-connector/src/main/java/org/apache/camel/component/connector/ConnectorConsumerProcessor.java
 
b/connectors/camel-connector/src/main/java/org/apache/camel/component/connector/ConnectorConsumerProcessor.java
index aa717ec..53c3860 100644
--- 
a/connectors/camel-connector/src/main/java/org/apache/camel/component/connector/ConnectorConsumerProcessor.java
+++ 
b/connectors/camel-connector/src/main/java/org/apache/camel/component/connector/ConnectorConsumerProcessor.java
@@ -20,6 +20,7 @@ import org.apache.camel.AsyncCallback;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.processor.DelegateAsyncProcessor;
+import org.apache.camel.util.ServiceHelper;
 
 /**
  * Connector {@link Processor} which is capable of performing before and after 
custom processing
@@ -65,4 +66,29 @@ public class ConnectorConsumerProcessor extends 
DelegateAsyncProcessor {
 return super.process(exchange, delegate);
 }
 
+@Override
+protected void doStart() throws Exception {
+ServiceHelper.startServices(beforeConsumer, processor, afterConsumer);
+}
+
+@Override
+protected void doStop() throws Exception {
+ServiceHelper.stopServices(beforeConsumer, processor, afterConsumer);
+}
+
+@Override
+protected void doSuspend() throws Exception {
+ServiceHelper.suspendService(processor);
+}
+
+@Override
+protected void doResume() throws Exception {
+ServiceHelper.resumeService(processor);
+}
+
+@Override
+protected void doShutdown() throws Exception {
+ServiceHelper.stopAndShutdownServices(beforeConsumer, processor, 
afterConsumer);
+}
+
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/dad6c868/connectors/camel-connector/src/main/java/org/apache/camel/component/connector/ConnectorProducer.java
--
diff --git 
a/connectors/camel-connector/src/main/java/org/apache/camel/component/connector/ConnectorProducer.java
 
b/connectors/camel-connector/src/main/java/org/apache/camel/component/connector/ConnectorProducer.java
index 2cdc1d7..b5db55d 100644
--- 
a/connectors/camel-connector/src/main/java/org/apache/camel/component/connector/ConnectorProducer.java
+++ 
b/connectors/camel-connector/src/main/java/org/apache/camel/component/connector/ConnectorProducer.java
@@ -73,12 +73,12 @@ public class ConnectorProducer extends DefaultAsyncProducer 
{
 
 @Override
 protected void doStart() throws Exception {
-ServiceHelper.startService(producer);
+ServiceHelper.startServices(beforeProducer, producer, afterProducer);
 }
 
 @Override
 protected void doStop() throws Exception {
-ServiceHelper.stopService(producer);
+ServiceHelper.stopServices(beforeProducer, producer, afterProducer);
 }
 
 @Override
@@ -93,6 +93,6 @@ public class ConnectorProducer extends DefaultAsyncProducer {
 
 @Override
 protected void doShutdown() throws Exception {
-ServiceHelper.stopAndShutdownService(producer);
+ServiceHelper.stopAndShutdownServices(beforeProducer, producer, 
afterProducer);
 }
 }



[2/2] camel git commit: CAMEL-11133: Data format - Marshal and unmarshal should eager start their data formats

2017-04-11 Thread davsclaus
CAMEL-11133: Data format - Marshal and unmarshal should eager start their data 
formats


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

Branch: refs/heads/master
Commit: a5e44fb99e3727c180320c31f84d38b97c86ddad
Parents: dad6c86
Author: Claus Ibsen 
Authored: Tue Apr 11 11:31:57 2017 +0200
Committer: Claus Ibsen 
Committed: Tue Apr 11 11:31:57 2017 +0200

--
 .../main/java/org/apache/camel/processor/MarshalProcessor.java   | 4 ++--
 .../main/java/org/apache/camel/processor/UnmarshalProcessor.java | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/a5e44fb9/camel-core/src/main/java/org/apache/camel/processor/MarshalProcessor.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/processor/MarshalProcessor.java 
b/camel-core/src/main/java/org/apache/camel/processor/MarshalProcessor.java
index 6206a73..349b88c 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/MarshalProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/MarshalProcessor.java
@@ -110,8 +110,8 @@ public class MarshalProcessor extends ServiceSupport 
implements AsyncProcessor,
 ((CamelContextAware) dataFormat).setCamelContext(camelContext);
 }
 // add dataFormat as service which will also start the service
-// (false => we and handling the lifecycle of the dataFormat)
-getCamelContext().addService(dataFormat, false);
+// (false => we handle the lifecycle of the dataFormat)
+getCamelContext().addService(dataFormat, false, true);
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/a5e44fb9/camel-core/src/main/java/org/apache/camel/processor/UnmarshalProcessor.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/processor/UnmarshalProcessor.java 
b/camel-core/src/main/java/org/apache/camel/processor/UnmarshalProcessor.java
index 3c5183c..4fc1d21 100644
--- 
a/camel-core/src/main/java/org/apache/camel/processor/UnmarshalProcessor.java
+++ 
b/camel-core/src/main/java/org/apache/camel/processor/UnmarshalProcessor.java
@@ -123,8 +123,8 @@ public class UnmarshalProcessor extends ServiceSupport 
implements AsyncProcessor
 ((CamelContextAware) dataFormat).setCamelContext(camelContext);
 }
 // add dataFormat as service which will also start the service
-// (false => we and handling the lifecycle of the dataFormat)
-getCamelContext().addService(dataFormat, false);
+// (false => we handle the lifecycle of the dataFormat)
+getCamelContext().addService(dataFormat, false, true);
 }
 
 @Override



svn commit: r1010218 - in /websites/production/camel/content: cache/main.pageCache camel-configuration-utilities.html

2017-04-11 Thread buildbot
Author: buildbot
Date: Tue Apr 11 09:19:41 2017
New Revision: 1010218

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/camel-configuration-utilities.html

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

Modified: websites/production/camel/content/camel-configuration-utilities.html
==
--- websites/production/camel/content/camel-configuration-utilities.html 
(original)
+++ websites/production/camel/content/camel-configuration-utilities.html Tue 
Apr 11 09:19:41 2017
@@ -85,7 +85,7 @@

 
 
-JSSE UtilityThe JSSE 
Utility, available as of 2.8, allows you to easily configure 
aspects of the http://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html;
 rel="nofollow">Java Secure Socket Extension (JSSE) API in order to greatly 
simplify the use of custom transport layer security (TLS) settings on Camel 
components.Supported 
ComponentsThe following Camel components directly support the use of 
this configuration utility:AHCAHC-WShttps://cwiki.apache.org/confluence/display/CAMEL/APNS;>APNShttps://cwiki.apache.org/confluence/display/CAMEL/Box;>Bo
 xCometdhttps://cwiki.apache.org/confluence/display/CAMEL/Consul+Component;>Consulhttps://cwiki.apache.org/confluence/display/CAMEL/Etcd;>Etcdhttps://cwiki.apache.org/confluence/display/CAMEL/FTP;>FTP, FTP2HTTP4IRCJettyhttps://cwiki.apache.org/confluence/display/CAMEL/Kafka;>Kafkahttps://cwiki.apache.org/confluence/display/CAMEL/Lumberjack;>LumberjackMailhttps://cwiki.apache.org/confluenc
 e/display/CAMEL/MINA2">MINA2https://cwiki.apache.org/confluence/display/CAMEL/NATS;>NATSNetty, https://cwiki.apache.org/confluence/display/CAMEL/Netty4;>Netty4https://cwiki.apache.org/confluence/display/CAMEL/Olingo2;>Olingo2https://cwiki.apache.org/confluence/display/CAMEL/Restlet;>Restlethttps://cwiki.apache.org/confluence/display/CAMEL/Salesforce;>Salesforcehttps://cwiki.apache.org/confluence/display/CAMEL/ServiceNow;>ServiceNowhttps://cwiki.apache.org/confluence/display/CAMEL/Stomp
 ">Stomphttps://cwiki.apache.org/confluence/display/CAMEL/Undertow;>Undertowhttps://cwiki.apache.org/confluence/display/CAMEL/Websocket;>WebsocketThe
 following Camel components indirectly support the use of this configuration 
utility:CXFHTTPhttps://cwiki.apache.org/confluence/display/CAMEL/REST+Swagger+Component;>REST
 Swagger ComponentConfigurationThe key 
component in configuring TLS through the JSSE API is the SSLContext. The 
http://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#SSLContext;
 rel="nofollow">SSLContext provides socket factories for bo
 th http://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#SSLSocketFactory;
 rel="nofollow">client-side and http://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#SSLSocketFactory;
 rel="nofollow">server-side sockets as well as another component called an 
http://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#SSLENG;
 rel="nofollow">SSLEngine that is used by non-blocking IO to support 
TLS. The JSSE configuration utility provides an easy to use builder for 
configuring these JSSE components, among others, in a manner that allows you to 
provide all configuration options up front during the initialization of your 
application such that you don't have to customize library code or dig though 
the inner workings of a third-party library in orde
 r to inject hooks for the configuration of each component in the JSSE 
API. The central builder in the JSSE configuration utility is the 
SSLContextParameters. This class serves as the entry point for most 
configuration in the JSSE utility.All non-native classes are in the 
org.apache.camel.util.jsse package. All non-W3C schema defined types are 
in the http://camel.apache.org/schema/spring;>http://camel.apache.org/schema/spring
 or http://camel.apache.org/schema/blueprint;>http://camel.apache.org/schema/blueprint
 namespaces for Spring and Blueprint based configuration, 
respectively.SSLContextParametersJava Field Name and ClassXML Attribute/Element and TypeDescriptioncipherSuites - 
CipherSuitesParameterssslContextParameters/ciphersuites - 
CipherSuitesParametersThis optional property represents a collection of 
explicitly named cipher suites to enable on both the client and server side as 
well as in the SSLEngine. These values take precedence over filters 
supplied in cipherSuitesFilter. The utility attempts to enable the listed 
cipher suites regardless of whether or not the JSSE provider actually supports 
them or
  not. This behavior guarantees that listed cipher suites are always 
enabled when listed. For a 

[2/3] camel git commit: CAMEL-11126: add petstore connector for example

2017-04-11 Thread davsclaus
CAMEL-11126: add petstore connector for example


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

Branch: refs/heads/master
Commit: 46ee93e0219d52f4791d6a2c075afcb2c4ba4fa2
Parents: b04d6a8
Author: Claus Ibsen 
Authored: Mon Apr 10 13:35:24 2017 +0200
Committer: Claus Ibsen 
Committed: Tue Apr 11 10:40:05 2017 +0200

--
 connectors/examples/petstore-connector/pom.xml  |   5 +
 .../PetStoreConnectorConfiguration.java |  21 +++
 .../main/resources/camel-connector-schema.json  |   2 +-
 .../src/main/resources/camel-connector.json |   6 +-
 connectors/examples/petstore-example/Readme.md  |  26 
 connectors/examples/petstore-example/pom.xml| 127 +++
 .../main/java/org/foo/PetStoreApplication.java  |  34 +
 .../src/main/java/org/foo/PetStoreRoute.java|  34 +
 .../src/main/resources/application.properties   |   3 +
 connectors/examples/pom.xml |   1 +
 10 files changed, 256 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/46ee93e0/connectors/examples/petstore-connector/pom.xml
--
diff --git a/connectors/examples/petstore-connector/pom.xml 
b/connectors/examples/petstore-connector/pom.xml
index f129d55..369e796 100644
--- a/connectors/examples/petstore-connector/pom.xml
+++ b/connectors/examples/petstore-connector/pom.xml
@@ -68,6 +68,11 @@
   camel-rest-swagger
   ${project.version}
 
+
+  org.apache.camel
+  camel-undertow
+  ${project.version}
+
 
 
 

http://git-wip-us.apache.org/repos/asf/camel/blob/46ee93e0/connectors/examples/petstore-connector/src/main/java/org/foo/connector/springboot/PetStoreConnectorConfiguration.java
--
diff --git 
a/connectors/examples/petstore-connector/src/main/java/org/foo/connector/springboot/PetStoreConnectorConfiguration.java
 
b/connectors/examples/petstore-connector/src/main/java/org/foo/connector/springboot/PetStoreConnectorConfiguration.java
index 88409ab..0ae5ef3 100644
--- 
a/connectors/examples/petstore-connector/src/main/java/org/foo/connector/springboot/PetStoreConnectorConfiguration.java
+++ 
b/connectors/examples/petstore-connector/src/main/java/org/foo/connector/springboot/PetStoreConnectorConfiguration.java
@@ -16,6 +16,7 @@
  */
 package org.foo.connector.springboot;
 
+import java.net.URI;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -25,4 +26,24 @@ import 
org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @ConfigurationProperties(prefix = "camel.connector.petstore")
 public class PetStoreConnectorConfiguration {
+
+/**
+ * Path to the Swagger specification file. The scheme host base path are
+ * taken from this specification but these can be overriden with properties
+ * on the component or endpoint level. If not given the component tries to
+ * load swagger.json resource. Note that the host defined on the component
+ * and endpoint of this Component should contain the scheme hostname and
+ * optionally the port in the URI syntax (i.e.
+ * https://api.example.com:8080). Can be overriden in endpoint
+ * configuration.
+ */
+private URI specificationUri;
+
+public URI getSpecificationUri() {
+return specificationUri;
+}
+
+public void setSpecificationUri(URI specificationUri) {
+this.specificationUri = specificationUri;
+}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/46ee93e0/connectors/examples/petstore-connector/src/main/resources/camel-connector-schema.json
--
diff --git 
a/connectors/examples/petstore-connector/src/main/resources/camel-connector-schema.json
 
b/connectors/examples/petstore-connector/src/main/resources/camel-connector-schema.json
index d2e33ed..3018d5b 100644
--- 
a/connectors/examples/petstore-connector/src/main/resources/camel-connector-schema.json
+++ 
b/connectors/examples/petstore-connector/src/main/resources/camel-connector-schema.json
@@ -17,9 +17,9 @@
 "version": "2.19.0-SNAPSHOT"
   },
   "componentProperties": {
+"specificationUri": { "kind": "property", "displayName": "Specification 
Uri", "group": "producer", "label": "producer", "required": false, "type": 
"string", "javaType": "java.net.URI", "deprecated": false, "secret": false, 
"defaultValue": "http://petstore.swagger.io/v2/swagger.json;, "description": 
"Path to the 

[1/3] camel git commit: CAMEL-11126: add petstore connector for example

2017-04-11 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master 5be6f68fe -> c912cd8ae


CAMEL-11126: add petstore connector for example


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

Branch: refs/heads/master
Commit: b04d6a83f7feb3ffbfcc35ce841f110d131e16c7
Parents: 5be6f68
Author: Claus Ibsen 
Authored: Mon Apr 10 13:14:53 2017 +0200
Committer: Claus Ibsen 
Committed: Tue Apr 11 10:39:57 2017 +0200

--
 .../examples/petstore-connector/Readme.md   |   6 +
 connectors/examples/petstore-connector/pom.xml  | 192 +++
 .../org/foo/connector/PetStoreComponent.java|  27 +++
 .../PetStoreConnectorAutoConfiguration.java |  59 ++
 .../PetStoreConnectorConfiguration.java |  28 +++
 .../org/apache/camel/component/petstore |  18 ++
 .../main/resources/META-INF/spring.factories|  19 ++
 .../main/resources/camel-connector-schema.json  |  25 +++
 .../src/main/resources/camel-connector.json |  22 +++
 connectors/examples/pom.xml |   4 +-
 10 files changed, 399 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/b04d6a83/connectors/examples/petstore-connector/Readme.md
--
diff --git a/connectors/examples/petstore-connector/Readme.md 
b/connectors/examples/petstore-connector/Readme.md
new file mode 100644
index 000..68891d0
--- /dev/null
+++ b/connectors/examples/petstore-connector/Readme.md
@@ -0,0 +1,6 @@
+## PetStore Connector
+
+This is a basic Camel connector that is based on the Rest Swagger component 
from Apache Camel.
+
+The connector is configured to call the Swagger PetStore API online service 
every 5th second
+and return a list of pets in json format.

http://git-wip-us.apache.org/repos/asf/camel/blob/b04d6a83/connectors/examples/petstore-connector/pom.xml
--
diff --git a/connectors/examples/petstore-connector/pom.xml 
b/connectors/examples/petstore-connector/pom.xml
new file mode 100644
index 000..f129d55
--- /dev/null
+++ b/connectors/examples/petstore-connector/pom.xml
@@ -0,0 +1,192 @@
+
+
+http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;>
+
+  4.0.0
+
+  
+org.apache.camel
+connectors-examples
+2.19.0-SNAPSHOT
+..
+  
+
+  org.foo
+  petstore-connector
+  Camel :: Connectors :: Examples :: PetStore Connector
+  PetStore Connector
+  jar
+
+  
+
+  
+  
+org.apache.camel
+camel-parent
+${project.version}
+import
+pom
+  
+
+  
+
+  
+
+
+
+  org.apache.camel
+  camel-core
+  ${project.version}
+
+
+
+
+  org.apache.camel
+  camel-connector
+  ${project.version}
+
+
+
+
+  org.apache.camel
+  camel-rest-swagger
+  ${project.version}
+
+
+
+
+  org.apache.camel
+  apt
+
+
+  org.springframework.boot
+  spring-boot-configuration-processor
+  ${spring-boot-version}
+
+
+
+
+  org.apache.logging.log4j
+  log4j-api
+  test
+
+
+  org.apache.logging.log4j
+  log4j-core
+  test
+
+
+  org.apache.logging.log4j
+  log4j-slf4j-impl
+  test
+
+
+
+
+  org.apache.camel
+  camel-test
+  test
+
+  
+
+  
+install
+
+
+
+  
+org.apache.maven.plugins
+maven-compiler-plugin
+${maven-compiler-plugin-version}
+
+  1.8
+  1.8
+
+  
+
+  
+org.apache.maven.plugins
+maven-resources-plugin
+${maven-resources-plugin-version}
+
+  UTF-8
+
+  
+
+  
+  
+org.apache.camel
+camel-package-maven-plugin
+${project.version}
+
+  
+prepare
+
+  prepare-components
+
+generate-resources
+  
+  
+validate
+
+  validate-components
+
+prepare-package
+  
+
+  
+
+  
+  
+org.apache.maven.plugins
+maven-jar-plugin
+${maven-jar-plugin-version}
+
+  
+default-jar
+
+  
+
+  
+
+  
+  
+org.apache.camel
+camel-connector-maven-plugin
+${project.version}
+   

[3/3] camel git commit: CAMEL-11126: allow connector to be scheduled

2017-04-11 Thread davsclaus
CAMEL-11126: allow connector to be scheduled


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

Branch: refs/heads/master
Commit: c912cd8aec6d81ba9080dada179db71a10457b9a
Parents: 46ee93e
Author: Claus Ibsen 
Authored: Tue Apr 11 10:46:13 2017 +0200
Committer: Claus Ibsen 
Committed: Tue Apr 11 10:46:13 2017 +0200

--
 .../camel/maven/connector/ConnectorMojo.java|  20 
 .../SpringBootAutoConfigurationMojo.java|   2 +-
 .../maven/connector/model/ComponentModel.java   |   6 --
 .../component/connector/ConnectorModel.java |  21 
 .../connector/DefaultConnectorComponent.java| 105 +--
 .../SchedulerTimerConnectorEndpoint.java|  79 ++
 .../main/resources/camel-connector-schema.json  |   7 +-
 .../src/main/resources/camel-connector.json |   8 +-
 connectors/examples/petstore-example/Readme.md  |  34 +++---
 .../src/main/java/org/foo/PetStoreRoute.java|   3 +-
 .../src/main/resources/application.properties   |   1 +
 11 files changed, 249 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/c912cd8a/connectors/camel-connector-maven-plugin/src/main/java/org/apache/camel/maven/connector/ConnectorMojo.java
--
diff --git 
a/connectors/camel-connector-maven-plugin/src/main/java/org/apache/camel/maven/connector/ConnectorMojo.java
 
b/connectors/camel-connector-maven-plugin/src/main/java/org/apache/camel/maven/connector/ConnectorMojo.java
index 3894b4f..2f6d95e 100644
--- 
a/connectors/camel-connector-maven-plugin/src/main/java/org/apache/camel/maven/connector/ConnectorMojo.java
+++ 
b/connectors/camel-connector-maven-plugin/src/main/java/org/apache/camel/maven/connector/ConnectorMojo.java
@@ -24,6 +24,7 @@ import java.io.InputStream;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.util.Arrays;
+import java.util.LinkedHashMap;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
@@ -282,6 +283,25 @@ public class ConnectorMojo extends AbstractJarMojo {
 Map values = (Map) dto.get("endpointValues");
 Map overrides = (Map) dto.get("endpointOverrides");
 
+// if the dto is scheduled then we need to add timer options
+if ("timer".equals(dto.get("scheduler"))) {
+// include the period option from the timer as we use that
+Map period = new LinkedHashMap<>();
+period.put("name", "schedulerPeriod");
+period.put("kind", "parameter");
+period.put("displayName", "Period");
+period.put("group", "consumer");
+period.put("type", "integer");
+period.put("javaType", "long");
+period.put("deprecated", "false");
+period.put("secret", "false");
+period.put("defaultValue", "1000");
+period.put("description", "Delay in milli seconds between 
scheduling (executing)");
+
+getLog().debug("Connector is using scheduler: timer");
+rows.add(period);
+}
+
 StringBuilder sb = new StringBuilder();
 sb.append("  \"properties\": {\n");
 

http://git-wip-us.apache.org/repos/asf/camel/blob/c912cd8a/connectors/camel-connector-maven-plugin/src/main/java/org/apache/camel/maven/connector/SpringBootAutoConfigurationMojo.java
--
diff --git 
a/connectors/camel-connector-maven-plugin/src/main/java/org/apache/camel/maven/connector/SpringBootAutoConfigurationMojo.java
 
b/connectors/camel-connector-maven-plugin/src/main/java/org/apache/camel/maven/connector/SpringBootAutoConfigurationMojo.java
index ba4ddbb..997878a 100644
--- 
a/connectors/camel-connector-maven-plugin/src/main/java/org/apache/camel/maven/connector/SpringBootAutoConfigurationMojo.java
+++ 
b/connectors/camel-connector-maven-plugin/src/main/java/org/apache/camel/maven/connector/SpringBootAutoConfigurationMojo.java
@@ -408,7 +408,7 @@ public class SpringBootAutoConfigurationMojo extends 
AbstractMojo {
 private static ComponentModel generateComponentModel(String json) {
 List> rows = 
JSonSchemaHelper.parseJsonSchema("component", json, false);
 
-ComponentModel component = new ComponentModel(true);
+ComponentModel component = new ComponentModel();
 component.setScheme(getSafeValue("scheme", rows));
 component.setSyntax(getSafeValue("syntax", rows));
 component.setAlternativeSyntax(getSafeValue("alternativeSyntax", 
rows));


svn commit: r1010216 - in /websites/production/camel/content: cache/main.pageCache camel-configuration-utilities.html

2017-04-11 Thread buildbot
Author: buildbot
Date: Tue Apr 11 08:19:27 2017
New Revision: 1010216

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/camel-configuration-utilities.html

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

Modified: websites/production/camel/content/camel-configuration-utilities.html
==
--- websites/production/camel/content/camel-configuration-utilities.html 
(original)
+++ websites/production/camel/content/camel-configuration-utilities.html Tue 
Apr 11 08:19:27 2017
@@ -85,7 +85,7 @@

 
 
-JSSE UtilityThe JSSE 
Utility, available as of 2.8, allows you to easily configure 
aspects of the http://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html;
 rel="nofollow">Java Secure Socket Extension (JSSE) API in order to greatly 
simplify the use of custom transport layer security (TLS) settings on Camel 
components.Supported 
ComponentsThe following Camel components directly support the use of 
this configuration utility:HTTP4JettyAHCNettyCometdFTP2<
 /li>IRCMailMINA 2The following Camel 
components indirectly support the use of this configuration 
utility:CXFHTTPConfigurationThe key 
component in configuring TLS through the JSSE API is the SSLContext. The 
http://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#SSLContext;
 rel="nofollow">SSLContext provides socket factories for both http://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#SSLSocketFactory;
 rel="nofollow">client-side and http://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/
 JSSERefGuide.html#SSLSocketFactory" rel="nofollow">server-side sockets as 
well as another component called an http://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#SSLENG;
 rel="nofollow">SSLEngine that is used by non-blocking IO to support 
TLS. The JSSE configuration utility provides an easy to use builder for 
configuring these JSSE components, among others, in a manner that allows you to 
provide all configuration options up front during the initialization of your 
application such that you don't have to customize library code or dig though 
the inner workings of a third-party library in order to inject hooks for the 
configuration of each component in the JSSE API. The central builder in 
the JSSE configuration utility is the SSLContextParameters. This class 
serves as the entry point for most configuration in the JSSE utility.All non-native classes are in the 
org.apache.camel.util.jsse package. All non-W3C schema defined types are 
in the http://camel.apache.org/schema/spring;>http://camel.apache.org/schema/spring
 or http://camel.apache.org/schema/blueprint;>http://camel.apache.org/schema/blueprint
 namespaces for Spring and Blueprint based configuration, 
respectively.SSLContextParametersJava Field Name and ClassXML Attribute/Element and 
TypeDescriptioncipherSuites - 
CipherSuitesParameterssslContextParameters/ciphersuites - 
CipherSuitesParametersThis optional property represents a collection of 
explicitly named cipher suites to enable on both the client and server side as 
well as in the SSLEngine. These values take precedence over filters 
supplied in cipherSuitesFilter. The utility attempts to enable the listed 
cipher suites regardless of whether or not the JSSE provider actually supports 
them or not. This behavior guarantees that listed cipher suites are 
always enabled when listed. For a more lenient option, use 
cipherSuitesFilter.cipherSuitesFilter - FilterParameterssslContextParameters/cipherSuitesFilter - FilterParametersThis optional property 
represents a collection of include and exclude patterns for cipher suites to 
enable on both the client and server side as well as in the SSLEngine. 
The patterns are applied over only the available cipher suites. The 
exclude patterns have precedence over the include patterns. If no 
cipherSuites and no cipherSuitesFilter are present, the default patterns 
applied are:   
Includes.*Excludes.*NULL.*.*anon.*.*DES.*
 Camel 2.15.4.*EXPORT.* Camel 
2.15.4secureSocketProtocols - 
SecureSocketProtocolsParameterssslContextParameters/secureSocketProtocols - 
SecureSocketProtocolsParametersThis optional property represents a collection of 
explicitly named secure socket protocols, such as SSLv3/TLS/etc., to enable on 
both the client and server side as well as in the SSLEngine. These values 
take precedence over filters supplied in secureSocketProtocolsFilter. The 
utility attempts to enable the listed protocols regardless of whether or not 
the JSSE provider actually supports them or not. This behavior guarantees 
that listed protocols are 

camel git commit: Upgrade Zipkin Reporter to version 0.6.13

2017-04-11 Thread acosentino
Repository: camel
Updated Branches:
  refs/heads/master 9fc4ca4e4 -> 5be6f68fe


Upgrade Zipkin Reporter to version 0.6.13


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

Branch: refs/heads/master
Commit: 5be6f68fe4715100d10734937ff8a043ab921be9
Parents: 9fc4ca4
Author: Andrea Cosentino 
Authored: Tue Apr 11 08:09:24 2017 +0200
Committer: Andrea Cosentino 
Committed: Tue Apr 11 08:09:24 2017 +0200

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


http://git-wip-us.apache.org/repos/asf/camel/blob/5be6f68f/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index 9b5ef98..3ffb3a7 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -692,7 +692,7 @@
 2.2.0
 0.5.3
 1.19.4
-0.6.12
+0.6.13
 0.3.0
 3.4.10
 16.0