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_r407605687
##########
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 the gradle-maven-publish-auth plugin looks like a good fit, but
AFAIK the LGPL license would be in the way of using it (hard dependency in our
build system).
----------------------------------------------------------------
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