Package com.microsoft.azure.maven
Class AbstractAppServiceMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- com.microsoft.azure.maven.AbstractAzureMojo
-
- com.microsoft.azure.maven.AbstractAppServiceMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
public abstract class AbstractAppServiceMojo extends AbstractAzureMojo
Base abstract class for all Azure App Service Mojos.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.microsoft.azure.maven.AbstractAzureMojo
AbstractAzureMojo.DefaultUncaughtExceptionHandler, AbstractAzureMojo.RunnableWithException
-
-
Field Summary
Fields Modifier and Type Field Description protected StringappNameApp Service name.protected com.microsoft.azure.toolkit.lib.appservice.AzureAppServiceappServiceClientprotected StringappServicePlanNameApp Service Plan name.protected StringappServicePlanResourceGroupResource group of App Service Plan.protected PropertiesappSettingsApplication settings of App Service, in the form of name-value pairs.protected com.microsoft.azure.toolkit.lib.legacy.appservice.DeploymentSlotSettingdeploymentSlotSettingDeployment Slot.protected StringdeploymentTypeDeployment type to deploy Web App or Function App.protected static StringMAVEN_PLUGIN_POSTFIXprotected static StringPORTAL_URL_PATTERNprotected StringresourceGroupResource group of App Service.-
Fields inherited from class com.microsoft.azure.maven.AbstractAzureMojo
allowTelemetry, auth, 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
-
-
Constructor Summary
Constructors Constructor Description AbstractAppServiceMojo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAppName()StringgetAppServicePlanName()StringgetAppServicePlanResourceGroup()MapgetAppSettings()com.microsoft.azure.toolkit.lib.legacy.appservice.DeploymentSlotSettinggetDeploymentSlotSetting()StringgetDeploymentStagingDirectoryPath()com.microsoft.azure.toolkit.lib.legacy.appservice.DeploymentTypegetDeploymentType()protected com.microsoft.azure.toolkit.lib.appservice.AzureAppServicegetOrCreateAzureAppServiceClient()protected static StringgetPortalUrl(com.azure.core.management.AzureEnvironment azureEnvironment)StringgetResourceGroup()StringgetResourcePortalUrl(String id)List<DeploymentResource>getResources()protected voidprintCurrentSubscription(com.microsoft.azure.toolkit.lib.appservice.AzureAppService appServiceClient)voidsetDeploymentSlot(com.microsoft.azure.toolkit.lib.legacy.appservice.DeploymentSlotSetting slotSetting)-
Methods inherited from class com.microsoft.azure.maven.AbstractAzureMojo
afterMojoExecution, beforeMojoExecution, checkSubscription, doExecute, execute, executeWithTimeRecorder, getActualAuthType, getAuthType, getAzureAccount, getBuildDirectoryAbsolutePath, getHttpProxyPort, getInstallationId, getPluginName, getPluginVersion, getTargetSubscriptionId, getTelemetryProperties, getUserAgent, highlightDefaultValue, infoWithMultipleLines, initTelemetryProxy, isSkipMojo, login, onMojoError, onSkipped, printCredentialDescription, selectSubscription, selectSubscription, trackMojoFailure, updateTelemetryProperties
-
-
-
-
Field Detail
-
MAVEN_PLUGIN_POSTFIX
protected static final String MAVEN_PLUGIN_POSTFIX
- See Also:
- Constant Field Values
-
PORTAL_URL_PATTERN
protected static final String PORTAL_URL_PATTERN
- See Also:
- Constant Field Values
-
resourceGroup
@Parameter(property="resourceGroup", required=false) protected String resourceGroupResource group of App Service. It will be created if it doesn't exist.
-
appName
@Parameter(property="appName", required=false) protected String appNameApp Service name. It will be created if it doesn't exist.
-
deploymentType
@Parameter(property="deploymentType") protected String deploymentType
Deployment type to deploy Web App or Function App. Supported values for Web App:- FTP -
<resources>specifies configurations for this kind of deployment. - ZIP -
<resources>specifies configurations for this kind of deployment. - WAR -
<warFile>and<path>specifies configurations for this kind of deployment. - JAR -
<jarFile>and<path>specifies configurations for this kind of deployment. - AUTO - inspects
<packaging>of the Maven project and uses WAR, JAR - NONE - does nothing
- * defaults to AUTO if nothing is specified
- MSDEPLOY
- FTP
- ZIP
- * defaults to ZIP if nothing is specified
- Since:
- 0.1.0
- FTP -
-
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
App Service Plan name. It will be created if it doesn't exist.
-
deploymentSlotSetting
@Parameter(alias="deploymentSlot") protected com.microsoft.azure.toolkit.lib.legacy.appservice.DeploymentSlotSetting deploymentSlotSetting
Deployment Slot. It will be created if it does not exist. It requires the web app exists already.
-
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
-
-
Method Detail
-
getResourceGroup
public String getResourceGroup()
-
getAppName
public String getAppName()
-
getAppServicePlanResourceGroup
public String getAppServicePlanResourceGroup()
-
getAppServicePlanName
public String getAppServicePlanName()
-
getAppSettings
public Map getAppSettings()
-
getDeploymentType
public com.microsoft.azure.toolkit.lib.legacy.appservice.DeploymentType getDeploymentType() throws com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException- Throws:
com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException
-
getDeploymentSlotSetting
public com.microsoft.azure.toolkit.lib.legacy.appservice.DeploymentSlotSetting getDeploymentSlotSetting()
-
getResources
public List<DeploymentResource> getResources()
-
getDeploymentStagingDirectoryPath
public String getDeploymentStagingDirectoryPath()
-
setDeploymentSlot
public void setDeploymentSlot(com.microsoft.azure.toolkit.lib.legacy.appservice.DeploymentSlotSetting slotSetting)
-
getPortalUrl
protected static String getPortalUrl(com.azure.core.management.AzureEnvironment azureEnvironment)
-
getOrCreateAzureAppServiceClient
protected com.microsoft.azure.toolkit.lib.appservice.AzureAppService getOrCreateAzureAppServiceClient()
-
printCurrentSubscription
protected void printCurrentSubscription(com.microsoft.azure.toolkit.lib.appservice.AzureAppService appServiceClient)
-
-