You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2019/09/04 21:01:59 UTC

[camel] 05/16: CAMEL-13588: escape $ in options

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

zregvart pushed a commit to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 48db7372e3c4292a325cf5e2385984ef89c9be5c
Author: Zoran Regvart <zr...@apache.org>
AuthorDate: Wed Jul 3 13:20:40 2019 +0200

    CAMEL-13588: escape $ in options
    
    Unescaped dollar signs in assciidoc files are interpreted as attribute
    references, this adds automatic escaping of dollar signs via MVEL
    templates.
    
    (cherry picked from commit 138189d512144edb46b401309694f1435ee810b1)
    
    # Conflicts:
    #	components/camel-aws-ddb/src/main/docs/aws-ddb-component.adoc
    #	components/camel-aws-ddb/src/main/docs/aws-ddbstream-component.adoc
    #	components/camel-aws-ec2/src/main/docs/aws-ec2-component.adoc
    #	components/camel-aws-ecs/src/main/docs/aws-ecs-component.adoc
    #	components/camel-aws-eks/src/main/docs/aws-eks-component.adoc
    #	components/camel-aws-iam/src/main/docs/aws-iam-component.adoc
    #	components/camel-aws-kinesis/src/main/docs/aws-kinesis-component.adoc
    #	components/camel-aws-kinesis/src/main/docs/aws-kinesis-firehose-component.adoc
    #	components/camel-aws-kms/src/main/docs/aws-kms-component.adoc
    #	components/camel-aws-lambda/src/main/docs/aws-lambda-component.adoc
    #	components/camel-aws-mq/src/main/docs/aws-mq-component.adoc
    #	components/camel-aws-msk/src/main/docs/aws-msk-component.adoc
    #	components/camel-aws-s3/src/main/docs/aws-s3-component.adoc
    #	components/camel-aws-sdb/src/main/docs/aws-sdb-component.adoc
    #	components/camel-aws-ses/src/main/docs/aws-ses-component.adoc
    #	components/camel-aws-sns/src/main/docs/aws-sns-component.adoc
    #	components/camel-aws-sqs/src/main/docs/aws-sqs-component.adoc
    #	components/camel-aws-swf/src/main/docs/aws-swf-component.adoc
    #	components/camel-file/src/main/docs/file-component.adoc
    #	components/camel-ftp/src/main/docs/ftp-component.adoc
    #	components/camel-ftp/src/main/docs/ftps-component.adoc
    #	components/camel-ftp/src/main/docs/sftp-component.adoc
    #	components/camel-grok/src/main/docs/grok-dataformat.adoc
    #	components/camel-grpc/src/main/docs/grpc-component.adoc
    #	components/camel-hipchat/src/main/docs/hipchat-component.adoc
    #	components/camel-jsch/src/main/docs/scp-component.adoc
    #	docs/components/modules/ROOT/pages/aws-ddb-component.adoc
    #	docs/components/modules/ROOT/pages/aws-ddbstream-component.adoc
    #	docs/components/modules/ROOT/pages/aws-ec2-component.adoc
    #	docs/components/modules/ROOT/pages/aws-ecs-component.adoc
    #	docs/components/modules/ROOT/pages/aws-eks-component.adoc
    #	docs/components/modules/ROOT/pages/aws-iam-component.adoc
    #	docs/components/modules/ROOT/pages/aws-kinesis-component.adoc
    #	docs/components/modules/ROOT/pages/aws-kinesis-firehose-component.adoc
    #	docs/components/modules/ROOT/pages/aws-kms-component.adoc
    #	docs/components/modules/ROOT/pages/aws-lambda-component.adoc
    #	docs/components/modules/ROOT/pages/aws-mq-component.adoc
    #	docs/components/modules/ROOT/pages/aws-msk-component.adoc
    #	docs/components/modules/ROOT/pages/aws-s3-component.adoc
    #	docs/components/modules/ROOT/pages/aws-sdb-component.adoc
    #	docs/components/modules/ROOT/pages/aws-ses-component.adoc
    #	docs/components/modules/ROOT/pages/aws-sns-component.adoc
    #	docs/components/modules/ROOT/pages/aws-sqs-component.adoc
    #	docs/components/modules/ROOT/pages/aws-swf-component.adoc
    #	docs/components/modules/ROOT/pages/file-component.adoc
    #	docs/components/modules/ROOT/pages/ftp-component.adoc
    #	docs/components/modules/ROOT/pages/ftps-component.adoc
    #	docs/components/modules/ROOT/pages/google-bigquery-sql-component.adoc
    #	docs/components/modules/ROOT/pages/grok-dataformat.adoc
    #	docs/components/modules/ROOT/pages/grpc-component.adoc
    #	docs/components/modules/ROOT/pages/hipchat-component.adoc
    #	docs/components/modules/ROOT/pages/jsonpath-language.adoc
    #	docs/components/modules/ROOT/pages/protobuf-dataformat.adoc
    #	docs/components/modules/ROOT/pages/scp-component.adoc
    #	docs/components/modules/ROOT/pages/sftp-component.adoc
    #	tooling/maven/camel-package-maven-plugin/src/main/resources/spring-boot-auto-configure-options.mvel
