Author: davsclaus
Date: Sun Jun 29 22:50:24 2008
New Revision: 672710

URL: http://svn.apache.org/viewvc?rev=672710&view=rev
Log:
CAMEL-649: Added/Fixed ANT build for examples

Added:
    activemq/camel/trunk/examples/camel-example-spring-jms/build.xml
Removed:
    
activemq/camel/trunk/examples/camel-example-spring-xquery/src/data/message2.xml
Modified:
    activemq/camel/trunk/examples/camel-example-spring-jms/README.txt
    activemq/camel/trunk/examples/camel-example-spring-xquery/build.xml
    activemq/camel/trunk/examples/camel-example-spring/build.xml
    activemq/camel/trunk/examples/common_build.xml

Modified: activemq/camel/trunk/examples/camel-example-spring-jms/README.txt
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring-jms/README.txt?rev=672710&r1=672709&r2=672710&view=diff
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring-jms/README.txt (original)
+++ activemq/camel/trunk/examples/camel-example-spring-jms/README.txt Sun Jun 
29 22:50:24 2008
@@ -33,6 +33,20 @@
   mvn exec:java -PCamelClientRemoting
   mvn exec:java -PCamelClientEndpoint
 
+To run the example with Ant
+  a. You need to have Apache ActiveMQ installed. It can be downloaded from 
+    http://activemq.apache.org/
+
+  b. Export / Set ACTIVEMQ_HOME to the top level Apache ActiveMQ install
+  directory
+    UNIX
+    export ACTIVEMQ_HOME=<path to ActiveMQ install directory>
+    Windows
+    set ACTIVEMQ_HOME=<path to ActiveMQ install directory>
+
+  c. To run the example using Ant, type
+    ant
+
 To stop the example hit ctrl + c
 
 To use log4j as the logging framework add this to the pom.xml:

Added: activemq/camel/trunk/examples/camel-example-spring-jms/build.xml
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring-jms/build.xml?rev=672710&view=auto
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring-jms/build.xml (added)
+++ activemq/camel/trunk/examples/camel-example-spring-jms/build.xml Sun Jun 29 
22:50:24 2008
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<project name="camel-example-spring-jms" default="run" basedir=".">
+
+  <import file="../common_build.xml"/>
+
+  <fail unless="env.SPRING_HOME" message="You must download Spring Framework 
and set your SPRING_HOME to run this demo."/>
+  <fail unless="env.ACTIVEMQ_HOME" message="You must download ActiveMQ and set 
your ACTIVEMQ_HOME to run this demo."/>
+  <fail unless="env.ASPECTJ_HOME" message="You must download AspectJ and set 
your ASPECTJ_HOME to run this demo."/>
+
+  <property name="project.name" value="camel-example-jms-file"/>
+  
+  <path id="sample.build.classpath">
+    <fileset dir="${camel.lib}">
+      <include name="**/camel-jms-*.jar"/>
+      <exclude name="**/*-tests.jar"/>
+    </fileset>
+    <path refid="camel.spring.classpath"/>
+    <path refid="spring.classpath"/>
+    <path refid="activemq.classpath"/>
+    <path refid="aspectj.classpath"/>
+  </path>
+  
+  <target name="run" depends="build" description="Compile and run the sample 
CamelServer">
+    <camelrun>
+      <arguments>
+        <arg value="-a"/>
+        <arg value="META-INF/spring/camel-server.xml"/>
+      </arguments>
+    </camelrun>
+  </target>
+
+  <target name="run-client" depends="build" description="Compile and run the 
sample CamelClient">
+    <camelrun mainClass="org.apache.camel.example.client.CamelClient"/>
+  </target>
+
+  <target name="run-client-remoting" depends="build" description="Compile and 
run the sample CamelClientRemoting">
+    <camelrun mainClass="org.apache.camel.example.client.CamelClientRemoting"/>
+  </target>
+
+  <target name="run-client-endpoint" depends="build" description="Compile and 
run the sample CamelClientEndpoint">
+    <camelrun mainClass="org.apache.camel.example.client.CamelClientEndpoint"/>
+  </target>
+
+</project>

