Author: gnodet
Date: Thu Oct  8 13:48:53 2009
New Revision: 823177

URL: http://svn.apache.org/viewvc?rev=823177&view=rev
Log:
CAMEL-2022: Try to fix builds on non sun jdk

Modified:
    camel/trunk/components/camel-blueprint/pom.xml
    camel/trunk/components/pom.xml

Modified: camel/trunk/components/camel-blueprint/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-blueprint/pom.xml?rev=823177&r1=823176&r2=823177&view=diff
==============================================================================
--- camel/trunk/components/camel-blueprint/pom.xml (original)
+++ camel/trunk/components/camel-blueprint/pom.xml Thu Oct  8 13:48:53 2009
@@ -141,45 +141,6 @@
                 <artifactId>maven-antrun-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>process-sources</id>
-                        <phase>process-sources</phase>
-                        <configuration>
-                            <tasks>
-                                <taskdef name="schemagen" 
classname="com.sun.tools.jxc.SchemaGenTask" 
classpathref="maven.plugin.classpath"/>
-
-                                <echo>Copying to code together for the XSD 
generation</echo>
-                                <mkdir 
dir="${project.build.directory}/schema-src"/>
-                                <mkdir 
dir="${project.build.directory}/schema"/>
-                                <copy 
todir="${project.build.directory}/schema-src">
-                                    <fileset dir="${basedir}/src/main/java">
-                                        <include 
name="org/apache/camel/blueprint/Camel*.java"/>
-                                        <include 
name="org/apache/camel/blueprint/package-info.java"/>
-                                    </fileset>
-                                    <fileset 
dir="${basedir}/../../camel-core/src/main/java">
-                                        <include 
name="org/apache/camel/model/**/*.java"/>
-                                        <include 
name="org/apache/camel/ExchangePattern.java"/>
-                                        <include 
name="org/apache/camel/LoggingLevel.java"/>
-                                        <include 
name="org/apache/camel/ManagementStatisticsLevel.java"/>
-                                        <include name="**/package-info.java"/>
-                                    </fileset>
-                                </copy>
-
-                                <echo>Generating XSD schema</echo>
-                                <schemagen 
srcdir="${project.build.directory}/schema-src" 
destdir="${project.build.directory}/schema">
-                                    <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"/>
-
-                            </tasks>
-                        </configuration>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                    </execution>
-
-                    <execution>
                         <id>package</id>
                         <phase>package</phase>
                         <configuration>
@@ -291,6 +252,122 @@
                 </plugins>
             </build>
         </profile>
+
+        <!-- The next three profiles are used to bypass the schemagen plugin 
on HP and IBM JDKs.
+
+             TODO: Whenever Maven supports profile activations based on 
multiple properties, we
+             should combine the on-ibmjdk and on-hpjdk profiles as they do 
exactly the same thing. -->
+        <profile>
+          <id>enable-schemagen</id>
+          <activation>
+            <activeByDefault>true</activeByDefault>
+          </activation>
+
+          <build>
+            <plugins>
+              <plugin>
+                  <groupId>org.apache.maven.plugins</groupId>
+                  <artifactId>maven-antrun-plugin</artifactId>
+                  <executions>
+                      <execution>
+                          <id>process-sources</id>
+                          <phase>process-sources</phase>
+                          <configuration>
+                              <tasks>
+                                  <taskdef name="schemagen" 
classname="com.sun.tools.jxc.SchemaGenTask" 
classpathref="maven.plugin.classpath"/>
+
+                                  <echo>Copying to code together for the XSD 
generation</echo>
+                                  <mkdir 
dir="${project.build.directory}/schema-src"/>
+                                  <mkdir 
dir="${project.build.directory}/schema"/>
+                                  <copy 
todir="${project.build.directory}/schema-src">
+                                      <fileset dir="${basedir}/src/main/java">
+                                          <include 
name="org/apache/camel/blueprint/Camel*.java"/>
+                                          <include 
name="org/apache/camel/blueprint/package-info.java"/>
+                                      </fileset>
+                                      <fileset 
dir="${basedir}/../../camel-core/src/main/java">
+                                          <include 
name="org/apache/camel/model/**/*.java"/>
+                                          <include 
name="org/apache/camel/ExchangePattern.java"/>
+                                          <include 
name="org/apache/camel/LoggingLevel.java"/>
+                                          <include 
name="org/apache/camel/ManagementStatisticsLevel.java"/>
+                                          <include 
name="**/package-info.java"/>
+                                      </fileset>
+                                  </copy>
+
+                                  <echo>Generating XSD schema</echo>
+                                  <schemagen 
srcdir="${project.build.directory}/schema-src" 
destdir="${project.build.directory}/schema">
+                                      <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"/>
+
+                              </tasks>
+                          </configuration>
+                          <goals>
+                              <goal>run</goal>
+                          </goals>
+                      </execution>
+                  </executions>
+              </plugin>
+            </plugins>
+          </build>
+
+        </profile>
+        <profile>
+          <id>on-ibmjdk</id>
+          <activation>
+            <property>
+              <name>java.vendor</name>
+              <value>IBM Corporation</value>
+            </property>
+          </activation>
+          <build>
+            <plugins>
+              <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+
+                  <execution>
+                    <id>unpack</id>
+                    <phase>generate-sources</phase>
+                    <goals>
+                      <goal>unpack</goal>
+                    </goals>
+                  </execution>
+
+                </executions>
+              </plugin>                  
+            </plugins>
+          </build>
+
+        </profile>    
+        <profile>
+          <id>on-hpjdk</id>
+          <activation>
+            <property>
+              <name>java.vendor</name>
+              <value>Hewlett-Packard Co.</value>
+            </property>
+          </activation>
+          <build>
+            <plugins>
+              <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                  <execution>
+                    <id>unpack</id>
+                    <phase>generate-sources</phase>
+                    <goals>
+                      <goal>unpack</goal>
+                    </goals>
+                  </execution>
+                </executions>
+              </plugin>                          
+            </plugins>
+          </build>
+        </profile>      
     </profiles>
 
     <reporting>

Modified: camel/trunk/components/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/pom.xml?rev=823177&r1=823176&r2=823177&view=diff
==============================================================================
--- camel/trunk/components/pom.xml (original)
+++ camel/trunk/components/pom.xml Thu Oct  8 13:48:53 2009
@@ -34,7 +34,7 @@
     <module>camel-atom</module>
     <module>camel-bam</module>
     <module>camel-bindy</module>
-    <!-- TODO: enable when blueprint works: module>camel-blueprint</module -->
+    <module>camel-blueprint</module>
     <module>camel-cometd</module>
     <module>camel-cache</module>
     <module>camel-castor</module>


Reply via email to