---
 .../src/main/docs/google-bigquery-sql-component.adoc                  | 2 +-
 components/camel-jsonpath/src/main/docs/jsonpath-language.adoc        | 2 +-
 components/camel-protobuf/src/main/docs/protobuf-dataformat.adoc      | 2 +-
 .../src/main/resources/component-options.mvel                         | 4 ++--
 .../src/main/resources/dataformat-options.mvel                        | 2 +-
 .../camel-package-maven-plugin/src/main/resources/eip-options.mvel    | 2 +-
 .../src/main/resources/endpoint-options.mvel                          | 4 ++--
 .../src/main/resources/language-options.mvel                          | 2 +-
 .../src/main/resources/readme-components.mvel                         | 2 +-
 .../src/main/resources/readme-dataformats.mvel                        | 2 +-
 .../camel-package-maven-plugin/src/main/resources/readme-eips.mvel    | 2 +-
 .../src/main/resources/readme-examples.mvel                           | 2 +-
 .../src/main/resources/readme-languages.mvel                          | 2 +-
 .../camel-package-maven-plugin/src/main/resources/readme-others.mvel  | 2 +-
 .../src/main/docs/camel-restdsl-swagger-plugin.adoc                   | 4 ++--
 15 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/components/camel-google-bigquery/src/main/docs/google-bigquery-sql-component.adoc b/components/camel-google-bigquery/src/main/docs/google-bigquery-sql-component.adoc
index 44379ca..106272d 100644
--- a/components/camel-google-bigquery/src/main/docs/google-bigquery-sql-component.adoc
+++ b/components/camel-google-bigquery/src/main/docs/google-bigquery-sql-component.adoc
@@ -62,7 +62,7 @@ Examples:
 --------------------------------------------------------
 where
 
- * parameters in form ${name} are extracted from message headers and formed the translated query
+ * parameters in form \${name} are extracted from message headers and formed the translated query
  * parameters in form @name are extracted from body or message headers and sent to Google Bigquery
 
 You can externalize your SQL queries to files in the classpath or file system as shown:
diff --git a/components/camel-jsonpath/src/main/docs/jsonpath-language.adoc b/components/camel-jsonpath/src/main/docs/jsonpath-language.adoc
index 16c4277..252d875 100644
--- a/components/camel-jsonpath/src/main/docs/jsonpath-language.adoc
+++ b/components/camel-jsonpath/src/main/docs/jsonpath-language.adoc
@@ -200,7 +200,7 @@ This option is also available on the `@JsonPath` annotation.
 
 *Available as of Camel 2.18*
 
-Its now possible to inlined Simple language expressions in the JSonPath expression using the simple syntax ${xxx}.
+Its now possible to inlined Simple language expressions in the JSonPath expression using the simple syntax \${xxx}.
 An example is shown below:
 
 [source,java]
diff --git a/components/camel-protobuf/src/main/docs/protobuf-dataformat.adoc b/components/camel-protobuf/src/main/docs/protobuf-dataformat.adoc
index 8e8dd45..ffecade 100644
--- a/components/camel-protobuf/src/main/docs/protobuf-dataformat.adoc
+++ b/components/camel-protobuf/src/main/docs/protobuf-dataformat.adoc
@@ -122,7 +122,7 @@ classes for the format we defined in our .proto file.
 If your operating system is supporting by https://www.xolstice.org/protobuf-maven-plugin[Protobuf Java code generator maven plugin],
 you can automate protobuf Java code generating by adding following configurations to your pom.xml:
 
