@@ -4,6 +4,8 @@ import net.nemerosa.versioning.SCMInfo
44import net.nemerosa.versioning.SCMInfoService
55import net.nemerosa.versioning.VersioningExtension
66import org.gradle.api.Project
7+ import org.gradle.api.logging.Logger
8+ import org.gradle.api.logging.Logging
79import org.tmatesoft.svn.core.SVNDepth
810import org.tmatesoft.svn.core.SVNDirEntry
911import org.tmatesoft.svn.core.SVNException
@@ -14,6 +16,8 @@ import org.tmatesoft.svn.core.wc.*
1416
1517class SVNInfoService implements SCMInfoService {
1618
19+ private static final Logger LOGGER = Logging . getLogger(this . getClass())
20+
1721 @Override
1822 SCMInfo getInfo (Project project , VersioningExtension extension ) {
1923 // Is SVN enabled?
@@ -130,7 +134,7 @@ class SVNInfoService implements SCMInfoService {
130134 }
131135 // Gets the list of tags
132136 String tagsUrl = " ${ baseUrl} /tags"
133- println " [version] Getting list of tags from ${ tagsUrl} ..."
137+ LOGGER . info( " [version] Getting list of tags from ${ tagsUrl} ..." )
134138 // Gets the list
135139 List<SVNDirEntry > entries = []
136140 try {
@@ -179,15 +183,15 @@ class SVNInfoService implements SCMInfoService {
179183 protected static SVNClientManager getClientManager (VersioningExtension extension ) {
180184 def clientManager = SVNClientManager . newInstance()
181185 if (extension. user && extension. password) {
182- println " [version] Authenticating with ${ extension.user} "
183- clientManager. setAuthenticationManager(BasicAuthenticationManager . newInstance(extension. user, extension. password. toCharArray()));
186+ LOGGER . info( " [version] Authenticating with ${ extension.user} " )
187+ clientManager. setAuthenticationManager(BasicAuthenticationManager . newInstance(extension. user, extension. password. toCharArray()))
184188 // The BasicAuthenticationManager trusts the certificates by default
185189 } else if (extension. trustServerCert) {
186- println " [version] Trusting certificate by default"
187- println " [version] WARNING The `trustServerCert` is now deprecated - and should not be used any longer."
188- clientManager. setAuthenticationManager(BasicAuthenticationManager . newInstance(new SVNAuthentication [0 ]));
190+ LOGGER . info( " [version] Trusting certificate by default" )
191+ LOGGER . warn( " [version] WARNING The `trustServerCert` is now deprecated - and should not be used any longer." )
192+ clientManager. setAuthenticationManager(BasicAuthenticationManager . newInstance(new SVNAuthentication [0 ]))
189193 } else {
190- println " [version] Using default SVN configuration"
194+ LOGGER . info( " [version] Using default SVN configuration" )
191195 clientManager. setAuthenticationManager(SVNWCUtil . createDefaultAuthenticationManager())
192196 }
193197 return clientManager
0 commit comments