Author: janstey
Date: Thu Oct  2 05:56:34 2008
New Revision: 701109

URL: http://svn.apache.org/viewvc?rev=701109&view=rev
Log:
CAMEL-957 - Get camel-spring and rest tests running on HP-UX.

Modified:
    activemq/camel/trunk/components/camel-rest/pom.xml
    activemq/camel/trunk/components/camel-spring/pom.xml

Modified: activemq/camel/trunk/components/camel-rest/pom.xml
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-rest/pom.xml?rev=701109&r1=701108&r2=701109&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-rest/pom.xml (original)
+++ activemq/camel/trunk/components/camel-rest/pom.xml Thu Oct  2 05:56:34 2008
@@ -310,10 +310,76 @@
         </executions>
       </plugin>
     </plugins>
+    
+    <pluginManagement>
+      <plugins>
+          <plugin>
+            <groupId>com.sun.tools.jxc.maven2</groupId>
+            <artifactId>maven-jaxb-schemagen-plugin</artifactId>
+            <executions>
+              <execution>
+                <phase>process-sources</phase>
+                <configuration>
+                  <destdir>${project.build.directory}/schema</destdir>
+                  <srcdir>src/main/java/org/apache/camel/rest/model</srcdir>
+                  <schemas>
+                    <schema>
+                      
<namespace>http://activemq.apache.org/camel/schema/rest</namespace>
+                      <file>camel-rest.xsd</file>
+                    </schema>
+                  </schemas>
+                  <!--<verbose>false</verbose>-->
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-dependency-plugin</artifactId>
+            <configuration>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>org.apache.camel</groupId>
+                  <artifactId>camel-rest</artifactId>
+                  <version>${pom.version}</version>
+                  <type>xsd</type>
+                  <overWrite>false</overWrite>
+                  
<outputDirectory>${project.build.directory}/schema</outputDirectory>
+                  <destFileName>camel-rest.xsd</destFileName>
+                </artifactItem>
+              </artifactItems>
+            </configuration>
+          </plugin>
+      </plugins>
+    </pluginManagement>    
   </build>
+  
   <profiles>
-    <!-- The schemagen plugin does not work on IBM's JDK. Lets
-    download the schema instead on that platform. -->
+    <!-- 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>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>com.sun.tools.jxc.maven2</groupId>
+            <artifactId>maven-jaxb-schemagen-plugin</artifactId>
+            <executions>
+              <execution>
+                <phase>process-sources</phase>
+                <goals>
+                  <goal>generate</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
     <profile>
       <id>on-ibmjdk</id>
       <activation>
@@ -325,71 +391,54 @@
       <build>
         <plugins>
           <plugin>
-             <groupId>org.apache.maven.plugins</groupId>
-             <artifactId>maven-dependency-plugin</artifactId>
-             <executions>
-               <execution>
-                 <id>copy</id>
-                 <phase>generate-resources</phase>
-                 <goals>
-                   <goal>copy</goal>
-                 </goals>
-                 <configuration>
-                   <artifactItems>
-                     <artifactItem>
-                       <groupId>org.apache.camel</groupId>
-                       <artifactId>camel-rest</artifactId>
-                       <version>${pom.version}</version>
-                       <type>xsd</type>
-                       <overWrite>false</overWrite>
-                       
<outputDirectory>${project.build.directory}/schema</outputDirectory>
-                       <destFileName>camel-rest.xsd</destFileName>             
          
-                     </artifactItem>
-                   </artifactItems>
-                 </configuration>
-               </execution>
-             </executions>
-           </plugin>           
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-dependency-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>copy</id>
+                <phase>generate-sources</phase>
+                <goals>
+                  <goal>copy</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>                  
+          <plugin>
+            <groupId>com.sun.tools.jxc.maven2</groupId>
+            <artifactId>maven-jaxb-schemagen-plugin</artifactId>
+          </plugin>
         </plugins>
       </build>
-    </profile>
+    </profile>    
     <profile>
-      <id>not-on-ibmjdk</id>
+      <id>on-hpjdk</id>
       <activation>
         <property>
           <name>java.vendor</name>
-          <value>!IBM Corporation</value>
+          <value>Hewlett-Packard Co.</value>
         </property>
       </activation>
       <build>
         <plugins>
           <plugin>
-            <groupId>com.sun.tools.jxc.maven2</groupId>
-            <artifactId>maven-jaxb-schemagen-plugin</artifactId>
-            <!--<version>1.3-dev</version>-->
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-dependency-plugin</artifactId>
             <executions>
               <execution>
-                <!--<phase>process-sources</phase>-->
-                <phase>package</phase>
-                <configuration>
-                  <destdir>${project.build.directory}/schema</destdir>
-                  <srcdir>src/main/java/org/apache/camel/rest/model</srcdir>
-                  <schemas>
-                    <schema>
-                      
<namespace>http://activemq.apache.org/camel/schema/rest</namespace>
-                      <file>camel-rest.xsd</file>
-                    </schema>
-                  </schemas>
-                  <!--<verbose>false</verbose>-->
-                </configuration>
+                <id>copy</id>
+                <phase>generate-sources</phase>
                 <goals>
-                  <goal>generate</goal>
+                  <goal>copy</goal>
                 </goals>
               </execution>
             </executions>
-          </plugin>      
+          </plugin>                          
+          <plugin>
+            <groupId>com.sun.tools.jxc.maven2</groupId>
+            <artifactId>maven-jaxb-schemagen-plugin</artifactId>
+          </plugin>
         </plugins>
       </build>