-Insert operating system and CPU architecture detection extension inside **<build>** tag of the project pom.xml or set ${os.detected.classifier} parameter manually 
+Insert operating system and CPU architecture detection extension inside **<build>** tag of the project pom.xml or set \${os.detected.classifier} parameter manually 
 [source,xml]
 -------------------------------------------------------------------------
 <extensions>
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/resources/component-options.mvel b/tooling/maven/camel-package-maven-plugin/src/main/resources/component-options.mvel
index be58b7a..1faaccf 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/resources/component-options.mvel
+++ b/tooling/maven/camel-package-maven-plugin/src/main/resources/component-options.mvel
@@ -8,6 +8,6 @@ The @{title} component supports @{componentOptions.size()} options, which are li
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-@foreach{row : componentOptions}| *@{row.getShortName(25)}* (@{row.shortGroup}) | @{row.description} | @{row.getShortDefaultValue(20)} | @{row.getShortJavaType(25)}
+@foreach{row : componentOptions}| *@{row.getShortName(25)}* (@{row.shortGroup}) | @{row.description.replaceAll("\\$", "\\\\\\$")} | @{row.getShortDefaultValue(20)} | @{row.getShortJavaType(25)}
 @end{}|===
-@end{}
\ No newline at end of file
+@end{}
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/resources/dataformat-options.mvel b/tooling/maven/camel-package-maven-plugin/src/main/resources/dataformat-options.mvel
index db6bc27..c957b75 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/resources/dataformat-options.mvel
+++ b/tooling/maven/camel-package-maven-plugin/src/main/resources/dataformat-options.mvel
@@ -8,6 +8,6 @@ The @{title} dataformat supports @{dataFormatOptions.size()} options, which are
 [width="100%",cols="2s,1m,1m,6",options="header"]
 |===
 | Name | Default | Java Type | Description
-@foreach{row : dataFormatOptions}| @{row.name} | @{row.defaultValue} | @{row.shortJavaType} | @{row.description}
+@foreach{row : dataFormatOptions}| @{row.name} | @{row.defaultValue} | @{row.shortJavaType} | @{row.description.replaceAll("\\$", "\\\\\\$")}
 @end{}|===
 @end{}
\ No newline at end of file
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/resources/eip-options.mvel b/tooling/maven/camel-package-maven-plugin/src/main/resources/eip-options.mvel
index ee51c62..3ad7508 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/resources/eip-options.mvel
+++ b/tooling/maven/camel-package-maven-plugin/src/main/resources/eip-options.mvel
@@ -6,6 +6,6 @@ The @{title} EIP supports @{eipOptions.size()} options which are listed below:
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-@foreach{row : eipOptions}| *@{row.getShortName(30)}* | @{row.description} | @{row.getShortDefaultValue(20)} | @{row.getShortJavaType(25)}
+@foreach{row : eipOptions}| *@{row.getShortName(30)}* | @{row.description.replaceAll("\\$", "\\\\\\$")} | @{row.getShortDefaultValue(20)} | @{row.getShortJavaType(25)}
 @end{}|===
 @end{}
\ No newline at end of file
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 217313f..6cec166 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
@@ -14,7 +14,7 @@ The @{title} endpoint has no path parameters.
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-@foreach{row : endpointPathOptions}| *@{row.getShortName(30)}* | @{row.description} | @{row.getShortDefaultValue(20)} | @{row.getShortJavaType(25)}
+@foreach{row : endpointPathOptions}| *@{row.getShortName(30)}* | @{row.description.replaceAll("\\$", "\\\\\\$")} | @{row.getShortDefaultValue(20)} | @{row.getShortJavaType(25)}
 @end{}|===
 @end{}
 
