camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [07/16] camel git commit: CAMEL-10559: maven plugin to validate using the route parser. Donated from fabric8 project.
Date Thu, 08 Dec 2016 14:12:40 GMT
CAMEL-10559: maven plugin to validate using the route parser. Donated from fabric8 project.


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

Branch: refs/heads/master
Commit: bfdc6710b5e1ce6e69a226763719d909fc4cfb03
Parents: ecb7d5d
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Thu Dec 8 14:35:46 2016 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Dec 8 14:44:03 2016 +0100

----------------------------------------------------------------------
 .../org/apache/camel/parser/helper/CamelJavaParserHelper.java    | 4 +++-
 .../src/main/java/org/apache/camel/maven/ValidateMojo.java       | 2 --
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/bfdc6710/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaParserHelper.java
----------------------------------------------------------------------
diff --git a/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaParserHelper.java
b/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaParserHelper.java
index 6df709a..b433543 100644
--- a/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaParserHelper.java
+++ b/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaParserHelper.java
@@ -311,9 +311,11 @@ public final class CamelJavaParserHelper {
             if (!Strings.isBlank(uri)) {
                 int position = ((Expression) arg).getStartPosition();
 
-                // if the node is fromF or toF, then replace all %s with {{%s}} as we cannot
parse that value
+                // if the node is fromF or toF, then replace all %X with {{%X}} as we cannot
parse that value
                 if ("fromF".equals(node) || "toF".equals(node)) {
                     uri = uri.replaceAll("\\%s", "\\{\\{\\%s\\}\\}");
+                    uri = uri.replaceAll("\\%d", "\\{\\{\\%d\\}\\}");
+                    uri = uri.replaceAll("\\%b", "\\{\\{\\%b\\}\\}");
                 }
 
                 uris.add(new ParserResult(node, position, uri));

http://git-wip-us.apache.org/repos/asf/camel/blob/bfdc6710/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java
b/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java
index 579c6f5..3a63cdc 100644
--- a/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java
+++ b/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java
@@ -49,8 +49,6 @@ import org.jboss.forge.roaster.model.source.JavaClassSource;
  * Parses the source code and validates the Camel routes has valid endpoint uris and simple
expressions.
  *
  * @goal validate
- * @requiresDependencyResolution compile+runtime
- * @execute phase="process-test-classes"
  */
 public class ValidateMojo extends AbstractExecMojo {
 


Mime
View raw message