Class AbstractFunctionMojo

  • All Implemented Interfaces:
    com.microsoft.azure.maven.auth.AuthConfiguration, com.microsoft.azure.maven.telemetry.TelemetryConfiguration, org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
    Direct Known Subclasses:
    AddMojo, DeployMojo, ListMojo, PackageMojo, RunMojo

    public abstract class AbstractFunctionMojo
    extends com.microsoft.azure.maven.AbstractAppServiceMojo
    • 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 appInsightsInstance  
      protected String appInsightsKey  
      private static String DISABLE_APP_INSIGHTS_KEY  
      protected boolean disableAppInsights  
      protected String finalName  
      private static String FUNCTION_DEPLOY_TO_SLOT_KEY  
      private static String FUNCTION_IS_DOCKER_KEY  
      private static String FUNCTION_JAVA_VERSION_KEY  
      private static String FUNCTION_PRICING_KEY  
      private static String FUNCTION_REGION_KEY  
      private static String FUNCTION_RUNTIME_KEY  
      protected File outputDirectory  
      protected String pricingTier
      App Service pricing tier, which will only be used to create Functions App at the first time.
      protected String region
      App Service region, which will only be used to create App Service at the first time.
      protected com.microsoft.azure.toolkit.lib.legacy.function.configurations.RuntimeConfiguration runtime  
      protected boolean skip
      Skip execution.
      protected static String TRIGGER_TYPE  
      • Fields inherited from class com.microsoft.azure.maven.AbstractAppServiceMojo

        appName, appServiceClient, appServicePlanName, appServicePlanResourceGroup, appSettings, deploymentSlotSetting, deploymentType, MAVEN_PLUGIN_POSTFIX, PORTAL_URL_PATTERN, resourceGroup
      • Fields inherited from class com.microsoft.azure.maven.AbstractAzureMojo

        allowTelemetry, auth, authentication, authType, buildDirectory, DEPLOY, failsOnError, httpProxyHost, httpProxyPort, 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 getAppInsightsInstance()  
      String getAppInsightsKey()  
      String getFinalName()  
      com.microsoft.azure.toolkit.lib.appservice.service.IFunctionApp getFunctionApp()  
      String getRegion()  
      com.microsoft.azure.toolkit.lib.legacy.function.configurations.RuntimeConfiguration getRuntimeConfiguration()  
      Map<String,​String> getTelemetryProperties()  
      boolean isDisableAppInsights()  
      protected boolean isSkipMojo()  
      protected void validateAppName()  
      • Methods inherited from class com.microsoft.azure.maven.AbstractAppServiceMojo

        getAppName, getAppServicePlanName, getAppServicePlanResourceGroup, getAppSettings, getDeploymentSlotSetting, getDeploymentStagingDirectoryPath, getDeploymentType, getOrCreateAzureAppServiceClient, getPortalUrl, getResourceGroup, getResourcePortalUrl, getResources, printCurrentSubscription, setDeploymentSlot
      • Methods inherited from class com.microsoft.azure.maven.AbstractAzureMojo

        afterMojoExecution, beforeMojoExecution, checkSubscription, doExecute, execute, executeWithTimeRecorder, getActualAuthType, getAuthenticationSetting, getAuthType, getAzureAccount, getAzureClient, getBuildDirectoryAbsolutePath, getHttpProxyHost, getHttpProxyPort, getInstallationId, getMavenResourcesFiltering, getOrCreateAzureClient, getPluginName, getPluginVersion, getProject, getSession, getSessionId, getSettings, getSubscriptionId, getTargetSubscriptionId, getTelemetries, getTelemetryProxy, getUserAgent, highlightDefaultValue, infoWithMultipleLines, initTelemetryProxy, isAllowTelemetry, isFailsOnError, login, onMojoError, onSkipped, printCredentialDescription, printCurrentSubscription, selectSubscription, selectSubscription, trackMojoFailure
      • Methods inherited from class org.apache.maven.plugin.AbstractMojo

        getLog, getPluginContext, setLog, setPluginContext
    • Field Detail

      • pricingTier

        @Parameter(property="functions.pricingTier")
        protected String pricingTier
        App Service pricing tier, which will only be used to create Functions App at the first time.

        Below is the list of supported pricing tier:

        • F1
        • D1
        • B1
        • B2
        • B3
        • S1
        • S2
        • S3
        • P1V2
        • P2V2
        • P3V2
      • finalName

        @Parameter(defaultValue="${project.build.finalName}",
                   readonly=true,
                   required=true)
        protected String finalName
      • outputDirectory

        @Parameter(defaultValue="${project.build.outputDirectory}",
                   readonly=true,
                   required=true)
        protected File outputDirectory
      • skip

        @Parameter(property="functions.skip",
                   defaultValue="false")
        protected boolean skip
        Skip execution.
        Since:
        0.1.0
      • region

        @Parameter(property="functions.region",
                   defaultValue="westeurope")
        protected String region
        App Service region, which will only be used to create App Service at the first time.
      • runtime

        @Parameter(property="functions.runtime")
        protected com.microsoft.azure.toolkit.lib.legacy.function.configurations.RuntimeConfiguration runtime
      • appInsightsInstance

        @Parameter(property="functions.appInsightsInstance")
        protected String appInsightsInstance
      • appInsightsKey

        @Parameter(property="functions.appInsightsKey")
        protected String appInsightsKey
      • disableAppInsights

        @Parameter(property="functions.disableAppInsights",
                   defaultValue="false")
        protected boolean disableAppInsights
    • Constructor Detail

      • AbstractFunctionMojo

        public AbstractFunctionMojo()
    • Method Detail

      • getRegion

        public String getRegion()
      • isSkipMojo

        protected boolean isSkipMojo()
        Overrides:
        isSkipMojo in class com.microsoft.azure.maven.AbstractAzureMojo
      • getFinalName

        public String getFinalName()
      • getAppInsightsInstance

        public String getAppInsightsInstance()
      • getAppInsightsKey

        public String getAppInsightsKey()
      • isDisableAppInsights

        public boolean isDisableAppInsights()
      • getFunctionApp

        public com.microsoft.azure.toolkit.lib.appservice.service.IFunctionApp getFunctionApp()
      • getRuntimeConfiguration

        public com.microsoft.azure.toolkit.lib.legacy.function.configurations.RuntimeConfiguration getRuntimeConfiguration()
      • validateAppName

        protected void validateAppName()
      • getTelemetryProperties

        public Map<String,​String> getTelemetryProperties()
        Specified by:
        getTelemetryProperties in interface com.microsoft.azure.maven.telemetry.TelemetryConfiguration
        Overrides:
        getTelemetryProperties in class com.microsoft.azure.maven.AbstractAzureMojo