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 2018/08/01 14:42:07 UTC

[camel] branch master updated (ed7a3e6 -> d614666)

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 ed7a3e6  CAMEL-12702: Improved spring boot docs
     new ecbc815  CAMEL-12702: Improved spring boot docs
     new d614666  CAMEL-12702: Enable validation during built that all the spring boot auto configuration option has documentation for camel-spring-boot module

The 2 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:
 components/camel-spring-boot/pom.xml                    |  2 +-
 .../camel-spring-boot/src/main/docs/spring-boot.adoc    |  4 ++--
 .../camel/spring/boot/CamelConfigurationProperties.java | 10 +++++-----
 .../UpdateSpringBootAutoConfigurationReadmeMojo.java    | 17 +++++++++++++++--
 4 files changed, 23 insertions(+), 10 deletions(-)


[camel] 01/02: CAMEL-12702: Improved spring boot docs

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 ecbc8156799818406bb81fe38835e6951db0e531
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Aug 1 16:08:41 2018 +0200

    CAMEL-12702: Improved spring boot docs
---
 components/camel-spring-boot/src/main/docs/spring-boot.adoc    |  4 ++--
 .../apache/camel/spring/boot/CamelConfigurationProperties.java | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/components/camel-spring-boot/src/main/docs/spring-boot.adoc b/components/camel-spring-boot/src/main/docs/spring-boot.adoc
index 626f243..43c188d 100644
--- a/components/camel-spring-boot/src/main/docs/spring-boot.adoc
+++ b/components/camel-spring-boot/src/main/docs/spring-boot.adoc
@@ -143,8 +143,8 @@ The component supports 139 options, which are listed below.
 | *camel.springboot.file-configurations* | Directory to load additional configuration files that contains configuration values that takes precedence over any other configuration. This can be used to refer to files that may have secret configuration that has been mounted on the file system for containers. You must use either file: or classpath: as prefix to load from file system or classpath. Then you can specify a pattern to load from sub directories and a name pattern such as file:/var/ [...]
 | *camel.springboot.handle-fault* | Sets whether fault handling is enabled or not. Default is false. | false | Boolean
 | *camel.springboot.include-non-singletons* | Whether to include non-singleton beans (prototypes) when scanning for RouteBuilder instances. By default only singleton beans is included in the context scan. | false | Boolean
-| *camel.springboot.java-routes-exclude-pattern* | Used for exclusive filtering component scanning of RouteBuilder classes with @Component annotation. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma. For example to exclude all classes starting with Bar use: &#42;&#42;/Bar* To exclude all routes form a specific package use: com/mycompany/bar/* To exclude all routes form a  [...]
-| *camel.springboot.java-routes-include-pattern* | Used for inclusive filtering component scanning of RouteBuilder classes with @Component annotation. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma. For example to include all classes starting with Foo use: &#42;&#42;/Foo* To include all routes form a specific package use: com/mycompany/foo/* To include all routes form a  [...]
+| *camel.springboot.java-routes-exclude-pattern* | Used for exclusive filtering component scanning of RouteBuilder classes with @Component annotation. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma. For example to exclude all classes starting with Bar use: &#42;&#42;/Bar&#42; To exclude all routes form a specific package use: com/mycompany/bar/&#42; To exclude all routes [...]
+| *camel.springboot.java-routes-include-pattern* | Used for inclusive filtering component scanning of RouteBuilder classes with @Component annotation. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma. For example to include all classes starting with Foo use: &#42;&#42;/Foo* To include all routes form a specific package use: com/mycompany/foo/&#42; To include all routes for [...]
 | *camel.springboot.jmx-create-connector* | Whether JMX connector is created, allowing clients to connect remotely The default value is false. | false | Boolean
 | *camel.springboot.jmx-enabled* | Enable JMX in your Camel application. | true | Boolean
 | *camel.springboot.jmx-management-name-pattern* | The naming pattern for creating the CamelContext JMX management name. The default pattern is #name# | #name# | String
diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java
index 12e8c30..937d13e 100644
--- a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java
+++ b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java
@@ -100,9 +100,9 @@ public class CamelConfigurationProperties {
      *
      * Multiple patterns can be specified separated by comma.
      * For example to include all classes starting with Foo use: &#42;&#42;/Foo*
-     * To include all routes form a specific package use: com/mycompany/foo/*
+     * To include all routes form a specific package use: com/mycompany/foo/&#42;
      * To include all routes form a specific package and its sub-packages use double wildcards: com/mycompany/foo/&#42;&#42;
-     * And to include all routes from two specific packages use: com/mycompany/foo/*,com/mycompany/stuff/*
+     * And to include all routes from two specific packages use: com/mycompany/foo/&#42;,com/mycompany/stuff/&#42;
      */
     private String javaRoutesIncludePattern;
 
@@ -112,10 +112,10 @@ public class CamelConfigurationProperties {
      * The pattern is using Ant-path style pattern.
      * Multiple patterns can be specified separated by comma.
      *
-     * For example to exclude all classes starting with Bar use: &#42;&#42;/Bar*
-     * To exclude all routes form a specific package use: com/mycompany/bar/*
+     * For example to exclude all classes starting with Bar use: &#42;&#42;/Bar&#42;
+     * To exclude all routes form a specific package use: com/mycompany/bar/&#42;
      * To exclude all routes form a specific package and its sub-packages use double wildcards: com/mycompany/bar/&#42;&#42;
-     * And to exclude all routes from two specific packages use: com/mycompany/bar/*,com/mycompany/stuff/*
+     * And to exclude all routes from two specific packages use: com/mycompany/bar/&#42;,com/mycompany/stuff/&#42;
      */
     private String javaRoutesExcludePattern;
 


[camel] 02/02: CAMEL-12702: Enable validation during built that all the spring boot auto configuration option has documentation for camel-spring-boot module

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 d614666de206146a2c1453434b398cf282d3e6ae
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Aug 1 16:18:45 2018 +0200

    CAMEL-12702: Enable validation during built that all the spring boot auto configuration option has documentation for camel-spring-boot module
---
 components/camel-spring-boot/pom.xml                    |  2 +-
 .../UpdateSpringBootAutoConfigurationReadmeMojo.java    | 17 +++++++++++++++--
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/components/camel-spring-boot/pom.xml b/components/camel-spring-boot/pom.xml
index 182bf27..b1a0676 100644
--- a/components/camel-spring-boot/pom.xml
+++ b/components/camel-spring-boot/pom.xml
@@ -140,7 +140,7 @@
         <version>${project.version}</version>
         <configuration>
           <!-- set to true to make build fail fast if missing documentation in docs files -->
-          <failFast>false</failFast>
+          <failFast>true</failFast>
           <!-- set to true to make build fail if an option has no description -->
           <failOnMissingDescription>true</failOnMissingDescription>
         </configuration>
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateSpringBootAutoConfigurationReadmeMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateSpringBootAutoConfigurationReadmeMojo.java
index 4473509..d3089a6 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateSpringBootAutoConfigurationReadmeMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateSpringBootAutoConfigurationReadmeMojo.java
@@ -161,7 +161,7 @@ public class UpdateSpringBootAutoConfigurationReadmeMojo extends AbstractMojo {
                     }
 
                     if (files.size() == 1) {
-                        List models = parseSpringBootAutoConfigureModels(jsonFile, null);
+                        List<SpringBootAutoConfigureOptionModel> models = parseSpringBootAutoConfigureModels(jsonFile, null);
 
                         // special for other kind of JARs that is not a regular Camel component,dataformat,language
                         boolean onlyOther = files.size() == 1 && !hasComponentDataFormatOrLanguage;
@@ -170,6 +170,19 @@ public class UpdateSpringBootAutoConfigurationReadmeMojo extends AbstractMojo {
                             return;
                         }
                         File docFile = files.get(0);
+
+                        // check for missing description on options
+                        boolean noDescription = false;
+                        for (SpringBootAutoConfigureOptionModel o : models) {
+                            if (StringHelper.isEmpty(o.getDescription())) {
+                                noDescription = true;
+                                getLog().warn("Option " + o.getName() + " has no description");
+                            }
+                        }
+                        if (noDescription && isFailOnNoDescription()) {
+                            throw new MojoExecutionException("Failed build due failOnMissingDescription=true");
+                        }
+
                         String options = templateAutoConfigurationOptions(models);
                         boolean updated = updateAutoConfigureOptions(docFile, options);
                         if (updated) {
@@ -281,7 +294,7 @@ public class UpdateSpringBootAutoConfigurationReadmeMojo extends AbstractMojo {
 
     private static boolean isValidStarter(String name) {
         // skip these
-        if ("camel-core-starter".equals(name) || "camel-spring-boot-starter".equals(name)) {
+        if ("camel-core-starter".equals(name)) {
             return false;
         }
         return true;