Skip to content

Commit a9aecb6

Browse files
committed
Add support to run the Apache Rat plugin
Add gradle generated files to .gitignore
1 parent a4d9f5f commit a9aecb6

File tree

6 files changed

+156
-1
lines changed

6 files changed

+156
-1
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
# is an input to 'maven-assembly-plugin' that generates source distribution.
33
# This is typically in files named 'src.xml' throughout this repository.
44

5+
# Ignore files generated by the Gradle build process.
6+
.gradle/
7+
build/
8+
59
# Ignore files generated by the Maven build process.
610
bin/
711
dependency-reduced-pom.xml

build.gradle

+80
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ allprojects {
143143

144144
buildscript {
145145
repositories {
146+
mavenLocal()
146147
mavenCentral()
147148
maven {
148149
url "https://plugins.gradle.org/m2/"
@@ -155,6 +156,7 @@ buildscript {
155156
classpath "net.ltgt.gradle:gradle-apt-plugin:0.12"
156157
classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.1"
157158
classpath "io.spring.gradle:propdeps-plugin:0.0.9.RELEASE"
159+
classpath "gradle.plugin.org.nosphere.apache:creadur-rat-gradle:0.3.1"
158160
}
159161
}
160162

@@ -248,5 +250,83 @@ subprojects {
248250
}
249251
}
250252

253+
// Apply one top level rat plugin to perform any required analysis
254+
apply plugin: "org.nosphere.apache.rat"
255+
rat {
256+
plainOutput = true
257+
xmlOutput = false
258+
htmlOutput = false
259+
failOnError = true
260+
excludes = [
261+
// Exclude files generated by the Gradle build process
262+
"**/.gradle/**",
263+
"**/build/**",
264+
265+
// .gitignore: Ignore files generated by the Maven build process
266+
"**/target/**/*",
267+
"**/bin/**/*",
268+
"**/dependency-reduced-pom.xml",
269+
270+
// .gitignore: Ignore files generated by the Python build process
271+
"**/*.pyc",
272+
"**/*.pyo",
273+
"**/*.pyd",
274+
"**/*.egg-info/**/*",
275+
"**/.eggs/**/*",
276+
"**/nose-*.egg/**/*",
277+
"**/.tox/**/*",
278+
"**/build/**/*",
279+
"**/dist/**/*",
280+
"**/distribute-*/**/*",
281+
"**/env/**/*",
282+
"sdks/python/**/*.c",
283+
"sdks/python/**/*.so",
284+
"sdks/python/LICENSE",
285+
"sdks/python/NOTICE",
286+
"sdks/python/README.md",
287+
"sdks/python/apache_beam/portability/api/*pb2*.*",
288+
289+
// .gitignore: Ignore IntelliJ files.
290+
"**/idea/**/*",
291+
"**/*.iml",
292+
"**/*.ipr",
293+
"**/*.iws",
294+
295+
// .gitignore: Ignore Eclipse files.
296+
"**/.classpath",
297+
"**/.project",
298+
"**/.factorypath",
299+
"**/.checkstyle",
300+
"**/.fbExcludeFilterFile",
301+
"**/.apt_generated/**/*",
302+
"**/.settings/**/*",
303+
304+
// .gitignore: Ignore Visual Studio Code files.
305+
"**/.vscode/*/**",
251306

307+
// .gitignore: Hotspot VM leaves this log in a non-target directory when java crashes
308+
"**/hs_err_pid*.log",
252309

310+
// .gitignore: Ignore files that end with '~', since they
311+
// are most likely auto-save files produced by a text editor.
312+
"**/*~",
313+
314+
// .gitignore: Ignore MacOSX files.
315+
"**/.DS_Store/**/*",
316+
317+
// Ignore files we track but do not distribute
318+
".github/**/*",
319+
320+
"**/package-list",
321+
"**/user.avsc",
322+
"**/test/resources/**/*.txt",
323+
"**/test/**/.placeholder",
324+
325+
// Default eclipse excludes neglect subprojects
326+
327+
// Proto/grpc generated wrappers
328+
"**/apache_beam/portability/api/*_pb2*.py",
329+
"**/go/pkg/beam/model/**/*.pb.go",
330+
]
331+
}
332+
check.dependsOn rat

gradle/wrapper/gradle-wrapper.properties

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
################################################################################
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
################################################################################
118
distributionBase=GRADLE_USER_HOME
219
distributionPath=wrapper/dists
320
zipStoreBase=GRADLE_USER_HOME

gradlew

+18
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
#!/usr/bin/env sh
2+
################################################################################
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
################################################################################
19+
220

321
##############################################################################
422
##

gradlew.bat

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
@rem ################################################################################
2+
@rem # Licensed to the Apache Software Foundation (ASF) under one
3+
@rem # or more contributor license agreements. See the NOTICE file
4+
@rem # distributed with this work for additional information
5+
@rem # regarding copyright ownership. The ASF licenses this file
6+
@rem # to you under the Apache License, Version 2.0 (the
7+
@rem # "License"); you may not use this file except in compliance
8+
@rem # with the License. You may obtain a copy of the License at
9+
@rem #
10+
@rem # http://www.apache.org/licenses/LICENSE-2.0
11+
@rem #
12+
@rem # Unless required by applicable law or agreed to in writing, software
13+
@rem # distributed under the License is distributed on an "AS IS" BASIS,
14+
@rem # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
@rem # See the License for the specific language governing permissions and
16+
@rem # limitations under the License.
17+
@rem ################################################################################
18+
119
@if "%DEBUG%" == "" @echo off
220
@rem ##########################################################################
321
@rem

settings.gradle

+19-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* License); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an AS IS BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
119
rootProject.name = 'beam-parent'
220
include ':beam-sdks-java-build-tools'
321
include ':beam-model-parent:beam-model-pipeline'
@@ -143,4 +161,4 @@ project(':beam-runners-parent').projectDir = "$rootDir/runners" as File
143161
project(':beam-examples-parent:beam-examples-java').projectDir = "$rootDir/examples/java" as File
144162
project(':beam-examples-parent:beam-examples-java8').projectDir = "$rootDir/examples/java8" as File
145163
project(':beam-examples-parent').projectDir = "$rootDir/examples" as File
146-
project(':beam-sdks-java-javadoc').projectDir = "$rootDir/sdks/java/javadoc" as File
164+
project(':beam-sdks-java-javadoc').projectDir = "$rootDir/sdks/java/javadoc" as File

0 commit comments

Comments
 (0)