| <?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. |
| --> |
| <!-- $Revision: 579817 $ $Date: 2007-09-26 14:56:30 -0700 (Wed, 26 Sep 2007) $ --> |
| |
| <project name="Test OpenEJB" default="download" basedir="."> |
| |
| <property name="maven.repo" value="${user.home}/.m2/repository"/> |
| <property name="tomcat.version" value="6.0.32"/> |
| |
| <target name="download"> |
| |
| <condition property="tomcat.url" value="http://archive.apache.org/dist/tomcat/tomcat-7/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.zip"> |
| <matches pattern="^7\." string="${tomcat.version}"/> |
| </condition> |
| <condition property="tomcat.url" value="http://archive.apache.org/dist/tomcat/tomcat-6/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.zip"> |
| <matches pattern="^6\." string="${tomcat.version}"/> |
| </condition> |
| <condition property="tomcat.url" value="http://archive.apache.org/dist/tomcat/tomcat-5/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.zip"> |
| <matches pattern="^5\.5" string="${tomcat.version}"/> |
| </condition> |
| |
| <fail message="Unknown Tomcat version ${tomcat.version}" unless="tomcat.url"/> |
| |
| <property name="tomcat.file" value="${maven.repo}/org/apache/openejb/tck/tomcat/${tomcat.version}/tomcat-${tomcat.version}.zip"/> |
| |
| <antcall target="download.file"> |
| <param name="download.url" value="${tomcat.url}"/> |
| <param name="download.file" value="${tomcat.file}"/> |
| </antcall> |
| </target> |
| |
| <target name="download.uptodate"> |
| <available file="${download.file}" property="download.uptodate"/> |
| </target> |
| |
| <target name="download.file" depends="download.uptodate" unless="download.uptodate"> |
| <dirname property="download.dir" file="${download.file}"/> |
| <mkdir dir="${download.dir}"/> |
| <get src="${download.url}" dest="${download.file}"/> |
| </target> |
| </project> |