| <?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="QADefectsClient" default="dist" basedir="."> |
| <description> |
| Ant build file for Wink Client example QADefects |
| </description> |
| |
| <property name="example.jar.name" value="QADefects-client.jar" /> |
| <property file="build.properties" /> |
| |
| |
| <!-- set global properties for this build --> |
| <property name="src" location="src" /> |
| <property name="build" location="build" /> |
| <property name="build.classes" location="${build}/classes" /> |
| <property name="client.base" location="${basedir}/../../.." /> |
| <property name="client.lib" location="${client.base}/lib" /> |
| <property name="client.dist" location="${client.base}/dist" /> |
| <property name="client.jar" location="${client.dist}/${client.jar.name}" /> |
| <property name="common.jar" location="${client.dist}/${common.jar.name}" /> |
| <property name="example.jar" location="${basedir}/${example.jar.name}" /> |
| <property name="main" location="${basedir}/src/main" /> |
| <property name="resources" location="${main}/resources" /> |
| |
| |
| <target name="init"> |
| <!-- Create the time stamp --> |
| <tstamp /> |
| <!-- Create the build directory structure used by compile --> |
| <mkdir dir="${build.classes}" /> |
| </target> |
| |
| |
| <target name="compile" depends="init" description="compile the source "> |
| <!-- Set classpath for client lib --> |
| <path id="client.classpath"> |
| <fileset dir="${client.lib}" includes="**/*.jar" /> |
| <pathelement path="${common.jar}" /> |
| <pathelement path="${client.jar}" /> |
| </path> |
| |
| <!-- Compile the java code from ${src} into ${build} --> |
| <javac srcdir="${src}" destdir="${build.classes}"> |
| <classpath refid="client.classpath" /> |
| </javac> |
| </target> |
| |
| <target name="dist" depends="compile" description="generate the distribution"> |
| <manifestclasspath property="jar.classpath" jarfile="${example.jar}" maxParentLevels="10"> |
| <classpath> |
| <fileset dir="${client.lib}" includes="*.jar" /> |
| <fileset dir="${client.dist}"> |
| <include name="${common.jar.name}"/> |
| <include name="${client.jar.name}"/> |
| </fileset> |
| </classpath> |
| </manifestclasspath> |
| |
| <!-- Create the jar file --> |
| <jar destfile="${example.jar}" basedir="${build.classes}"> |
| <manifest> |
| <attribute name="Main-Class" value="org.apache.wink.example.QADefectsClient" /> |
| <attribute name="Class-Path" value="${jar.classpath}" /> |
| </manifest> |
| </jar> |
| </target> |
| |
| |
| <target name="clean" description="clean up"> |
| <!-- Delete the ${build} and ${dist} directory trees --> |
| <delete dir="${build}" /> |
| <delete file="${example.jar}" /> |
| </target> |
| |
| |
| <target name="run" depends="dist"> |
| <java classname="org.apache.wink.example.QADefectsClient"> |
| <classpath> |
| <fileset dir="${client.lib}" includes="**/*.jar" /> |
| <fileset dir="${client.dist}" includes="**/*.jar" /> |
| <fileset dir="." includes="**/*.jar" /> |
| </classpath> |
| </java> |
| </target> |
| |
| </project> |