Class AbstractAppServiceMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    public abstract class AbstractAppServiceMojo
    extends com.microsoft.azure.maven.AbstractAzureMojo
    Base abstract class for all Azure App Service Mojos.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.microsoft.azure.maven.AbstractAzureMojo

        com.microsoft.azure.maven.AbstractAzureMojo.DefaultUncaughtExceptionHandler, com.microsoft.azure.maven.AbstractAzureMojo.RunnableWithException
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected String appName
      Name of the app service.
      protected com.microsoft.azure.toolkit.lib.appservice.AzureAppService appServiceClient  
      protected String appServicePlanName
      Name of the app service plan.
      protected String appServicePlanResourceGroup
      Resource group of app service plan.
      protected Properties appSettings
      Application settings of App Service, in the form of name-value pairs.
      protected com.microsoft.azure.toolkit.lib.legacy.appservice.DeploymentSlotSetting deploymentSlotSetting
      Configuration for deployment Slot, will create new slot if target does not exist.
      protected static String MAVEN_PLUGIN_POSTFIX  
      protected String resourceGroup
      Name of the resource group.
      • Fields inherited from class com.microsoft.azure.maven.AbstractAzureMojo

        allowTelemetry, auth, authType, buildDirectory, COMPILE_LEVEL_NOT_SUPPORTED, FAILED_TO_GET_VALID_RUNTIMES, failsOnError, failsOnRuntimeValidationError, INSTALLATION_ID_KEY, mavenResourcesFiltering, plugin, PLUGIN_NAME_KEY, PLUGIN_VERSION_KEY, project, session, SESSION_ID_KEY, settings, settingsDecrypter, SUBSCRIPTION_ID_KEY, SUBSCRIPTION_NOT_FOUND, SUBSCRIPTION_TEMPLATE, subscriptionId, telemetries, telemetryProxy, USING_AZURE_ENVIRONMENT
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String getAppName()  
      String getAppServicePlanName()  
      String getAppServicePlanResourceGroup()  
      Map getAppSettings()  
      String getDeploymentStagingDirectoryPath()  
      String getResourceGroup()  
      List<com.microsoft.azure.maven.model.DeploymentResource> getResources()  
      protected com.microsoft.azure.toolkit.lib.appservice.AzureAppService initAzureAppServiceClient()  
      protected void printCurrentSubscription​(com.microsoft.azure.toolkit.lib.appservice.AzureAppService appServiceClient)  
      • Methods inherited from class com.microsoft.azure.maven.AbstractAzureMojo

        afterMojoExecution, beforeMojoExecution, checkSubscription, doExecute, execute, executeWithTimeRecorder, getActualAuthType, getAllowTelemetry, getBuildDirectoryAbsolutePath, getCompileLevel, getFailsOnError, getFailsOnRuntimeValidationError, getInstallationId, getMavenResourcesFiltering, getPluginName, getPluginVersion, getProject, getSession, getSessionId, getSettings, getSubscriptionId, getTargetSubscriptionId, getTelemetries, getTelemetryProperties, getTelemetryProxy, getUserAgent, getValidRuntimes, highlightDefaultValue, infoWithMultipleLines, initTelemetryProxy, isSkipMojo, loginAzure, loginAzure, onMojoError, onSkipped, printCredentialDescription, selectSubscription, selectSubscription, trackMojoFailure, updateTelemetryProperties, validateArtifactCompileVersion
      • Methods inherited from class org.apache.maven.plugin.AbstractMojo

        getLog, getPluginContext, setLog, setPluginContext
    • Field Detail

      • resourceGroup

        @Parameter(property="resourceGroup",
                   required=false)
        protected String resourceGroup
        Name of the resource group. It will be created if it doesn't exist.
      • appName

        @Parameter(property="appName",
                   required=false)
        protected String appName
        Name of the app service. It will be created if it doesn't exist.
      • appServicePlanResourceGroup

        @Parameter(property="appServicePlanResourceGroup")
        protected String appServicePlanResourceGroup
        Resource group of app service plan. It will be created if it doesn't exist.
      • appServicePlanName

        @Parameter(property="appServicePlanName")
        protected String appServicePlanName
        Name of the app service plan. It will be created if it doesn't exist.
      • deploymentSlotSetting

        @Parameter(alias="deploymentSlot")
        protected com.microsoft.azure.toolkit.lib.legacy.appservice.DeploymentSlotSetting deploymentSlotSetting
        Configuration for deployment Slot, will create new slot if target does not exist.

        Require the web app exists already.

        Parameters for deployment slot

        • name: Specifies the name for deployment slot.
        • configurationSource: Specifies the configuration source of new created deployment slot, could be parent or existing deployment slot name, default value is parent
         
         <deploymentSlotSetting>
             <name>Slot-Name</name>
             <configurationSource>Source</configurationSource>
         </deploymentSlotSetting>
         
         
      • appSettings

        @Parameter
        protected Properties appSettings
        Application settings of App Service, in the form of name-value pairs.
         
         <appSettings>
                 <property>
                         <name>setting-name</name>
                         <value>setting-value</value>
                 </property>
         </appSettings>
         
         
      • appServiceClient

        protected com.microsoft.azure.toolkit.lib.appservice.AzureAppService appServiceClient
    • Constructor Detail

      • AbstractAppServiceMojo

        public AbstractAppServiceMojo()
    • Method Detail

      • getResourceGroup

        public String getResourceGroup()
      • getAppName

        public String getAppName()
      • getAppServicePlanResourceGroup

        public String getAppServicePlanResourceGroup()
      • getAppServicePlanName

        public String getAppServicePlanName()
      • getAppSettings

        public Map getAppSettings()
      • getResources

        public List<com.microsoft.azure.maven.model.DeploymentResource> getResources()
      • getDeploymentStagingDirectoryPath

        public String getDeploymentStagingDirectoryPath()
      • initAzureAppServiceClient

        protected com.microsoft.azure.toolkit.lib.appservice.AzureAppService initAzureAppServiceClient()
      • printCurrentSubscription

        protected void printCurrentSubscription​(com.microsoft.azure.toolkit.lib.appservice.AzureAppService appServiceClient)