CAMEL-8197: Include eip enhanced xsd schema in the generated JAR. Need a bit of maven phase shuffle to make the plugins run in correct order.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/7ebe3332 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7ebe3332 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7ebe3332 Branch: refs/heads/master Commit: 7ebe33322a02d9c5a80a09dfe58472d410590434 Parents: 89869b6 Author: Claus Ibsen <davscl...@apache.org> Authored: Tue Feb 10 13:34:43 2015 +0100 Committer: Claus Ibsen <davscl...@apache.org> Committed: Tue Feb 10 13:34:43 2015 +0100 ---------------------------------------------------------------------- components/camel-blueprint/pom.xml | 35 ++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/7ebe3332/components/camel-blueprint/pom.xml ---------------------------------------------------------------------- diff --git a/components/camel-blueprint/pom.xml b/components/camel-blueprint/pom.xml index 80d746d..679425c 100644 --- a/components/camel-blueprint/pom.xml +++ b/components/camel-blueprint/pom.xml @@ -167,13 +167,42 @@ </executions> </plugin> + <!-- after the eip-documentation-enricher we need to copy some shchema files --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <id>package</id> + <phase>prepare-package</phase> + <configuration> + <target> + <echo>Copying XSD schema to be included in JAR</echo> + <replace file="${project.build.directory}/schema/camel-blueprint.xsd" token="http://camel.apache.org/schema/spring" value="http://camel.apache.org/schema/blueprint" /> + <copy todir="${project.build.directory}/classes"> + <fileset dir="${project.build.directory}/schema" /> + </copy> + <!-- copy modified schemas back again in classes so they are included in the JAR --> + <copy todir="${project.build.directory}/classes"> + <fileset dir="${project.build.directory}/schema"/> + </copy> + </target> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> <groupId>org.apache.camel</groupId> <artifactId>camel-eip-documentation-enricher-maven-plugin</artifactId> <executions> <execution> <id>eip-documentation-enricher</id> - <phase>package</phase> + <!-- need to run earlier so we use the process-test-resources phase --> + <phase>process-test-resources</phase> <goals> <goal>eip-documentation-enricher</goal> </goals> @@ -337,10 +366,6 @@ <schema namespace="http://camel.apache.org/schema/spring" file="camel-blueprint.xsd" /> <classpath refid="maven.compile.classpath" /> </schemagen> - <replace file="${project.build.directory}/schema/camel-blueprint.xsd" token="http://camel.apache.org/schema/spring" value="http://camel.apache.org/schema/blueprint" /> - <copy todir="${project.build.directory}/classes"> - <fileset dir="${project.build.directory}/schema" /> - </copy> </target> </configuration>