apache-rat-tasks/run-antunit.xml (43 lines of code) (raw):

<?xml version='1.0'?> <!-- 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="AntUnit Tests for Rat Ant Tasks" default="antunit"> <property name="jar.name" location="target/classes"/> <property name="antunit.dir" location="src/test/resources/antunit"/> <path id="test-classpath"> <pathelement location="${jar.name}"/> <pathelement location="../apache-rat-core/target/classes"/> <pathelement location="../apache-rat-api/target/classes"/> <pathelement location="target/test-classes"/> <pathelement location="${user.home}/.m2/repository/org/apache/ant/ant-antunit/1.4.1/ant-antunit-1.4.1.jar"/> <pathelement location="${user.home}/.m2/repository/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar"/> <pathelement location="${user.home}/.m2/repository/commons-cli/commons-cli/1.5.0/commons-cli-1.3.1.jar"/> <pathelement location="${user.home}/.m2/repository/org/apache/commons/commons-collections4/4.4/commons-collections4-4.4.jar"/> <pathelement location="${user.home}/.m2/repository/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar"/> <pathelement location="${user.home}/.m2/repository/commons-beanutils/commons-beanutils/1.9.4/commons-beanutils-1.9.4.jar"/> </path> <property name="test.classpath" refid="test-classpath"/> <target name="antunit"> <subant> <fileset dir="${antunit.dir}" includes="report-*.xml"/> <property name="jar.name" value="${jar.name}"/> <property name="test.classpath" value="${test.classpath}"/> </subant> </target> <target name="prepare-ant-run"> <fail unless="file">Must specify "file" property</fail> <ant antfile="${file}"> <property name="jar.name" value="${jar.name}"/> <property name="test.classpath" value="${test.classpath}"/> </ant> </target> <target name="run-single-test"> <ant antfile="${antunit.dir}/${file}" dir="${antunit.dir}" target="${target}"> <property name="jar.name" value="${jar.name}"/> <property name="test.classpath" value="${test.classpath}"/> </ant> </target> </project>