Repository: camel
Updated Branches:
  refs/heads/master 54de91816 -> 5c2ec8534


First cut of mvn goal to generate/update component readme.md file. Make the 
plugin update the existing adoc file to keep the endpoint options up to date.


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

Branch: refs/heads/master
Commit: 5c2ec8534a3b7aa21867175a80676f71be26046b
Parents: 54de918
Author: Claus Ibsen <[email protected]>
Authored: Wed Jan 27 11:03:19 2016 +0100
Committer: Claus Ibsen <[email protected]>
Committed: Wed Jan 27 11:03:19 2016 +0100

----------------------------------------------------------------------
 components/camel-ahc/src/main/docs/ahc.adoc     | 35 ++++++++++----------
 .../maven/packaging/ReadmeComponentMojo.java    | 12 +++----
 .../src/main/resources/endpoint-options.mvel    |  2 +-
 3 files changed, 24 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/5c2ec853/components/camel-ahc/src/main/docs/ahc.adoc
----------------------------------------------------------------------
diff --git a/components/camel-ahc/src/main/docs/ahc.adoc 
b/components/camel-ahc/src/main/docs/ahc.adoc
index e39ca87..f861458 100644
--- a/components/camel-ahc/src/main/docs/ahc.adoc
+++ b/components/camel-ahc/src/main/docs/ahc.adoc
@@ -43,26 +43,28 @@ You can append query options to the URI in the following 
format,
 AhcEndpoint Options
 ^^^^^^^^^^^^^^^^^^^
 
-//// endpoint options: START
+
+
+// endpoint options: START
 The AHC component supports 12 endpoint options which are listed below:
 
 [width="100%",cols="10%,5%,5%,10%,5%,65%",options="header",]
 |=======================================================================
 | Name | Group | Required | Default | Java Type | Description
-| `httpUri` | `producer` | `true` | `` | `URI` | The URI to use such as 
http://hostname:port/path
-| `binding` | `producer` | `` | `` | `AhcBinding` | To use a custom AhcBinding 
which allows to control how to bind between AHC and Camel.
-| `bridgeEndpoint` | `producer` | `` | `false` | `boolean` | If the option is 
true then the Exchange.HTTP_URI header is ignored and use the endpoint's URI 
for request. You may also set the throwExceptionOnFailure to be false to let 
the AhcProducer send all the fault response back.
-| `bufferSize` | `producer` | `` | `4096` | `int` | The initial in-memory 
buffer size used when transferring data between Camel and AHC Client.
-| `headerFilterStrategy` | `producer` | `` | `` | `HeaderFilterStrategy` | To 
use a custom HeaderFilterStrategy to filter header to and from Camel message.
-| `throwExceptionOnFailure` | `producer` | `` | `true` | `boolean` | Option to 
disable throwing the AhcOperationFailedException in case of failed responses 
from the remote server. This allows you to get all responses regardless of the 
HTTP status code.
-| `transferException` | `producer` | `` | `false` | `boolean` | If enabled and 
an Exchange failed processing on the consumer side and if the caused Exception 
was send back serialized in the response as a 
application/x-java-serialized-object content type (for example using Jetty or 
Servlet Camel components). On the producer side the exception will be 
deserialized and thrown as is instead of the AhcOperationFailedException. The 
caused exception is required to be serialized. This is by default turned off. 
If you enable this then be aware that Java will deserialize the incoming data 
from the request to Java and that can be a potential security risk.
-| `clientConfig` | `advanced` | `` | `` | `AsyncHttpClientConfig` | To 
configure the AsyncHttpClient to use a custom 
com.ning.http.client.AsyncHttpClientConfig instance.
-| `clientConfigOptions` | `advanced` | `` | `` | `Object>` | To configure the 
AsyncHttpClientConfig using the key/values from the Map.
-| `exchangePattern` | `advanced` | `` | `InOnly` | `ExchangePattern` | Sets 
the default exchange pattern when creating an exchange
-| `synchronous` | `advanced` | `` | `false` | `boolean` | Sets whether 
synchronous processing should be strictly used or Camel is allowed to use 
asynchronous processing (if supported).
-| `sslContextParameters` | `security` | `` | `` | `SSLContextParameters` | 
Reference to a org.apache.camel.util.jsse.SSLContextParameters in the Registry. 
This reference overrides any configured SSLContextParameters at the component 
level. See Using the JSSE Configuration Utility. Note that configuring this 
option will override any SSL/TLS configuration options provided through the 
clientConfig option at the endpoint or component level.
-|=======================================================================//// 
endpoint options: END
-
+| `httpUri` | producer | `true` | `` | `URI` | The URI to use such as 
http://hostname:port/path
+| `binding` | producer | `` | `` | `AhcBinding` | To use a custom AhcBinding 
which allows to control how to bind between AHC and Camel.
+| `bridgeEndpoint` | producer | `` | `false` | `boolean` | If the option is 
true then the Exchange.HTTP_URI header is ignored and use the endpoint's URI 
for request. You may also set the throwExceptionOnFailure to be false to let 
the AhcProducer send all the fault response back.
+| `bufferSize` | producer | `` | `4096` | `int` | The initial in-memory buffer 
size used when transferring data between Camel and AHC Client.
+| `headerFilterStrategy` | producer | `` | `` | `HeaderFilterStrategy` | To 
use a custom HeaderFilterStrategy to filter header to and from Camel message.
+| `throwExceptionOnFailure` | producer | `` | `true` | `boolean` | Option to 
disable throwing the AhcOperationFailedException in case of failed responses 
from the remote server. This allows you to get all responses regardless of the 
HTTP status code.
+| `transferException` | producer | `` | `false` | `boolean` | If enabled and 
an Exchange failed processing on the consumer side and if the caused Exception 
was send back serialized in the response as a 
application/x-java-serialized-object content type (for example using Jetty or 
Servlet Camel components). On the producer side the exception will be 
deserialized and thrown as is instead of the AhcOperationFailedException. The 
caused exception is required to be serialized. This is by default turned off. 
If you enable this then be aware that Java will deserialize the incoming data 
from the request to Java and that can be a potential security risk.
+| `clientConfig` | advanced | `` | `` | `AsyncHttpClientConfig` | To configure 
the AsyncHttpClient to use a custom com.ning.http.client.AsyncHttpClientConfig 
instance.
+| `clientConfigOptions` | advanced | `` | `` | `Object>` | To configure the 
AsyncHttpClientConfig using the key/values from the Map.
+| `exchangePattern` | advanced | `` | `InOnly` | `ExchangePattern` | Sets the 
default exchange pattern when creating an exchange
+| `synchronous` | advanced | `` | `false` | `boolean` | Sets whether 
synchronous processing should be strictly used or Camel is allowed to use 
asynchronous processing (if supported).
+| `sslContextParameters` | security | `` | `` | `SSLContextParameters` | 
Reference to a org.apache.camel.util.jsse.SSLContextParameters in the Registry. 
This reference overrides any configured SSLContextParameters at the component 
level. See Using the JSSE Configuration Utility. Note that configuring this 
option will override any SSL/TLS configuration options provided through the 
clientConfig option at the endpoint or component level.
+|=======================================================================
+// endpoint options: END
 
 
 