-    </profile>    
+    </profile>        
   </profiles>  
 </project>

Modified: activemq/camel/trunk/components/camel-spring/pom.xml
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/pom.xml?rev=701109&r1=701108&r2=701109&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-spring/pom.xml (original)
+++ activemq/camel/trunk/components/camel-spring/pom.xml Thu Oct  2 05:56:34 
2008
@@ -250,6 +250,7 @@
           </excludes>
         </configuration>
       </plugin>
+
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>build-helper-maven-plugin</artifactId>
@@ -270,9 +271,52 @@
             </configuration>
           </execution>
         </executions>
-      </plugin>
+      </plugin>    
     </plugins>
+
+    <pluginManagement>
+      <plugins>
+          <plugin>
+            <groupId>com.sun.tools.jxc.maven2</groupId>
+            <artifactId>maven-jaxb-schemagen-plugin</artifactId>
+            <executions>
+              <execution>
+                <phase>process-sources</phase>
+                <configuration>
+                  <destdir>${project.build.directory}/schema</destdir>
+                  <srcdir>${project.build.directory}/schema-src</srcdir>
+                  <schemas>
+                    <schema>
+                      
<namespace>http://activemq.apache.org/camel/schema/spring</namespace>
+                      <file>camel-spring.xsd</file>
+                    </schema>
+                  </schemas>
+                  <!--<verbose>false</verbose>-->
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>  
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-dependency-plugin</artifactId>  
+            <configuration>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>org.apache.camel</groupId>
+                  <artifactId>camel-spring</artifactId>
+                  <version>${pom.version}</version>
+                  <type>jar</type>
+                  <overWrite>false</overWrite>
+                  
<outputDirectory>${project.build.directory}/schema</outputDirectory>
+                  <includes>camel-spring.xsd</includes>
+                </artifactItem>
+              </artifactItems>
+            </configuration>
+          </plugin>          
+       </plugins>
+    </pluginManagement>
   </build>
+  
   <profiles>
     <profile>
       <id>release</id>
@@ -304,8 +348,32 @@
         </plugins>
       </build>
     </profile>
-    <!-- The schemagen plugin does not work on IBM's JDK. Lets
-    download the schema instead on that platform. -->
+    
+    <!-- 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>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>com.sun.tools.jxc.maven2</groupId>
+            <artifactId>maven-jaxb-schemagen-plugin</artifactId>
+            <executions>
+              <execution>
+                <phase>process-sources</phase>
+                <goals>
+                  <goal>generate</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
     <profile>
       <id>on-ibmjdk</id>
       <activation>
@@ -317,76 +385,57 @@
       <build>
         <plugins>
           <plugin>
-             <groupId>org.apache.maven.plugins</groupId>
-             <artifactId>maven-dependency-plugin</artifactId>
-             <executions>
-               <execution>
-                 <id>unpack</id>
-                 <phase>generate-resources</phase>
-                 <goals>
-                   <goal>unpack</goal>
-                 </goals>
-                 <configuration>
-                   <artifactItems>
-                     <artifactItem>
-                       <groupId>org.apache.camel</groupId>
-                       <artifactId>camel-spring</artifactId>
-                       <version>${pom.version}</version>
-                       <type>jar</type>
-                       <overWrite>false</overWrite>
-                       
<outputDirectory>${project.build.directory}/schema</outputDirectory>
-                       <includes>camel-spring.xsd</includes>
-                     </artifactItem>
-                   </artifactItems>
-                 </configuration>
-               </execution>
-             </executions>
-           </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>                  
+          <plugin>
+            <groupId>com.sun.tools.jxc.maven2</groupId>
+            <artifactId>maven-jaxb-schemagen-plugin</artifactId>
+          </plugin>
         </plugins>
       </build>
-    </profile>
+    </profile>    
     <profile>
-      <id>not-on-ibmjdk</id>
+      <id>on-hpjdk</id>
       <activation>
         <property>
           <name>java.vendor</name>
-          <value>!IBM Corporation</value>
+          <value>Hewlett-Packard Co.</value>
         </property>
       </activation>
       <build>
         <plugins>
           <plugin>
-            <groupId>com.sun.tools.jxc.maven2</groupId>
-            <artifactId>maven-jaxb-schemagen-plugin</artifactId>
-            <!--<version>1.3-dev</version>-->
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-dependency-plugin</artifactId>
             <executions>
               <execution>
-                <phase>process-sources</phase>
-                <configuration>
-                  <destdir>${project.build.directory}/schema</destdir>
-                  <srcdir>${project.build.directory}/schema-src</srcdir>
-                  <schemas>
-                    <schema>
-                      <namespace>
-                        http://activemq.apache.org/camel/schema/spring
-                      </namespace>
-                      <file>camel-spring.xsd</file>
-                    </schema>
-                  </schemas>
-                  <!--<verbose>false</verbose>-->
-                </configuration>
+                <id>unpack</id>
+                <phase>generate-sources</phase>
                 <goals>
-                  <goal>generate</goal>
+                  <goal>unpack</goal>
                 </goals>
               </execution>
             </executions>
-          </plugin>         
+          </plugin>                          
+          <plugin>
+            <groupId>com.sun.tools.jxc.maven2</groupId>
+            <artifactId>maven-jaxb-schemagen-plugin</artifactId>
+          </plugin>
         </plugins>
       </build>
-    </profile>    
+    </profile>      
   </profiles>
 
-
   <reporting>
     <plugins>
       <plugin>


Reply via email to