Modified: activemq/camel/trunk/examples/camel-example-spring-xquery/build.xml
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring-xquery/build.xml?rev=672710&r1=672709&r2=672710&view=diff
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring-xquery/build.xml 
(original)
+++ activemq/camel/trunk/examples/camel-example-spring-xquery/build.xml Sun Jun 
29 22:50:24 2008
@@ -21,6 +21,7 @@
 
   <import file="../common_build.xml"/>
 
+  <fail unless="env.SPRING_HOME" message="You must download Spring Framework 
and set your SPRING_HOME to run this demo."/>
   <fail unless="env.ACTIVEMQ_HOME" message="You must download ActiveMQ and set 
your ACTIVEMQ_HOME to run this demo."/>
   <fail unless="env.SAXON_HOME" message="You must download Saxon and set your 
SAXON_HOME to run this demo."/>
   
@@ -29,6 +30,7 @@
   <property name="saxon.home" value="${env.SAXON_HOME}"/>
 
   <path id="sample.build.classpath">
+    <pathelement location="src/main/resources"/>
     <fileset dir="${camel.lib}">
       <include name="**/camel-saxon-*.jar"/>
       <include name="**/camel-jms-*.jar"/>
@@ -37,6 +39,7 @@
       <include name="**/saxon*.jar"/>
     </fileset>
     <path refid="camel.spring.classpath"/>
+    <path refid="spring.classpath"/>
     <path refid="activemq.classpath"/>
   </path>
 

Modified: activemq/camel/trunk/examples/camel-example-spring/build.xml
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring/build.xml?rev=672710&r1=672709&r2=672710&view=diff
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring/build.xml (original)
+++ activemq/camel/trunk/examples/camel-example-spring/build.xml Sun Jun 29 
22:50:24 2008
@@ -21,6 +21,7 @@
 
   <import file="../common_build.xml"/>
 
+  <fail unless="env.SPRING_HOME" message="You must download Spring Framework 
and set your SPRING_HOME to run this demo."/>
   <fail unless="env.ACTIVEMQ_HOME" message="You must download ActiveMQ and set 
your ACTIVEMQ_HOME to run this demo."/>
 
   <property name="project.name" value="camel-example-spring"/>
@@ -30,6 +31,7 @@
       <include name="**/camel-jms-*.jar"/>
       <exclude name="**/*-tests.jar"/>
     </fileset>
+    <path refid="spring.classpath"/>
     <path refid="camel.spring.classpath"/>
     <path refid="activemq.classpath"/>
   </path>

Modified: activemq/camel/trunk/examples/common_build.xml
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/examples/common_build.xml?rev=672710&r1=672709&r2=672710&view=diff
==============================================================================
--- activemq/camel/trunk/examples/common_build.xml (original)
+++ activemq/camel/trunk/examples/common_build.xml Sun Jun 29 22:50:24 2008
@@ -35,6 +35,8 @@
   <property name="hibernate.core.home" value="${env.HIBERNATE_CORE_HOME}"/>
   <property name="hibernate.entitymanager.home" 
value="${env.HIBERNATE_EM_HOME}"/>
   <property name="hsqldb.home" value="${env.HSQLDB_HOME}"/>
+  <property name="aspectj.home" value="${env.ASPECTJ_HOME}"/>
+  <property name="spring.home" value="${env.SPRING_HOME}"/>
 
   <condition property="build.src">
     <available file="${build.src.dir}"/>
@@ -57,6 +59,7 @@
       <include name="**/geronimo-jms_*_spec-*.jar"/>
       <include name="**/activemq-core-*.jar"/>
       <include name="**/backport-util-concurrent-*.jar"/>
+      <include name="**/optional/xbean-*.jar"/>
     </fileset>
   </path>
 
@@ -80,6 +83,18 @@
     </fileset>
   </path>
 
+  <path id="aspectj.classpath">
+    <fileset dir="${aspectj.home}/lib">
+      <include name="**/aspectj*.jar"/>
+    </fileset>
+  </path>
+
+  <path id="spring.classpath">
+    <fileset dir="${spring.home}/dist">
+      <include name="spring.jar"/>
+    </fileset>
+  </path>
+
   <path id="log4j.classpath">
     <fileset dir="${camel.lib}">
       <include name="**/log4j-*.jar"/>


Reply via email to