Path: blob/main/databases/cassandra4/files/maven/build-rat.xml
16465 views
<?xml version="1.0" encoding="UTF-8" standalone="no"?>1<!--2Licensed to the Apache Software Foundation (ASF) under one or more3contributor license agreements. See the NOTICE file distributed with4this work for additional information regarding copyright ownership.5The ASF licenses this file to You under the Apache License, Version 2.06(the "License"); you may not use this file except in compliance with7the License. You may obtain a copy of the License at89http://www.apache.org/licenses/LICENSE-2.01011Unless required by applicable law or agreed to in writing, software12distributed under the License is distributed on an "AS IS" BASIS,13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.14See the License for the specific language governing permissions and15limitations under the License.16-->17<project basedir="." name="apache-cassandra--rat-tasks"18xmlns:rat="antlib:org.apache.rat.anttasks">1920<!--21License audit tool22-->2324<target name="_rat_init" depends="resolver-init">25<typedef uri="antlib:org.apache.rat.anttasks" classpathref="rat.classpath"/>26</target>2728<target name="_build_ratinclude" depends="_rat_init">29<exec executable="git" failifexecutionfails="false" failonerror="false" resultproperty="git.success" output="build/.versioned_files">30<arg line="ls-tree -r HEAD --name-only"/>31</exec>32<condition property="rat.skip" value="true">33<not>34<equals arg1="${git.success}" arg2="0"/>35</not>36</condition>37<copy file="build/.versioned_files" tofile="build/.ratinclude">38<filterchain>39<linecontainsregexp>40<regexp pattern=".*\.(java|py|sh|xml|spec|md|iml|bat|btm|cql|css|g|html|jflex|jks|mod|name|pom|textile|yml|yaml|MIDRES|HIGHRES|LOWRES)$"/>41</linecontainsregexp>42</filterchain>43</copy>44</target>4546<target name="rat-check" depends="_build_ratinclude" unless="${rat.skip}" description="License checks on source" >47<rat:report reportFile="${build.dir}/rat.txt">48<fileset dir="." includesfile="build/.ratinclude">49<!-- Config files with not much creativity -->50<exclude name="**/ide/**/*"/>51<exclude name="**/metrics-reporter-config-sample.yaml"/>52<exclude name="**/cassandra.yaml"/>53<exclude name="**/cassandra-murmur.yaml"/>54<exclude name="**/cassandra-seeds.yaml"/>55<exclude NAME="**/doc/antora.yml"/>56<exclude name="**/test/conf/cassandra.yaml"/>57<exclude name="**/test/conf/cassandra_deprecated_parameters_names.yaml"/>58<exclude name="**/test/conf/cassandra_encryption.yaml"/>59<exclude name="**/test/conf/cdc.yaml"/>60<exclude name="**/test/conf/commitlog_compression_LZ4.yaml"/>61<exclude name="**/test/conf/commitlog_compression_Zstd.yaml"/>62<exclude name="**/test/conf/system_keyspaces_directory.yaml"/>63<exclude name="**/test/conf/sstableloader_with_encryption.yaml"/>64<exclude name="**/test/conf/unit-test-conf/test-native-port.yaml"/>65<exclude name="**/test/data/jmxdump/cassandra-3.0-jmx.yaml"/>66<exclude name="**/test/data/jmxdump/cassandra-3.11-jmx.yaml"/>67<exclude name="**/test/data/jmxdump/cassandra-4.0-jmx.yaml"/>68<exclude name="**/tools/cqlstress-counter-example.yaml"/>69<exclude name="**/tools/cqlstress-example.yaml"/>70<exclude name="**/tools/cqlstress-insanity-example.yaml"/>71<exclude name="**/tools/cqlstress-lwt-example.yaml"/>72<!-- Documentation files -->73<exclude NAME="**/doc/modules/**/*"/>74<!-- NOTICE files -->75<exclude NAME="**/NOTICE.md"/>76<!-- LICENSE files -->77<exclude NAME="**/LICENSE.md"/>78</fileset>79</rat:report>80<exec executable="grep" outputproperty="rat.failed.files" failifexecutionfails="false">81<arg line="-A5 'Unapproved licenses' ${build.dir}/rat.txt"/>82</exec>83<fail message="Some files have missing or incorrect license information. Check RAT report in ${build.dir}/rat.txt for more details! \n ${rat.failed.files}">84<condition>85<and>86<not>87<resourcecontains resource="${build.dir}/rat.txt" substring="0 Unknown Licenses" casesensitive="false" />88</not>89</and>90</condition>91</fail>92</target>9394<target name="_assert_rat_output">95<fail message="The rat report at build/rat.txt was not generated. Please ensure that the rat-check task is able to run successfully. For dev builds only, touch build/rat.txt to skip this check">96<condition>97<not>98<available file="build/rat.txt" />99</not>100</condition>101</fail>102</target>103104</project>105106107