@@ -26,6 +26,6 @@ The @{title} endpoint has no query parameters.
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-@foreach{row : endpointOptions}| *@{row.getShortName(30)}* (@{row.shortGroup}) | @{row.description} | @{row.getShortDefaultValue(20)} | @{row.getShortJavaType(25)}
+@foreach{row : endpointOptions}| *@{row.getShortName(30)}* (@{row.shortGroup}) | @{row.description.replaceAll("\\$", "\\\\\\$")} | @{row.getShortDefaultValue(20)} | @{row.getShortJavaType(25)}
 @end{}|===
 @end{}
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/resources/language-options.mvel b/tooling/maven/camel-package-maven-plugin/src/main/resources/language-options.mvel
index 4c37a62..01ea4d8 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/resources/language-options.mvel
+++ b/tooling/maven/camel-package-maven-plugin/src/main/resources/language-options.mvel
@@ -8,6 +8,6 @@ The @{title} language supports @{languageOptions.size()} options, which are list
 [width="100%",cols="2,1m,1m,6",options="header"]
 |===
 | Name | Default | Java Type | Description
-@foreach{row : languageOptions}| @{row.name} | @{row.defaultValue} | @{row.shortJavaType} | @{row.description}
+@foreach{row : languageOptions}| @{row.name} | @{row.defaultValue} | @{row.shortJavaType} | @{row.description.replaceAll("\\$", "\\\\\\$")}
 @end{}|===
 @end{}
