Class MavenSettingHelper


  • public class MavenSettingHelper
    extends Object
    • Constructor Detail

      • MavenSettingHelper

        private MavenSettingHelper()
    • Method Detail

      • buildAuthConfigurationByServerId

        public static MavenAuthConfiguration buildAuthConfigurationByServerId​(org.apache.maven.execution.MavenSession session,
                                                                              org.apache.maven.settings.crypto.SettingsDecrypter settingsDecrypter,
                                                                              String serverId)
                                                                       throws com.microsoft.azure.toolkit.lib.common.exception.InvalidConfigurationException,
                                                                              MavenDecryptException
        Build maven auth configuration from serverId.
        Parameters:
        session - the maven session
        settingsDecrypter - the decrypter
        serverId - the server id
        Returns:
        the auth configuration
        Throws:
        MavenDecryptException - when there are errors decrypting maven generated password
        com.microsoft.azure.toolkit.lib.common.exception.InvalidConfigurationException - where are any illegal configurations
      • getPropertyValue

        private static String getPropertyValue​(org.codehaus.plexus.util.xml.Xpp3Dom configuration,
                                               String property)
        Get string value from server configuration section in settings.xml.
        Parameters:
        configuration - the Xpp3Dom object representing the configuration in <server>.
        property - the property name
        Returns:
        String value if property exists; otherwise, return null.
      • isPropertyEncrypted

        private static boolean isPropertyEncrypted​(String value)