mirror of https://github.com/apache/lucene.git
Cleaning up minor things in rat task.
This commit is contained in:
parent
0e686c6701
commit
e6d85cd4bc
|
@ -21,11 +21,11 @@ import groovy.xml.NamespaceBuilder
|
|||
|
||||
configure(rootProject) {
|
||||
configurations {
|
||||
rat
|
||||
ratDeps
|
||||
}
|
||||
|
||||
dependencies {
|
||||
rat "org.apache.rat:apache-rat"
|
||||
ratDeps "org.apache.rat:apache-rat"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,23 +34,23 @@ allprojects {
|
|||
group = 'Verification'
|
||||
description = 'Runs Apache Rat checks.'
|
||||
}
|
||||
}
|
||||
|
||||
if (project == rootProject) {
|
||||
configure(rootProject) {
|
||||
rat {
|
||||
includes += [
|
||||
"buildSrc/**/*.java",
|
||||
"lucene/tools/forbiddenApis/**",
|
||||
"lucene/tools/prettify/**",
|
||||
// "dev-tools/**"
|
||||
]
|
||||
excludes += [
|
||||
// Unclear if this needs ASF header, depends on how much was copied from ElasticSearch
|
||||
"**/ErrorReportingTestListener.java"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (project.path == ":lucene:analysis:common") {
|
||||
configure(project(":lucene:analysis:common")) {
|
||||
rat {
|
||||
srcExcludes += [
|
||||
"**/*.aff",
|
||||
|
@ -59,64 +59,51 @@ allprojects {
|
|||
"**/*LuceneResourcesWikiPage.html"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (project.path == ":lucene:analysis:kuromoji") {
|
||||
configure(project(":lucene:analysis:kuromoji")) {
|
||||
rat {
|
||||
srcExcludes += [
|
||||
// whether rat detects this as binary or not is platform dependent?!
|
||||
"**/bocchan.utf-8"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (project.path == ":lucene:analysis:opennlp") {
|
||||
configure(project(":lucene:analysis:opennlp")) {
|
||||
rat {
|
||||
excludes += [
|
||||
"src/tools/test-model-data/*.txt",
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (project.path == ":lucene:highlighter") {
|
||||
configure(project(":lucene:highlighter")) {
|
||||
rat {
|
||||
srcExcludes += [
|
||||
"**/CambridgeMA.utf8"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (project.path == ":lucene:suggest") {
|
||||
configure(project(":lucene:suggest")) {
|
||||
rat {
|
||||
srcExcludes += [
|
||||
"**/Top50KWiki.utf8",
|
||||
"**/stop-snowball.txt"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (project.path == ":lucene:tools") {
|
||||
rat {
|
||||
includes += [
|
||||
"forbiddenApis/**",
|
||||
"prettify/**",
|
||||
// If/when :lucene:tools becomes a gradle project, then the following line will fail
|
||||
// It is safe to remove it, but also remove the check for lucene/tools in rootProject above
|
||||
"javadoc/ecj.javadocs.prefs"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (project.path == ":solr:core") {
|
||||
configure(project(":solr:core")) {
|
||||
rat {
|
||||
srcExcludes += [
|
||||
"**/htmlStripReaderTest.html"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (project.path == ":solr:webapp") {
|
||||
configure(project(":solr:webapp")) {
|
||||
rat {
|
||||
includes = [ "**" ]
|
||||
excludes += [
|
||||
|
@ -126,7 +113,6 @@ allprojects {
|
|||
"build/**",
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Structure inspired by existing task from Apache Kafka, heavily modified since then.
|
||||
|
@ -154,7 +140,7 @@ class RatTask extends DefaultTask {
|
|||
|
||||
def generateXmlReport() {
|
||||
def uri = 'antlib:org.apache.rat.anttasks'
|
||||
def ratClasspath = project.rootProject.configurations.rat.asPath
|
||||
def ratClasspath = project.rootProject.configurations.ratDeps.asPath
|
||||
ant.taskdef(resource: 'org/apache/rat/anttasks/antlib.xml', uri: uri, classpath: ratClasspath)
|
||||
|
||||
def rat = NamespaceBuilder.newInstance(ant, uri)
|
||||
|
|
Loading…
Reference in New Issue