Class RunMojo
- 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
-
- com.microsoft.azure.maven.function.RunMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="run") public class RunMojo extends AbstractFunctionMojo
Run Azure Java Functions locally. Azure Functions Core Tools is required to be installed first.
-
-
Field Summary
Fields Modifier and Type Field Description private static org.apache.maven.artifact.versioning.ComparableVersionFUNC_3protected static StringFUNC_CMDprotected static StringFUNC_HOST_START_CMDprivate static StringFUNC_HOST_START_WITH_DEBUG_CMDprivate static StringFUNC_VERSION_CMDprivate static StringFUNCTION_CORE_TOOLS_OUT_OF_DATEprivate static org.apache.maven.artifact.versioning.ComparableVersionJAVA_9protected StringlocalDebugConfigConfig String for local debugprivate static org.apache.maven.artifact.versioning.ComparableVersionMINIMUM_JAVA_9_SUPPORTED_VERSIONprivate static org.apache.maven.artifact.versioning.ComparableVersionMINIMUM_JAVA_9_SUPPORTED_VERSION_V2protected static StringRUN_FUNCTIONS_FAILUREprivate static StringRUNTIME_FOUNDprotected static StringRUNTIME_NOT_FOUNDprivate static StringSTAGE_DIR_FOUNDprivate static StringSTAGE_DIR_NOT_FOUND-
Fields inherited from class com.microsoft.azure.maven.function.AbstractFunctionMojo
appInsightsInstance, appInsightsKey, disableAppInsights, finalName, outputDirectory, parser, pricingTier, region, runtime, skip, TRIGGER_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 RunMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcheckRuntimeCompatibility(com.microsoft.azure.toolkit.lib.legacy.function.handlers.CommandHandler handler)protected voidcheckRuntimeExistence(com.microsoft.azure.toolkit.lib.legacy.function.handlers.CommandHandler handler)protected voidcheckStageDirectoryExistence()protected voiddoExecute()protected StringgetCheckRuntimeCommand()StringgetLocalDebugConfig()protected StringgetStartFunctionHostCommand()protected StringgetStartFunctionHostWithDebugCommand()protected voidrunFunctions(com.microsoft.azure.toolkit.lib.legacy.function.handlers.CommandHandler handler)voidsetLocalDebugConfig(String localDebugConfig)-
Methods inherited from class com.microsoft.azure.maven.function.AbstractFunctionMojo
getAppInsightsInstance, getAppInsightsKey, getFinalName, getRegion, getRuntimeConfiguration, getTelemetryProperties, isDisableAppInsights, isSkipMojo, validateAppName
-
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, 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
-
FUNC_CMD
protected static final String FUNC_CMD
- See Also:
- Constant Field Values
-
FUNC_HOST_START_CMD
protected static final String FUNC_HOST_START_CMD
- See Also:
- Constant Field Values
-
RUN_FUNCTIONS_FAILURE
protected static final String RUN_FUNCTIONS_FAILURE
- See Also:
- Constant Field Values
-
RUNTIME_NOT_FOUND
protected static final String RUNTIME_NOT_FOUND
- See Also:
- Constant Field Values
-
STAGE_DIR_FOUND
private static final String STAGE_DIR_FOUND
- See Also:
- Constant Field Values
-
STAGE_DIR_NOT_FOUND
private static final String STAGE_DIR_NOT_FOUND
- See Also:
- Constant Field Values
-
RUNTIME_FOUND
private static final String RUNTIME_FOUND
- See Also:
- Constant Field Values
-
FUNC_HOST_START_WITH_DEBUG_CMD
private static final String FUNC_HOST_START_WITH_DEBUG_CMD
- See Also:
- Constant Field Values
-
JAVA_9
private static final org.apache.maven.artifact.versioning.ComparableVersion JAVA_9
-
FUNC_3
private static final org.apache.maven.artifact.versioning.ComparableVersion FUNC_3
-
MINIMUM_JAVA_9_SUPPORTED_VERSION
private static final org.apache.maven.artifact.versioning.ComparableVersion MINIMUM_JAVA_9_SUPPORTED_VERSION
-
MINIMUM_JAVA_9_SUPPORTED_VERSION_V2
private static final org.apache.maven.artifact.versioning.ComparableVersion MINIMUM_JAVA_9_SUPPORTED_VERSION_V2
-
FUNC_VERSION_CMD
private static final String FUNC_VERSION_CMD
- See Also:
- Constant Field Values
-
FUNCTION_CORE_TOOLS_OUT_OF_DATE
private static final String FUNCTION_CORE_TOOLS_OUT_OF_DATE
- See Also:
- Constant Field Values
-
localDebugConfig
@Parameter(property="localDebugConfig", defaultValue="transport=dt_socket,server=y,suspend=n,address=5005") protected String localDebugConfigConfig String for local debug- Since:
- 1.0.0-beta-7
-
-
Method Detail
-
getLocalDebugConfig
public String getLocalDebugConfig()
-
setLocalDebugConfig
public void setLocalDebugConfig(String localDebugConfig)
-
doExecute
protected void doExecute() throws com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException- Specified by:
doExecutein classcom.microsoft.azure.maven.AbstractAzureMojo- Throws:
com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException
-
checkStageDirectoryExistence
protected void checkStageDirectoryExistence() throws com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException- Throws:
com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException
-
checkRuntimeExistence
protected void checkRuntimeExistence(com.microsoft.azure.toolkit.lib.legacy.function.handlers.CommandHandler handler) throws com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException- Throws:
com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException
-
runFunctions
protected void runFunctions(com.microsoft.azure.toolkit.lib.legacy.function.handlers.CommandHandler handler) throws com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException- Throws:
com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException
-
checkRuntimeCompatibility
private void checkRuntimeCompatibility(com.microsoft.azure.toolkit.lib.legacy.function.handlers.CommandHandler handler) throws com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException- Throws:
com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException
-
getCheckRuntimeCommand
protected String getCheckRuntimeCommand()
-
getStartFunctionHostCommand
protected String getStartFunctionHostCommand()
-
getStartFunctionHostWithDebugCommand
protected String getStartFunctionHostWithDebugCommand()
-
-