This is an automated email from the ASF dual-hosted git repository. toulmean pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-tuweni.git
commit f933af09a3090d91949e3e4b004863e4383da05c Author: Antoine Toulme <toulm...@apache.org> AuthorDate: Sun Apr 21 23:40:11 2019 -0700 Add logging to credentials logic --- build.gradle | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index dfe1ba8..be5973e 100644 --- a/build.gradle +++ b/build.gradle @@ -287,17 +287,25 @@ allprojects { url = isRelease ? snapshotsRepoUrl : releasesRepoUrl def settingsXml = new File(System.getProperty('user.home'), '.m2/settings.xml') + + def credentialsFound = false; if (settingsXml.exists()) { + project.logger.info('Using .m2/settings.xml') def serverId = (project.properties['distMgmtServerId'] ?: isRelease ? 'apache.releases.https' : 'apache.snapshots.https') def m2SettingCreds = new XmlSlurper().parse(settingsXml).servers.server.find { server -> serverId.equals(server.id.text()) } if (m2SettingCreds) { + project.logger.info('Found matching credentials from .m2/settings.xml') credentials { username m2SettingCreds.username.text() password m2SettingCreds.password.text() } + credentialsFound = true } - } else { + } + + if (!credentialsFound) { + project.logger.info('Reading credentials from environment') credentials { username System.getenv('NEXUS_USER') password System.getenv('NEXUS_PASSWORD') --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@tuweni.apache.org For additional commands, e-mail: commits-h...@tuweni.apache.org