protected Authenticated getAuthObjFromServerId ( final Settings settings , final String serverId ) { if ( StringUtils . isEmpty ( serverId ) ) { getLog ( ) . debug ( SERVER_ID_NOT_CONFIG ) ; return null ; } final Server server = Utils . getServer ( settings , serverId ) ; try { assureServerExist ( server , serverId ) ; } catch ( MojoExecutionException ex ) { getLog ( ) . error ( ex . getMessage ( ) ) ; return null ; } final ApplicationTokenCredentials credential = getAppTokenCredentialsFromServer ( server ) ; if ( credential == null ) { getLog ( ) . error ( AZURE_AUTH_INVALID + serverId ) ; return null ; } final Authenticated auth = azureConfigure ( ) . authenticate ( credential ) ; if ( auth != null ) { getLog ( ) . info ( AUTH_WITH_SERVER_ID + serverId ) ; } return auth ; }
Get Authenticated object by referencing server definition in Maven settings . xml