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