1<?xml version="1.0" encoding="UTF-8"?> 2<!--*********************************************************** 3 * 4 * Licensed to the Apache Software Foundation (ASF) under one 5 * or more contributor license agreements. See the NOTICE file 6 * distributed with this work for additional information 7 * regarding copyright ownership. The ASF licenses this file 8 * to you under the Apache License, Version 2.0 (the 9 * "License"); you may not use this file except in compliance 10 * with the License. You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, 15 * software distributed under the License is distributed on an 16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 * KIND, either express or implied. See the License for the 18 * specific language governing permissions and limitations 19 * under the License. 20 * 21 ***********************************************************--> 22<project name="Check OpenOffice License Files" default="buildsources" 23 xmlns:rat="antlib:org.apache.rat.anttasks" 24 xmlns="antlib:org.apache.tools.ant"> 25 <description> 26 Check over Apache OpenOffice source files for license headers. 27 </description> 28 <property name="version" value="AOO 4.2.0"/> 29 <property environment="env"/> 30 <property name="src-dir" location="${env.SRC_ROOT}/.."/> 31 32 <!-- Run the rat scan on a fileset whose ecludes are defined by main/rat-excludes. 33 Note that ant adds a list of default excludes like **/*~ or **/.svn. 34 For the complete list see here: http://ant.apache.org/manual/dirtasks.html#defaultexcludes 35 --> 36 <target name="buildsources" 37 depends="taskdef" 38 description="runs the tasks over OpenOffice tree."> 39 <tstamp> 40 <format property="scan.time" pattern="MM/dd/yyyy hh:mm aa"/> 41 </tstamp> 42 <echo level="info"> 43 Timestamp: ${scan.time} 44 </echo> 45 <rat:report format="xml" reportFile="${RAT_SCAN_OUTPUT}"> 46 <fileset dir="${src-dir}" id="included-files"> 47 <excludesfile name="${src-dir}/main/rat-excludes"/> 48 <excludesfile name="${src-dir}/main/rat-excludes-solver"/> 49 <exclude name=".buildbot-sourcedata"/> 50 </fileset> 51 </rat:report> 52 </target> 53 54 <!-- The negative file list of files that are excluded from scanning. 55 It can be used to control the exclude list. 56 --> 57 <fileset dir="${src-dir}" id="excluded-files"> 58 <includesfile name="${src-dir}/main/rat-excludes"/> 59 <include name=".buildbot-sourcedata"/> 60 </fileset> 61 <fileset dir="${src-dir}" id="excluded-solver"> 62 <includesfile name="${src-dir}/main/rat-excludes-solver"/> 63 </fileset> 64 <property name="excluded-files-property" refid="excluded-files"/> 65 <property name="excluded-solver-property" refid="excluded-solver"/> 66 <target name="show-excluded-files" 67 depends="taskdef" 68 description="create a list of the files excluded from the rat scan."> 69 <echo file="${EXCLUDED_FILES_OUTPUT}" append="false"> 70Excluded files (without local or global solvers) 71------------------------------------------------ 72 73 </echo> 74 <echo file="${EXCLUDED_FILES_OUTPUT}" append="true"> 75${excluded-files-property} 76 </echo> 77 <echo file="${EXCLUDED_FILES_OUTPUT}" append="true"> 78 79 80Excluded files of local and global solvers 81------------------------------------------ 82 83 </echo> 84 <echo file="${EXCLUDED_SOLVER_OUTPUT}" append="true"> 85 ${excluded-solver-property} 86 </echo> 87 </target> 88 89 <!-- Import the rat scan as ant command. 90 --> 91 <target name="taskdef"> 92 <typedef resource="org/apache/rat/anttasks/antlib.xml" 93 uri="antlib:org.apache.rat.anttasks"> 94 <classpath> 95 <fileset dir="${RAT_JAR_HOME}"> 96 <include name="**/apache-rat*.jar"/> 97 <include name="**/commons-*.jar"/> 98 </fileset> 99 </classpath> 100 </typedef> 101 </target> 102 103</project> 104