\ No newline at end of file
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-components.mvel b/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-components.mvel
index fdc08e0..765a66e2 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-components.mvel
+++ b/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-components.mvel
@@ -7,7 +7,7 @@ Number of Components: @{components.size} in @{numberOfArtifacts} JAR artifacts (
 | Component | Available From | Description
 @foreach{row : components}
 | link:@{row.docLink}/${row.scheme}-component.adoc[@{row.title}] (@{row.artifactId}) +
-`@{row.syntax}` | @{row.firstVersionShort} | @if{row.deprecated == "true"}*deprecated* @end{}@{row.description}
+`@{row.syntax}` | @{row.firstVersionShort} | @if{row.deprecated == "true"}*deprecated* @end{}@{row.description.replaceAll("\\$", "\\\\\\$")}
 @end{}
 |===
 
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-dataformats.mvel b/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-dataformats.mvel
index fbe0987..3790e21 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-dataformats.mvel
+++ b/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-dataformats.mvel
@@ -6,7 +6,7 @@ Number of Data Formats: @{dataformats.size} in @{numberOfArtifacts} JAR artifact
 |===
 | Data Format | Available From | Description
 @foreach{row : dataformats}
-| link:@{row.docLink}/${row.name}-dataformat.adoc[@{row.title}] (@{row.artifactId}) | @{row.firstVersionShort} | @if{row.deprecated == "true"}*deprecated* @end{}@{row.description}
+| link:@{row.docLink}/${row.name}-dataformat.adoc[@{row.title}] (@{row.artifactId}) | @{row.firstVersionShort} | @if{row.deprecated == "true"}*deprecated* @end{}@{row.description.replaceAll("\\$", "\\\\\\$")}
 @end{}|===
 
 @end{}
\ No newline at end of file
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-eips.mvel b/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-eips.mvel
index 1ba3a04..0869927 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-eips.mvel
+++ b/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-eips.mvel
@@ -7,7 +7,7 @@ Number of EIPs: @{eips.size} (@{numberOfDeprecated} deprecated)
 | EIP | Description
 @foreach{row : eips}
 | link:@{row.docLink}/${row.name}-eip.adoc[@{row.title}] +
-`<@{row.name}>` | @if{row.deprecated == "true"}*deprecated* @end{}@{row.description}
+`<@{row.name}>` | @if{row.deprecated == "true"}*deprecated* @end{}@{row.description.replaceAll("\\$", "\\\\\\$")}
 @end{}
 |===
 
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-examples.mvel b/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-examples.mvel
index 770e519..72a3667 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-examples.mvel
+++ b/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-examples.mvel
@@ -6,7 +6,7 @@ Number of Examples: @{examples.size} (@{numberOfDeprecated} deprecated)
 |===
 | Example | Category | Description
 @foreach{row : examples}
-| link:@{row.docLink}[@{row.title}] (@{row.fileName}) | @{row.category} | @if{row.deprecated == "true"}*deprecated* @end{}@{row.description}
+| link:@{row.docLink}[@{row.title}] (@{row.fileName}) | @{row.category} | @if{row.deprecated == "true"}*deprecated* @end{}@{row.description.replaceAll("\\$", "\\\\\\$")}
 @end{}|===
 
 @end{}
\ No newline at end of file
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-languages.mvel b/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-languages.mvel
index 3694975..120662f 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-languages.mvel
+++ b/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-languages.mvel
@@ -6,7 +6,7 @@ Number of Languages: @{languages.size} in @{numberOfArtifacts} JAR artifacts (@{
 |===
 | Language | Available From | Description
 @foreach{row : languages}
-| link:@{row.docLink}/${row.name}-language.adoc[@{row.title}] (@{row.artifactId}) | @{row.firstVersionShort} | @if{row.deprecated == "true"}*deprecated* @end{}@{row.description}
+| link:@{row.docLink}/${row.name}-language.adoc[@{row.title}] (@{row.artifactId}) | @{row.firstVersionShort} | @if{row.deprecated == "true"}*deprecated* @end{}@{row.description.replaceAll("\\$", "\\\\\\$")}
 @end{}|===
 
 @end{}
\ No newline at end of file
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-others.mvel b/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-others.mvel
index ccb02e1..7ae9c31 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-others.mvel
+++ b/tooling/maven/camel-package-maven-plugin/src/main/resources/readme-others.mvel
@@ -6,7 +6,7 @@ Number of Miscellaneous Components: @{others.size} in @{numberOfArtifacts} JAR a
 |===
 | Component | Available From | Description
 @foreach{row : others}
-| link:@{row.docLink}/${row.name}.adoc[@{row.title}] (@{row.artifactId}) | @{row.firstVersionShort} | @if{row.deprecated == "true"}*deprecated* @end{}@{row.description}
+| link:@{row.docLink}/${row.name}.adoc[@{row.title}] (@{row.artifactId}) | @{row.firstVersionShort} | @if{row.deprecated == "true"}*deprecated* @end{}@{row.description.replaceAll("\\$", "\\\\\\$")}
 @end{}|===
 
 @end{}
\ No newline at end of file
diff --git a/tooling/maven/camel-restdsl-swagger-plugin/src/main/docs/camel-restdsl-swagger-plugin.adoc b/tooling/maven/camel-restdsl-swagger-plugin/src/main/docs/camel-restdsl-swagger-plugin.adoc
index 356c0ba..4f73c4d 100644
--- a/tooling/maven/camel-restdsl-swagger-plugin/src/main/docs/camel-restdsl-swagger-plugin.adoc
+++ b/tooling/maven/camel-restdsl-swagger-plugin/src/main/docs/camel-restdsl-swagger-plugin.adoc
@@ -110,7 +110,7 @@ The plugin supports the following *additional* options
 |========================================
 | Parameter | Default Value | Description
 | `swaggerCodegenMavenPluginVersion` | 2.3.1 | The version of the `io.swagger:swagger-codegen-maven-plugin` maven plugin to be used.
-| `modelOutput` | | Target output path (default is ${project.build.directory}/generated-sources/swagger)
+| `modelOutput` | | Target output path (default is \${project.build.directory}/generated-sources/swagger)
 | `modelPackage` | `io.swagger.client.model` | The package to use for generated model objects/classes
 | `modelNamePrefix` | | Sets the pre- or suffix for model classes and enums
 | `modelNameSuffix` | | Sets the pre- or suffix for model classes and enums
@@ -176,7 +176,7 @@ The plugin supports the following *additional* options
 |========================================
 | Parameter | Default Value | Description
 | `swaggerCodegenMavenPluginVersion` | 2.3.1 | The version of the `io.swagger:swagger-codegen-maven-plugin` maven plugin to be used.
-| `modelOutput` | | Target output path (default is ${project.build.directory}/generated-sources/swagger)
+| `modelOutput` | | Target output path (default is \${project.build.directory}/generated-sources/swagger)
 | `modelPackage` | `io.swagger.client.model` | The package to use for generated model objects/classes
 | `modelNamePrefix` | | Sets the pre- or suffix for model classes and enums
 | `modelNameSuffix` | | Sets the pre- or suffix for model classes and enums