You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/02/20 04:48:25 UTC

[camel] branch master updated (283bec9 -> d28fb5a)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 283bec9  No need to override isSingleton as the default is also true
     new 00554cb  Fix test that fails on CI
     new e63a827  Regen
     new d28fb5a  Add missing docs in model files

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/camel/component/etcd/cloud/EtcdServiceCallRouteTest.java | 2 +-
 .../generated/resources/org/apache/camel/spring/camelContext.json   | 2 +-
 .../generated/resources/org/apache/camel/spring/restContext.json    | 2 +-
 .../generated/resources/org/apache/camel/spring/routeContext.json   | 2 +-
 .../java/org/apache/camel/spring/CamelRestContextFactoryBean.java   | 2 +-
 .../java/org/apache/camel/spring/CamelRouteContextFactoryBean.java  | 2 +-
 .../src/test/java/org/apache/camel/util/StringHelperTest.java       | 1 +
 docs/components/modules/ROOT/pages/mail-component.adoc              | 3 ++-
 .../java/org/apache/camel/maven/packaging/PackageModelMojo.java     | 2 --
 .../java/org/apache/camel/maven/packaging/SchemaGeneratorMojo.java  | 6 ++++++
 10 files changed, 15 insertions(+), 9 deletions(-)


[camel] 03/03: Add missing docs in model files

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit d28fb5a29385ec8b2d65243c6d08bab1d75bed7c
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Feb 20 05:46:58 2020 +0100

    Add missing docs in model files
---
 .../generated/resources/org/apache/camel/spring/camelContext.json   | 2 +-
 .../generated/resources/org/apache/camel/spring/restContext.json    | 2 +-
 .../generated/resources/org/apache/camel/spring/routeContext.json   | 2 +-
 .../java/org/apache/camel/spring/CamelRestContextFactoryBean.java   | 2 +-
 .../java/org/apache/camel/spring/CamelRouteContextFactoryBean.java  | 2 +-
 .../src/test/java/org/apache/camel/util/StringHelperTest.java       | 1 +
 .../java/org/apache/camel/maven/packaging/PackageModelMojo.java     | 2 --
 .../java/org/apache/camel/maven/packaging/SchemaGeneratorMojo.java  | 6 ++++++
 8 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/components/camel-spring/src/generated/resources/org/apache/camel/spring/camelContext.json b/components/camel-spring/src/generated/resources/org/apache/camel/spring/camelContext.json
