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 2018/02/20 11:56:56 UTC
[camel] 01/02: CAMEL-11930: camel-spring and camel-blueprint: ...
This is an automated email from the ASF dual-hosted git repository.
zregvart pushed a commit to branch jenkins-pipeline
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 0f85182663769890cb8837c3174812f62035c1e2
Author: Zoran Regvart <zr...@apache.org>
AuthorDate: Tue Feb 20 12:41:46 2018 +0100
CAMEL-11930: camel-spring and camel-blueprint: ...
...make `test` goal execute successfully
Ant task to manipulate schemas fails if the `schema1.xsd` doesn't exist
and this could be because it was moved by previous execution. That is
running `mvn test` after `mvn install` fails because `schema1.xsd` no
longer exists.
This adds a condition so if `schema1.xsd` is not present schema
manipulation is skipped.
Affected components are `camel-spring` and `camel-blueprint`.
---
components/camel-blueprint/pom.xml | 14 ++++++++++----
components/camel-spring/pom.xml | 30 +++++++++++++++++++++---------
2 files changed, 31 insertions(+), 13 deletions(-)
diff --git a/components/camel-blueprint/pom.xml b/components/camel-blueprint/pom.xml
index 53e0021..91f14ba 100644
--- a/components/camel-blueprint/pom.xml
+++ b/components/camel-blueprint/pom.xml
@@ -387,10 +387,16 @@
<phase>process-test-sources</phase>
<configuration>
<target>
- <echo>Copying XSD schema to be included in JAR</echo>
- <move file="${project.build.directory}/schema/schema1.xsd"
- tofile="${project.build.directory}/schema/camel-blueprint.xsd"/>
- <delete file="${project.build.directory}/schema/schema2.xsd"/>
+ <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="maven.plugin.classpath" />
+ <if>
+ <available file="${project.build.directory}/schema/schema1.xsd" />
+ <then>
+ <echo>Copying XSD schema to be included in JAR</echo>
+ <move file="${project.build.directory}/schema/schema1.xsd"
+ tofile="${project.build.directory}/schema/camel-blueprint.xsd"/>
+ <delete file="${project.build.directory}/schema/schema2.xsd"/>
+ </then>
+ </if>
</target>
</configuration>
<goals>
diff --git a/components/camel-spring/pom.xml b/components/camel-spring/pom.xml
index cbcb8cb..00d0026 100644
--- a/components/camel-spring/pom.xml
+++ b/components/camel-spring/pom.xml
@@ -581,9 +581,15 @@
<phase>process-test-sources</phase>
<configuration>
<target>
- <echo>Copying XSD schema to be included in JAR</echo>
- <move file="${project.build.directory}/schema/schema1.xsd" tofile="${project.build.directory}/schema/camel-spring.xsd" />
- <delete file="${project.build.directory}/schema/schema2.xsd"/>
+ <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="maven.plugin.classpath" />
+ <if>
+ <available file="${project.build.directory}/schema/schema1.xsd" />
+ <then>
+ <echo>Copying XSD schema to be included in JAR</echo>
+ <move file="${project.build.directory}/schema/schema1.xsd" tofile="${project.build.directory}/schema/camel-spring.xsd" />
+ <delete file="${project.build.directory}/schema/schema2.xsd"/>
+ </then>
+ </if>
</target>
</configuration>
<goals>
@@ -649,12 +655,18 @@
<phase>process-test-sources</phase>
<configuration>
<target>
- <echo>Copying XSD schema to be included in JAR</echo>
- <replace file="${project.build.directory}/schema/schema1.xsd"
- token="xmlns:xs="http://www.w3.org/2001/XMLSchema""
- value="xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema""/>
- <move file="${project.build.directory}/schema/schema1.xsd" tofile="${project.build.directory}/schema/camel-spring.xsd" />
- <delete file="${project.build.directory}/schema/schema2.xsd"/>
+ <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="maven.plugin.classpath" />
+ <if>
+ <available file="${project.build.directory}/schema/schema1.xsd" />
+ <then>
+ <echo>Copying XSD schema to be included in JAR</echo>
+ <replace file="${project.build.directory}/schema/schema1.xsd"
+ token="xmlns:xs="http://www.w3.org/2001/XMLSchema""
+ value="xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema""/>
+ <move file="${project.build.directory}/schema/schema1.xsd" tofile="${project.build.directory}/schema/camel-spring.xsd" />
+ <delete file="${project.build.directory}/schema/schema2.xsd"/>
+ </then>
+ </if>
</target>
</configuration>
<goals>
--
To stop receiving notification emails like this one, please contact
zregvart@apache.org.