Class AbstractFunctionMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- com.microsoft.azure.maven.AbstractAzureMojo
-
- com.microsoft.azure.maven.appservice.AbstractAppServiceMojo
-
- com.microsoft.azure.maven.function.AbstractFunctionMojo
-
- All Implemented Interfaces:
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.appservice.AbstractAppServiceMojo
-
-
Field Summary
Fields Modifier and Type Field Description protected StringappInsightsInstanceName of the application insight instance, must be in the same resource group with function app.protected StringappInsightsKeyInstrumentation key of the application insights instanceprivate static StringDISABLE_APP_INSIGHTS_KEYprotected booleandisableAppInsightsBoolean flag to monitor the Function App with application insightsprotected StringfinalNameprivate static StringFUNCTION_DEPLOY_TO_SLOT_KEYprivate static StringFUNCTION_IS_DOCKER_KEYprivate static StringFUNCTION_JAVA_VERSION_KEYprivate static StringFUNCTION_PRICING_KEYprivate static StringFUNCTION_REGION_KEYprivate static StringFUNCTION_RUNTIME_KEYprotected FileoutputDirectoryprotected ConfigParserparserprotected StringpricingTierPricing for function appprotected StringregionRegion for function app Supported values: westus, westus2, eastus, eastus2, northcentralus, southcentralus, westcentralus, canadacentral, canadaeast, brazilsouth, northeurope, westeurope, uksouth, eastasia, southeastasia, japaneast, japanwest, australiaeast, australiasoutheast, centralindia, southindia ...protected com.microsoft.azure.toolkit.lib.legacy.function.configurations.RuntimeConfigurationruntimeRuntime environment of function appprotected booleanskipBoolean flag to skip the execution of maven plugin for azure functionsprotected static StringTRIGGER_TYPE-
Fields inherited from class com.microsoft.azure.maven.appservice.AbstractAppServiceMojo
appName, appServiceClient, appServicePlanName, appServicePlanResourceGroup, appSettings, deploymentSlotSetting, MAVEN_PLUGIN_POSTFIX, resourceGroup
-
Fields inherited from class com.microsoft.azure.maven.AbstractAzureMojo
allowTelemetry, auth, authType, buildDirectory, failsOnError, 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
-
-
Constructor Summary
Constructors Constructor Description AbstractFunctionMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAppInsightsInstance()StringgetAppInsightsKey()StringgetFinalName()StringgetRegion()com.microsoft.azure.toolkit.lib.legacy.function.configurations.RuntimeConfigurationgetRuntimeConfiguration()Map<String,String>getTelemetryProperties()booleanisDisableAppInsights()protected booleanisSkipMojo()protected voidvalidateAppName()-
Methods inherited from class com.microsoft.azure.maven.appservice.AbstractAppServiceMojo
getAppName, getAppServicePlanName, getAppServicePlanResourceGroup, getAppSettings, getDeploymentSlotSetting, getDeploymentStagingDirectoryPath, getResourceGroup, getResources, initAzureAppServiceClient, printCurrentSubscription
-
Methods inherited from class com.microsoft.azure.maven.AbstractAzureMojo
afterMojoExecution, beforeMojoExecution, checkSubscription, doExecute, execute, executeWithTimeRecorder, getActualAuthType, getBuildDirectoryAbsolutePath, getInstallationId, getMavenResourcesFiltering, getPluginName, getPluginVersion, getProject, getSession, getSessionId, getSettings, getSubscriptionId, getTargetSubscriptionId, getTelemetries, getTelemetryProxy, getUserAgent, highlightDefaultValue, infoWithMultipleLines, initTelemetryProxy, isAllowTelemetry, isFailsOnError, loginAzure, loginAzure, onMojoError, onSkipped, printCredentialDescription, selectSubscription, selectSubscription, trackMojoFailure, updateTelemetryProperties
-
-
-
-
Field Detail
-
FUNCTION_JAVA_VERSION_KEY
private static final String FUNCTION_JAVA_VERSION_KEY
- See Also:
- Constant Field Values
-
DISABLE_APP_INSIGHTS_KEY
private static final String DISABLE_APP_INSIGHTS_KEY
- See Also:
- Constant Field Values
-
FUNCTION_RUNTIME_KEY
private static final String FUNCTION_RUNTIME_KEY
- See Also:
- Constant Field Values
-
FUNCTION_IS_DOCKER_KEY
private static final String FUNCTION_IS_DOCKER_KEY
- See Also:
- Constant Field Values
-
FUNCTION_REGION_KEY
private static final String FUNCTION_REGION_KEY
- See Also:
- Constant Field Values
-
FUNCTION_PRICING_KEY
private static final String FUNCTION_PRICING_KEY
- See Also:
- Constant Field Values
-
FUNCTION_DEPLOY_TO_SLOT_KEY
private static final String FUNCTION_DEPLOY_TO_SLOT_KEY
- See Also:
- Constant Field Values
-
TRIGGER_TYPE
protected static final String TRIGGER_TYPE
- See Also:
- Constant Field Values
-
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
-
pricingTier
@Parameter(property="functions.pricingTier") protected String pricingTier
Pricing for function appSupported values : CONSUMPTION, B1, B2, B3, S1, S2, S3, P1V2, P2V2, P3V2, P1V3, P2V3, P3V3, EP1, EP2, EP3
-
skip
@Parameter(property="functions.skip", defaultValue="false") protected boolean skipBoolean flag to skip the execution of maven plugin for azure functions- Since:
- 0.1.0
-
region
@Parameter(property="functions.region") protected String region
Region for function app Supported values: westus, westus2, eastus, eastus2, northcentralus, southcentralus, westcentralus, canadacentral, canadaeast, brazilsouth, northeurope, westeurope, uksouth, eastasia, southeastasia, japaneast, japanwest, australiaeast, australiasoutheast, centralindia, southindia ...- Since:
- 1.2.0
-
runtime
@Parameter(property="functions.runtime") protected com.microsoft.azure.toolkit.lib.legacy.function.configurations.RuntimeConfiguration runtime
Runtime environment of function appProperties for Windows/Linux function app
- os: Operating system for the function App, default to be Windows.
- javaVersion: Java runtime version the function App, supported values are `Java 8`, `Java 11` and `Java 17`, default to be `Java 8`.
Properties for Docker function app<runtime> <os>windows</os> <javaVersion>Java 8</javaVersion> </runtime>- image: Name of the docker image to deploy.
- registryUrl: Docker repository of the image, could be omitted for docker hub.
- serverId: The authentication profile id in maven settings.xml. For private docker image, please set your username and password in maven settings.xml and refer it with `serverId` in runtime configuration.
<runtime> <os>docker</os> <image>[hub-user/]repo-name[:tag]</image> <serverId></serverId> <registryUrl></registryUrl> <!- could be omitted for docker hub images --> </runtime>- Since:
- 1.4.0
-
appInsightsInstance
@Parameter(property="functions.appInsightsInstance") protected String appInsightsInstance
Name of the application insight instance, must be in the same resource group with function app. Will be skipped if `appInsightsKey` is specified- Since:
- 1.6.0
-
appInsightsKey
@Parameter(property="functions.appInsightsKey") protected String appInsightsKey
Instrumentation key of the application insights instance- Since:
- 1.6.0
-
disableAppInsights
@Parameter(property="functions.disableAppInsights", defaultValue="false") protected boolean disableAppInsightsBoolean flag to monitor the Function App with application insights- Since:
- 1.6.0
-
parser
protected ConfigParser parser
-
-
Method Detail
-
getRegion
public String getRegion()
-
isSkipMojo
protected boolean isSkipMojo()
- Overrides:
isSkipMojoin classcom.microsoft.azure.maven.AbstractAzureMojo
-
getFinalName
public String getFinalName()
-
getAppInsightsInstance
public String getAppInsightsInstance()
-
getAppInsightsKey
public String getAppInsightsKey()
-
isDisableAppInsights
public boolean isDisableAppInsights()
-
getRuntimeConfiguration
public com.microsoft.azure.toolkit.lib.legacy.function.configurations.RuntimeConfiguration getRuntimeConfiguration()
-
validateAppName
protected void validateAppName()
-
-