@@ -75,12 +77,9 @@ AhcComponent Options
 |=======================================================================
 |Name |Default Value |Description
 |`client` |`null` |To use a custom `com.ning.http.client.AsyncHttpClient`.
-
 |`clientConfig` |`null` |To configure the `AsyncHttpClient` to use a custom
 `com.ning.http.client.AsyncHttpClientConfig`.
-
 |`binding` |`null` |To use a custom 
`org.apache.camel.component.ahc.AhcBinding`.
-
 |`sslContextParameters` |`null` |*Camel 2.9:* To configure custom SSL/TLS 
configuration options at the
 component level.  See  link:ahc.html[Using the JSSE Configuration
 Utility] for more details.  Note that configuring this option will

http://git-wip-us.apache.org/repos/asf/camel/blob/5c2ec853/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/ReadmeComponentMojo.java
----------------------------------------------------------------------
diff --git 
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/ReadmeComponentMojo.java
 
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/ReadmeComponentMojo.java
index 78acfb0..f4eca6a 100644
--- 
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/ReadmeComponentMojo.java
+++ 
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/ReadmeComponentMojo.java
@@ -123,7 +123,7 @@ public class ReadmeComponentMojo extends AbstractMojo {
         try {
             String text = loadText(new FileInputStream(file));
 
-            String existing = StringHelper.between(text, "//// endpoint 
options: START", "//// endpoint options: END");
+            String existing = StringHelper.between(text, "// endpoint options: 
START", "// endpoint options: END");
             if (existing != null) {
                 // remove leading line breaks etc
                 existing = existing.trim();
@@ -132,16 +132,16 @@ public class ReadmeComponentMojo extends AbstractMojo {
                     getLog().info("No changes to file: " + file);
                 } else {
                     getLog().info("Updating file: " + file);
-                    String before = StringHelper.before(text, "//// endpoint 
options: START");
-                    String after = StringHelper.after(text, "//// endpoint 
options: END");
-                    text = before + "//// endpoint options: START\n" + changed 
+ "//// endpoint options: END\n" + after;
+                    String before = StringHelper.before(text, "// endpoint 
options: START");
+                    String after = StringHelper.after(text, "// endpoint 
options: END");
+                    text = before + "\n// endpoint options: START\n" + changed 
+ "\n// endpoint options: END\n" + after;
                     writeText(file, text);
                 }
             } else {
                 getLog().warn("Cannot find markers in file " + file);
                 getLog().warn("Add the following markers");
-                getLog().warn("\t//// endpoint options: START");
-                getLog().warn("\t//// endpoint options: END");
+                getLog().warn("\t// endpoint options: START");
+                getLog().warn("\t// endpoint options: END");
             }
         } catch (Exception e) {
             throw new MojoExecutionException("Error reading file " + file + " 
Reason: " + e, e);

http://git-wip-us.apache.org/repos/asf/camel/blob/5c2ec853/tooling/maven/camel-package-maven-plugin/src/main/resources/endpoint-options.mvel
----------------------------------------------------------------------
diff --git 
a/tooling/maven/camel-package-maven-plugin/src/main/resources/endpoint-options.mvel
 
b/tooling/maven/camel-package-maven-plugin/src/main/resources/endpoint-options.mvel
index fb28773..d462ec9 100644
--- 
a/tooling/maven/camel-package-maven-plugin/src/main/resources/endpoint-options.mvel
+++ 
b/tooling/maven/camel-package-maven-plugin/src/main/resources/endpoint-options.mvel
@@ -3,5 +3,5 @@ The @{title} component supports @{endpointOptions.size()} 
endpoint options which
 [width="100%",cols="10%,5%,5%,10%,5%,65%",options="header",]
 |=======================================================================
 | Name | Group | Required | Default | Java Type | Description
-@foreach{row : endpointOptions}| `@{row.name}` | `@{row.group}` | 
`@{row.required}` | `@{row.defaultValue}` | `@{row.shortJavaType}` | 
@{row.description}
+@foreach{row : endpointOptions}| `@{row.name}` | @{row.group} | 
`@{row.required}` | `@{row.defaultValue}` | `@{row.shortJavaType}` | 
@{row.description}
 @end{}|=======================================================================

Reply via email to