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


The following commit(s) were added to refs/heads/master by this push:
     new b150c97  CAMEL-13446: Make camel-xpath build
b150c97 is described below

commit b150c9754aa39c0c24758ee81ad65e026a2489c0
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Wed Apr 24 09:44:47 2019 +0200

    CAMEL-13446: Make camel-xpath build
---
 components/camel-xpath/src/main/schema/xpath.json  |  3 ++-
 core/camel-core/pom.xml                            | 22 ++++++++++++++++++++++
 .../camel/model/language/XPathExpression.java      |  2 --
 3 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/components/camel-xpath/src/main/schema/xpath.json 
b/components/camel-xpath/src/main/schema/xpath.json
index c3234c1..f9e3155 100644
--- a/components/camel-xpath/src/main/schema/xpath.json
+++ b/components/camel-xpath/src/main/schema/xpath.json
@@ -1,5 +1,5 @@
 {
-  "model": {
+ "model": {
     "kind": "model",
     "name": "xpath",
     "title": "XPath",
@@ -25,3 +25,4 @@
     "id": { "kind": "attribute", "displayName": "Id", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"secret": false, "description": "Sets the id of this node" }
   }
 }
+
diff --git a/core/camel-core/pom.xml b/core/camel-core/pom.xml
index 37111d6..8e7b89d 100644
--- a/core/camel-core/pom.xml
+++ b/core/camel-core/pom.xml
@@ -455,6 +455,28 @@
                             </resources>
                         </configuration>
                     </execution>
+                    <!-- we need to copy the xpath.json schema file from 
camel-core to camel-xpath because camel-xpath is built before
+                         camel-core and we would have a chicken-and-egg 
situation where camel-xpath needs xpath.json during its build phase
+                         but this file is not available, so we have copied the 
file to camel-xpath and then we use this maven plugin
+                         to copy over the file so its kept up to date -->
+                    <execution>
+                        <id>copy-xpath-schema</id>
+                        <goals>
+                            <goal>resources</goal>
+                        </goals>
+                        <phase>prepare-package</phase>
+                        <configuration>
+                            
<outputDirectory>${basedir}/../../components/camel-xpath/src/main/schema</outputDirectory>
+                            <resources>
+                                <resource>
+                                    
<directory>${basedir}/target/classes/org/apache/camel/model/language</directory>
+                                    <includes>
+                                        <include>xpath.json</include>
+                                    </includes>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
                 </executions>
             </plugin>
             <plugin>
diff --git 
a/core/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java
 
b/core/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java
index 4e68c44..7ac65e0 100644
--- 
a/core/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java
+++ 
b/core/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java
@@ -38,8 +38,6 @@ import org.apache.camel.util.ObjectHelper;
 @XmlAccessorType(XmlAccessType.FIELD)
 public class XPathExpression extends NamespaceAwareExpression {
 
-    // IMPORTANT: If updating this file, then also update the file 
components/camel-xpath/src/main/schema/xpath.json
-
     @XmlAttribute(name = "documentType")
     private String documentTypeName;
     @XmlAttribute(name = "resultType") @Metadata(defaultValue = "NODESET", 
enums = "NUMBER,STRING,BOOLEAN,NODESET,NODE")

Reply via email to