index b962b6a..d683580 100644
--- a/components/camel-spring/src/generated/resources/org/apache/camel/spring/camelContext.json
+++ b/components/camel-spring/src/generated/resources/org/apache/camel/spring/camelContext.json
@@ -25,7 +25,7 @@
     "autoStartup": { "kind": "attribute", "displayName": "Auto Startup", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "true", "description": "Sets whether the object should automatically start when Camel starts. Important: Currently only routes can be disabled, as CamelContext s are always started. Note: When setting auto startup false on CamelContext then that takes precedence and no routes is started. You wou [...]
     "shutdownEager": { "kind": "attribute", "displayName": "Shutdown Eager", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "true", "description": "Whether to shutdown CamelContext eager when Spring is shutting down. This ensure a cleaner shutdown of Camel, as dependent bean's are not shutdown at this moment. The bean's will then be shutdown after camelContext." },
     "useMDCLogging": { "kind": "attribute", "displayName": "Use MDC Logging", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Set whether MDC is enabled." },
-    "mdcLoggingKeysPattern": { "kind": "attribute", "displayName": "MDC Logging Keys Pattern", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false },
+    "mdcLoggingKeysPattern": { "kind": "attribute", "displayName": "MDC Logging Keys Pattern", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Sets the pattern used for determine which custom MDC keys to propagate during message routing when the routing engine continues routing asynchronously for the given message. Setting this pattern to will propagate all custom keys. Or setting the pattern to foo,bar will propa [...]
     "useDataType": { "kind": "attribute", "displayName": "Use Data Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Whether to enable using data type on Camel messages. Data type are automatic turned on if: one ore more routes has been explicit configured with input and output types when using rest-dsl with binding turned on Otherwise data type is default off." },
     "useBreadcrumb": { "kind": "attribute", "displayName": "Use Breadcrumb", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Set whether breadcrumb is enabled." },
     "allowUseOriginalMessage": { "kind": "attribute", "displayName": "Allow Use Original Message", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Sets whether to allow access to the original message from Camel's error handler, or from org.apache.camel.spi.UnitOfWork#getOriginalInMessage() . Turning this off can optimize performance, as defensive copy of the original message is not needed." },
diff --git a/components/camel-spring/src/generated/resources/org/apache/camel/spring/restContext.json b/components/camel-spring/src/generated/resources/org/apache/camel/spring/restContext.json
index f9f204a..00d633d 100644
--- a/components/camel-spring/src/generated/resources/org/apache/camel/spring/restContext.json
+++ b/components/camel-spring/src/generated/resources/org/apache/camel/spring/restContext.json
@@ -11,7 +11,7 @@
     "output": false
   },
   "properties": {
-    "rest": { "kind": "element", "displayName": "Rest", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.rest.RestDefinition>", "deprecated": false, "secret": false },
+    "rest": { "kind": "element", "displayName": "Rest", "required": false, "type": "array", "javaType": "java.util.List<org.apache.camel.model.rest.RestDefinition>", "deprecated": false, "secret": false, "description": "Rest services" },
     "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "The id of this node" }
   }
 }
diff --git a/components/camel-spring/src/generated/resources/org/apache/camel/spring/routeContext.json b/components/camel-spring/src/generated/resources/org/apache/camel/spring/routeContext.json
index e84f4d7c..e36a3c9 100644
--- a/components/camel-spring/src/generated/resources/org/apache/camel/spring/routeContext.json
+++ b/components/camel-spring/src/generated/resources/org/apache/camel/spring/routeContext.json
@@ -11,7 +11,7 @@
     "output": false
   },
   "properties": {
-    "route": { "kind": "element", "displayName": "Route", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.RouteDefinition>", "deprecated": false, "secret": false },
+    "route": { "kind": "element", "displayName": "Route", "required": false, "type": "array", "javaType": "java.util.List<org.apache.camel.model.RouteDefinition>", "deprecated": false, "secret": false, "description": "Routes" },
     "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "The id of this node" }
   }
 }
diff --git a/components/camel-spring/src/main/java/org/apache/camel/spring/CamelRestContextFactoryBean.java b/components/camel-spring/src/main/java/org/apache/camel/spring/CamelRestContextFactoryBean.java
index 6b329e5..f4bc966 100644
--- a/components/camel-spring/src/main/java/org/apache/camel/spring/CamelRestContextFactoryBean.java
+++ b/components/camel-spring/src/main/java/org/apache/camel/spring/CamelRestContextFactoryBean.java
@@ -37,7 +37,7 @@ import org.springframework.beans.factory.FactoryBean;
 @XmlAccessorType(XmlAccessType.FIELD)
 public class CamelRestContextFactoryBean extends IdentifiedType implements FactoryBean<List<RestDefinition>> {
 
-    @XmlElement(name = "rest", required = true)
+    @XmlElement(name = "rest", required = true) @Metadata(description = "Rest services")
     private List<RestDefinition> rests = new ArrayList<>();
 
     @Override
diff --git a/components/camel-spring/src/main/java/org/apache/camel/spring/CamelRouteContextFactoryBean.java b/components/camel-spring/src/main/java/org/apache/camel/spring/CamelRouteContextFactoryBean.java
index a8b42d3..5c07d27 100644
--- a/components/camel-spring/src/main/java/org/apache/camel/spring/CamelRouteContextFactoryBean.java
+++ b/components/camel-spring/src/main/java/org/apache/camel/spring/CamelRouteContextFactoryBean.java
@@ -37,7 +37,7 @@ import org.springframework.beans.factory.FactoryBean;
 @XmlAccessorType(XmlAccessType.FIELD)
 public class CamelRouteContextFactoryBean extends IdentifiedType implements FactoryBean<List<RouteDefinition>> {
 
-    @XmlElement(name = "route", required = true)
+    @XmlElement(name = "route", required = true)  @Metadata(description = "Routes")
     private List<RouteDefinition> routes = new ArrayList<>();
 
     @Override
diff --git a/core/camel-util/src/test/java/org/apache/camel/util/StringHelperTest.java b/core/camel-util/src/test/java/org/apache/camel/util/StringHelperTest.java
index 0b78fe7..688ac8f 100644
--- a/core/camel-util/src/test/java/org/apache/camel/util/StringHelperTest.java
+++ b/core/camel-util/src/test/java/org/apache/camel/util/StringHelperTest.java
@@ -43,5 +43,6 @@ public class StringHelperTest extends TestCase {
         assertEquals("my-big-url-again", camelCaseToDash("MyBigURLAgain"));
 
         assertEquals("use-mdc-logging", camelCaseToDash("UseMDCLogging"));
+        assertEquals("mdc-logging-keys-pattern", camelCaseToDash("MDCLoggingKeysPattern"));
     }
 }
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageModelMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageModelMojo.java
index 3ffc51c..0f81a03 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageModelMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageModelMojo.java
@@ -67,8 +67,6 @@ public class PackageModelMojo extends AbstractGeneratorMojo {
         File camelMetaDir = new File(outDir, "META-INF/services/org/apache/camel/");
         camelMetaDir.mkdirs();
 
-        Set<File> jsonFiles = new TreeSet<>();
-
         // find all json files in camel-core
         List<String> models = PackageHelper.findJsonFiles(buildDir.toPath().resolve("classes/org/apache/camel/model")).map(p -> p.getFileName().toString())
             // strip out .json from the name
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SchemaGeneratorMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SchemaGeneratorMojo.java
index 59c94d2..14ca0e4 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SchemaGeneratorMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SchemaGeneratorMojo.java
@@ -1041,6 +1041,12 @@ public class SchemaGeneratorMojo extends AbstractGeneratorMojo {
         }
 
         String setterName = "set" + Character.toUpperCase(fieldName.charAt(0)) + fieldName.substring(1);
+
+        // special for mdcLoggingKeysPattern
+        if ("setMdcLoggingKeysPattern".equals(setterName)) {
+            setterName = "setMDCLoggingKeysPattern";
+        }
+
         for (MethodSource<JavaClassSource> setter : source.getMethods()) {
             if (setter.getParameters().size() == 1
                     && setter.getName().equals(setterName)) {


[camel] 01/03: Fix test that fails on CI

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 00554cb57c1fffef8074fcf45e96626ef9c77e3a
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Feb 20 05:18:47 2020 +0100

    Fix test that fails on CI
---
 .../org/apache/camel/component/etcd/cloud/EtcdServiceCallRouteTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/camel-etcd/src/test/java/org/apache/camel/component/etcd/cloud/EtcdServiceCallRouteTest.java b/components/camel-etcd/src/test/java/org/apache/camel/component/etcd/cloud/EtcdServiceCallRouteTest.java
index bb6ca66..d9c4961 100644
--- a/components/camel-etcd/src/test/java/org/apache/camel/component/etcd/cloud/EtcdServiceCallRouteTest.java
+++ b/components/camel-etcd/src/test/java/org/apache/camel/component/etcd/cloud/EtcdServiceCallRouteTest.java
@@ -34,7 +34,7 @@ public class EtcdServiceCallRouteTest extends EtcdTestSupport {
     private static final ObjectMapper MAPPER = EtcdHelper.createObjectMapper();
     private static final String SERVICE_NAME = "http-service";
     private static final int SERVICE_COUNT = 5;
-    private static final int SERVICE_PORT_BASE = 8080;
+    private static final int SERVICE_PORT_BASE = 8280;
 
     private EtcdClient client;
     private List<Map<String, Object>> servers;


[camel] 02/03: Regen

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit e63a827dd03209c674dfe9ffdbfb3c8bc999255b
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Feb 20 05:36:56 2020 +0100

    Regen
---
 docs/components/modules/ROOT/pages/mail-component.adoc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/docs/components/modules/ROOT/pages/mail-component.adoc b/docs/components/modules/ROOT/pages/mail-component.adoc
index 363bda8..e6f3d26 100644
--- a/docs/components/modules/ROOT/pages/mail-component.adoc
+++ b/docs/components/modules/ROOT/pages/mail-component.adoc
@@ -136,7 +136,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (65 parameters):
+=== Query Parameters (66 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -150,6 +150,7 @@ with the following path and query parameters:
 | *handleFailedMessage* (consumer) | If the mail consumer cannot retrieve a given mail message, then this option allows to handle the caused exception by the consumer's error handler. By enable the bridge error handler on the consumer, then the Camel routing error handler can handle the exception instead. The default behavior would be the consumer throws an exception and no mails from the batch would be able to be routed by Camel. | false | boolean
 | *maxMessagesPerPoll* (consumer) | Specifies the maximum number of messages to gather per poll. By default, no maximum is set. Can be used to set a limit of e.g. 1000 to avoid downloading thousands of files when the server starts up. Set a value of 0 or negative to disable this option. |  | int
 | *mimeDecodeHeaders* (consumer) | This option enables transparent MIME decoding and unfolding for mail headers. | false | boolean
+| *moveTo* (consumer) | After processing a mail message, it can be moved to a mail folder with the given name. You can override this configuration value, with a header with the key moveTo, allowing you to move messages to folder names configured at runtime. |  | String
 | *peek* (consumer) | Will mark the javax.mail.Message as peeked before processing the mail message. This applies to IMAPMessage messages types only. By using peek the mail will not be eager marked as SEEN on the mail server, which allows us to rollback the mail message if there is an error processing in Camel. | true | boolean
 | *sendEmptyMessageWhenIdle* (consumer) | If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead. | false | boolean
 | *skipFailedMessage* (consumer) | If the mail consumer cannot retrieve a given mail message, then this option allows to skip the message and move on to retrieve the next mail message. The default behavior would be the consumer throws an exception and no mails from the batch would be able to be routed by Camel. | false | boolean