You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/04/13 15:08:14 UTC

[GitHub] [beam] mxm commented on a change in pull request #11399: Interpolate publish credentials as expected for Maven settings.xml

mxm commented on a change in pull request #11399: Interpolate publish credentials as expected for Maven settings.xml
URL: https://github.com/apache/beam/pull/11399#discussion_r407527196
 
 

 ##########
 File path: buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
 ##########
 @@ -600,9 +600,10 @@ class BeamModulePlugin implements Plugin<Project> {
                   ? 'apache.releases.https' : 'apache.snapshots.https')
           def m2SettingCreds = new XmlSlurper().parse(settingsXml).servers.server.find { server -> serverId.equals(server.id.text()) }
           if (m2SettingCreds) {
+            def GroovyShell shell = new GroovyShell(new Binding([env:System.getenv()]))
             credentials {
-              username m2SettingCreds.username.text()
-              password m2SettingCreds.password.text()
+              username shell.evaluate('"' + m2SettingCreds.username.text() +'"')
+              password shell.evaluate('"' + m2SettingCreds.password.text() +'"')
 
 Review comment:
   Does this not change the semantics from using the username/password found in the settings to interpreting them as environment variables names and loading them from the environment? If so, shouldn't this be configurable?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services