blob: 9fd46d9fcc1c158662fefbfb1cdc10099b0d601c [file] [log] [blame]
<?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
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.
<project name="camel-example-reportincident" default="run" basedir=".">
<import file="../common_build.xml"/>
<fail unless="env.CXF_HOME" message="You must download CXF and set your CXF_HOME to run this demo."/>
<fail unless="env.SPRING_HOME" message="You must download Spring2.5 and set your CXF_HOME to run this demo."/>
<fail unless="env.JETTY_HOME" message="You must download Jetty6 and set your JETTY_HOME to run this demo."/>
<property name="" value="camel-example-reportincident"/>
<property name="jetty.home" value="${env.JETTY_HOME}"/>
<path id="jetty.classpath">
<fileset dir="${jetty.home}/lib">
<include name="jetty*.jar"/>
<include name="**/jetty-client-*.jar"/>
<path id="">
<fileset dir="${camel.lib}">
<include name="**/camel-cxf-*.jar"/>
<include name="**/camel-http-*.jar"/>
<include name="**/camel-jetty-*.jar"/>
<exclude name="**/*-tests.jar"/>
<path refid="camel.spring.classpath"/>
<path refid="spring.classpath"/>
<path refid="jetty.classpath"/>
<path refid="camel.core.classpath"/>
<path refid="cxf.classpath"/>
<property name="cxf.home" value="${env.CXF_HOME}"/>
<path id="cxf.classpath">
<fileset dir="${cxf.home}">
<include name="**/cxf-*.jar"/>
<target name="generate.code">
<echo level="info" message="Generating code using wsdl2java..."/>
<wsdl2java file="src/main/resources/report_incident.wsdl"/>
<target name="run" depends="generate.code,build"
description="Compile and run the sample of reportincident component">
<camelrun mainClass="org.apache.camel.example.reportincident.ReportIncidentRoutes" />
<available property="wsdl.dir" value="${build.resources.dir}" file="${build.resources.dir}/report_incident.wsdl" />
<property name="wsdl.dir" location="."/>
<macrodef name="wsdl2java">
<attribute name="srcdestdir" default="${build.dir}/generated/src/main/java"/>
<attribute name="destdir" default="${build.classes.dir}"/>
<attribute name="file"/>
<attribute name="dir" default="${wsdl.dir}"/>
<mkdir dir="@{destdir}"/>
<mkdir dir="@{srcdestdir}"/>
<java failonerror="true" classname="" fork="yes">
<path refid="cxf.classpath" />
<sysproperty key="exitOnFinish" value="true"/>
<arg value="-verbose"/>
<arg value="-d"/>
<arg value="@{srcdestdir}"/>
<arg value="@{dir}/@{file}"/>