diff --git a/.gitignore b/.gitignore
index f2f8aaa3663e9..2b9951a88f4de 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,31 +3,30 @@
# This is typically in files named 'src.xml' throughout this repository.
# Ignore files generated by the Gradle build process.
-.gradle/
-.gogradle/
-build/
-vendor/
-.gradletasknamecache
+**/.gradle/**/*
+**/.gogradle/**/*
+**/build/**/*
+**/vendor/**/*
+**/.gradletasknamecache
# Ignore files generated by the Maven build process.
-bin/
-dependency-reduced-pom.xml
-target/
+**/bin/**/*
+**/dependency-reduced-pom.xml
+**/target/**/*
# Ignore generated archetypes
sdks/java/maven-archetypes/examples/src/main/resources/archetype-resources/src/
sdks/java/maven-archetypes/examples-java8/src/main/resources/archetype-resources/src/
# Ignore files generated by the Python build process.
-*.py[cod]
-*.egg-info/
-.eggs/
-nose-*.egg/
-.tox/
-build/
-dist/
-distribute-*
-env/
+**/*.py[cod]
+**/*.egg-info/
+**/.eggs/
+**/nose-*.egg/
+**/.tox/**/*
+**/dist/**/*
+**/distribute-*/**/*
+**/env/**/*
sdks/python/**/*.c
sdks/python/**/*.so
sdks/python/**/*.egg
@@ -37,32 +36,32 @@ sdks/python/README.md
sdks/python/apache_beam/portability/api/*pb2*.*
# Ignore IntelliJ files.
-.idea/
-*.iml
-*.ipr
-*.iws
+**/.idea/**/*
+**/*.iml
+**/*.ipr
+**/*.iws
# Ignore Eclipse files.
-.classpath
-.project
-.factorypath
-.checkstyle
-.fbExcludeFilterFile
-.apt_generated/
-.settings/
+**/.classpath
+**/.project
+**/.factorypath
+**/.checkstyle
+**/.fbExcludeFilterFile
+**/.apt_generated/**/*
+**/.settings/**/*
# Ignore Visual Studio Code files.
-.vscode/
+**/.vscode/**/*
# Hotspot VM leaves this log in a non-target directory when java crashes
-hs_err_pid*.log
+**/hs_err_pid*.log
# Ignore files that end with '~', since they are most likely auto-save files
# produced by a text editor.
-*~
+**/*~
# Ignore MacOSX files.
-.DS_Store
+**/.DS_Store/**/*
# NOTE: if you modify this file, you probably need to modify the file set that
# is an input to 'maven-assembly-plugin' that generates source distribution.
diff --git a/build.gradle b/build.gradle
index 98ce50145a043..ea19fac7e8d3c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -187,10 +187,10 @@ rat {
failOnError = true
excludes = [
// Exclude files generated by the Gradle build process
- "**/.gradle/**",
- "**/.gogradle/**",
- "**/build/**",
- "**/vendor/**",
+ "**/.gradle/**/*",
+ "**/.gogradle/**/*",
+ "**/build/**/*",
+ "**/vendor/**/*",
"**/.gradletasknamecache",
// .gitignore: Ignore files generated by the Maven build process
@@ -206,12 +206,12 @@ rat {
"**/.eggs/**/*",
"**/nose-*.egg/**/*",
"**/.tox/**/*",
- "**/build/**/*",
"**/dist/**/*",
"**/distribute-*/**/*",
"**/env/**/*",
"sdks/python/**/*.c",
"sdks/python/**/*.so",
+ "sdks/python/**/*.egg",
"sdks/python/LICENSE",
"sdks/python/NOTICE",
"sdks/python/README.md",
@@ -233,7 +233,7 @@ rat {
"**/.settings/**/*",
// .gitignore: Ignore Visual Studio Code files.
- "**/.vscode/*/**",
+ "**/.vscode/**/*",
// .gitignore: Hotspot VM leaves this log in a non-target directory when java crashes
"**/hs_err_pid*.log",
diff --git a/pom.xml b/pom.xml
index 987a995fd71c3..e25ee7287afdd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1642,68 +1642,10 @@
false
true
true
-
-
-
- **/target/**/*
- **/bin/**/*
- **/dependency-reduced-pom.xml
-
-
- **/*.pyc
- **/*.pyo
- **/*.pyd
- **/*.egg-info/**/*
- **/.eggs/**/*
- **/nose-*.egg/**/*
- **/.tox/**/*
- **/build/**/*
- **/dist/**/*
- **/distribute-*/**/*
- **/env/**/*
- sdks/python/**/*.c
- sdks/python/**/*.so
- sdks/python/LICENSE
- sdks/python/NOTICE
- sdks/python/README.md
- sdks/python/apache_beam/portability/api/*pb2*.*
-
-
- **/.idea/**/*
- **/*.iml
- **/*.ipr
- **/*.iws
-
-
- **/.classpath
- **/.project
- **/.factorypath
- **/.checkstyle
- **/.fbExcludeFilterFile
- **/.apt_generated/**/*
- **/.settings/**/*
-
-
- **/.vscode/*/**
-
-
- **/hs_err_pid*.log
-
-
- **/*~
-
-
- **/.DS_Store/**/*
-
-
+
+
+
.github/**/*
**/package-list
@@ -1711,9 +1653,7 @@
**/test/resources/**/*.txt
**/test/**/.placeholder
-
-
-
+
**/apache_beam/portability/api/*_pb2*.py
**/go/pkg/beam/model/**/*.pb.go