You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2015/02/10 14:08:13 UTC
[1/2] camel git commit: 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.
Repository: camel
Updated Branches:
refs/heads/master 55d4f227f -> 7ebe33322
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/89869b6b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/89869b6b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/89869b6b
Branch: refs/heads/master
Commit: 89869b6b265b641d89245753f8cce3e14af121af
Parents: 55d4f22
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Feb 10 13:28:07 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Feb 10 13:28:07 2015 +0100
----------------------------------------------------------------------
components/camel-spring/pom.xml | 76 +++++++++++++-------
.../maven/EipDocumentationEnricherMojo.java | 2 +-
2 files changed, 52 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/89869b6b/components/camel-spring/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-spring/pom.xml b/components/camel-spring/pom.xml
index 4714cab..ac0a76b 100644
--- a/components/camel-spring/pom.xml
+++ b/components/camel-spring/pom.xml
@@ -255,22 +255,6 @@
</dependencies>
<executions>
<execution>
- <id>package</id>
- <phase>package</phase>
- <configuration>
- <target>
- <echo>Including source code from camel-core-xml in the camel-spring-sources.jar</echo>
- <jar destfile="${project.build.directory}/${project.artifactId}-${project.version}-sources.jar" update="true">
- <fileset dir="${basedir}/../camel-core-osgi/src/main/java" includes="**/*" />
- <fileset dir="${basedir}/../camel-core-xml/src/main/java" includes="**/*" />
- </jar>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
<id>generate-sources</id>
<phase>process-classes</phase>
<configuration>
@@ -323,12 +307,6 @@
<schema namespace="http://camel.apache.org/schema/spring" file="camel-spring.xsd" />
<classpath refid="maven.compile.classpath" />
</schemagen>
- <copy file="${project.build.directory}/schema/camel-spring.xsd" tofile="${project.build.directory}/schema/camel-spring-v${camel.schema.version}.xsd" />
- <replace file="${project.build.directory}/schema/camel-spring-v${camel.schema.version}.xsd" token="http://camel.apache.org/schema/spring" value="http://camel.apache.org/schema/spring/v${camel.schema.version}" />
-
- <copy todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/schema" />
- </copy>
</target>
</configuration>
@@ -336,6 +314,22 @@
<goal>run</goal>
</goals>
</execution>
+ <execution>
+ <id>package</id>
+ <phase>package</phase>
+ <configuration>
+ <target>
+ <echo>Including source code from camel-core-xml in the camel-spring-sources.jar</echo>
+ <jar destfile="${project.build.directory}/${project.artifactId}-${project.version}-sources.jar" update="true">
+ <fileset dir="${basedir}/../camel-core-osgi/src/main/java" includes="**/*" />
+ <fileset dir="${basedir}/../camel-core-xml/src/main/java" includes="**/*" />
+ </jar>
+ </target>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
</executions>
</plugin>
<plugin>
@@ -369,7 +363,7 @@
<configuration>
<artifacts>
<artifact>
- <file>${project.build.directory}/schema/camel-spring.xsd</file>
+ <file>${project.build.directory}/classes/camel-spring.xsd</file>
<type>xsd</type>
</artifact>
</artifacts>
@@ -377,19 +371,51 @@
</execution>
</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>
+ <copy file="${project.build.directory}/classes/camel-spring.xsd"
+ tofile="${project.build.directory}/schema/camel-spring.xsd"/>
+ <copy file="${project.build.directory}/classes/camel-spring.xsd"
+ tofile="${project.build.directory}/schema/camel-spring-v${camel.schema.version}.xsd"/>
+ <replace file="${project.build.directory}/schema/camel-spring-v${camel.schema.version}.xsd"
+ token="http://camel.apache.org/schema/spring"
+ value="http://camel.apache.org/schema/spring/v${camel.schema.version}"/>
+ <!-- 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>
+ <version>${project.version}</version>
<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>
<configuration>
<inputCamelSchemaFile>${project.build.directory}/schema/camel-spring.xsd</inputCamelSchemaFile>
- <outputCamelSchemaFile>${project.build.directory}/schema/camel-spring.xsd</outputCamelSchemaFile>
+ <outputCamelSchemaFile>${project.build.directory}/classes/camel-spring.xsd</outputCamelSchemaFile>
</configuration>
</execution>
</executions>
http://git-wip-us.apache.org/repos/asf/camel/blob/89869b6b/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/EipDocumentationEnricherMojo.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/EipDocumentationEnricherMojo.java b/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/EipDocumentationEnricherMojo.java
index 4c2ddd0..e7f482c 100644
--- a/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/EipDocumentationEnricherMojo.java
+++ b/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/EipDocumentationEnricherMojo.java
@@ -52,7 +52,7 @@ import org.apache.maven.plugins.annotations.ResolutionScope;
* Injects EIP documentation to camel schema.
*/
@Mojo(name = "eip-documentation-enricher", requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME, requiresProject = true,
- defaultPhase = LifecyclePhase.PACKAGE)
+ defaultPhase = LifecyclePhase.PREPARE_PACKAGE)
public class EipDocumentationEnricherMojo extends AbstractMojo {
/**
[2/2] camel git commit: 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.
Posted by da...@apache.org.
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 <da...@apache.org>
Authored: Tue Feb 10 13:34:43 2015 +0100
Committer: Claus Ibsen <da...@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>