tweise 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_r407857668
 
 

 ##########
 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:
   @lukecwik I found a plugin with Apache license that achieves what is 
required. PTAL.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to