try vendor java guard
diff --git a/buildSrc/src/main/groovy/org/apache/beam/gradle/VendorJavaPlugin.groovy b/buildSrc/src/main/groovy/org/apache/beam/gradle/VendorJavaPlugin.groovy
index f6a581b..832b34d 100644
--- a/buildSrc/src/main/groovy/org/apache/beam/gradle/VendorJavaPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/beam/gradle/VendorJavaPlugin.groovy
@@ -86,7 +86,9 @@
 
       // plugin to support repository authentication via ~/.m2/settings.xml
       // https://github.com/mark-vieira/gradle-maven-settings-plugin/
-      project.apply plugin: 'net.linguica.maven-settings'
+      if (isRelease(project) || project.hasProperty('publishing')) {
+        project.apply plugin: 'net.linguica.maven-settings'
+      }
 
       // Projects should only depend on the shadowJar output
       project.jar.enabled = false