@Mojo(name="package",
defaultPhase=PACKAGE,
requiresDependencyResolution=RUNTIME)
public class PackageMojo
extends AbstractFunctionMojo
AbstractAzureMojo.DefaultUncaughtExceptionHandler, AbstractAzureMojo.RunnableWithException| Modifier and Type | Field and Description |
|---|---|
static String |
BUILD_SUCCESS |
private static String |
CAN_NOT_FIND_ARTIFACT |
static String |
COPY_JARS |
static String |
COPY_SUCCESS |
static String |
EXTENSION_BUNDLE |
private static String |
EXTENSION_BUNDLE_ID |
static String |
FOUND_FUNCTIONS |
static String |
FUNCTION_JSON |
private static com.microsoft.azure.common.function.bindings.BindingEnum[] |
FUNCTION_WITHOUT_FUNCTION_EXTENSION |
static String |
GENERATE_CONFIG |
static String |
GENERATE_DONE |
static String |
GENERATE_SKIP |
static String |
HOST_JSON |
static String |
INSTALL_EXTENSIONS |
static String |
INSTALL_EXTENSIONS_FINISH |
static String |
NO_FUNCTIONS |
static String |
SAVE_FUNCTION_JSON |
static String |
SAVE_FUNCTION_JSONS |
static String |
SAVE_HOST_JSON |
static String |
SAVE_SKIP |
static String |
SAVE_SUCCESS |
static String |
SEARCH_FUNCTIONS |
private static String |
SKIP_INSTALL_EXTENSIONS_BUNDLE |
static String |
SKIP_INSTALL_EXTENSIONS_HTTP |
static String |
VALIDATE_CONFIG |
static String |
VALIDATE_DONE |
static String |
VALIDATE_SKIP |
appInsightsInstance, appInsightsKey, disableAppInsights, finalName, outputDirectory, pricingTier, region, runtime, skip, TRIGGER_TYPEappName, appServicePlanName, appServicePlanResourceGroup, appSettings, deploymentSlotSetting, deploymentType, MAVEN_PLUGIN_POSTFIX, PORTAL_URL_PATTERN, resourceGroupallowTelemetry, 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_NOT_SPECIFIED, SUBSCRIPTION_TEMPLATE, subscriptionId, USING_AZURE_ENVIRONMENT| Constructor and Description |
|---|
PackageMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
copyHostJsonFile(com.fasterxml.jackson.databind.ObjectWriter objectWriter) |
protected void |
copyJarsToStageDirectory() |
private static void |
copyResources(org.apache.maven.project.MavenProject project,
org.apache.maven.execution.MavenSession session,
org.apache.maven.shared.filtering.MavenResourcesFiltering filtering,
List<org.apache.maven.model.Resource> resources,
String targetDirectory)
Copy resources to target directory using Maven resource filtering so that we don't have to handle
recursive directory listing and pattern matching.
|
protected void |
doExecute() |
protected Set<Method> |
findAnnotatedMethods(com.microsoft.azure.common.function.handlers.AnnotationHandler handler) |
protected com.microsoft.azure.common.function.handlers.AnnotationHandler |
getAnnotationHandler() |
private File |
getArtifactFile() |
protected URL |
getArtifactUrl() |
protected List<URL> |
getDependencyArtifactUrls() |
protected Set<com.microsoft.azure.common.function.bindings.BindingEnum> |
getFunctionBindingEnums(Map<String,com.microsoft.azure.common.function.configurations.FunctionConfiguration> configMap) |
protected Map<String,com.microsoft.azure.common.function.configurations.FunctionConfiguration> |
getFunctionConfigurations(com.microsoft.azure.common.function.handlers.AnnotationHandler handler,
Set<Method> methods) |
protected com.microsoft.azure.common.function.handlers.FunctionCoreToolsHandler |
getFunctionCoreToolsHandler(com.microsoft.azure.common.function.handlers.CommandHandler commandHandler) |
protected com.fasterxml.jackson.databind.ObjectWriter |
getObjectWriter() |
List<org.apache.maven.model.Resource> |
getResources() |
protected String |
getScriptFilePath() |
protected URL |
getTargetClassUrl() |
protected void |
installExtension(com.microsoft.azure.common.function.handlers.FunctionCoreToolsHandler handler,
Set<com.microsoft.azure.common.function.bindings.BindingEnum> bindingEnums) |
protected boolean |
isInstallingExtensionNeeded(Set<com.microsoft.azure.common.function.bindings.BindingEnum> bindingTypes) |
protected void |
promptCompileInfo() |
protected com.google.gson.JsonObject |
readHostJson() |
protected void |
trackFunctionProperties(Map<String,com.microsoft.azure.common.function.configurations.FunctionConfiguration> configMap) |
protected void |
validateFunctionConfigurations(Map<String,com.microsoft.azure.common.function.configurations.FunctionConfiguration> configMap) |
protected void |
writeFunctionJsonFile(com.fasterxml.jackson.databind.ObjectWriter objectWriter,
String functionName,
com.microsoft.azure.common.function.configurations.FunctionConfiguration config) |
protected void |
writeFunctionJsonFiles(com.fasterxml.jackson.databind.ObjectWriter objectWriter,
Map<String,com.microsoft.azure.common.function.configurations.FunctionConfiguration> configMap) |
protected void |
writeObjectToFile(com.fasterxml.jackson.databind.ObjectWriter objectWriter,
Object object,
File targetFile) |
getAppInsightsInstance, getAppInsightsKey, getFinalName, getFunctionApp, getPricingTier, getRegion, getRuntime, getTelemetryProperties, isDisableAppInsights, isSkipMojo, validateAppNamegetAppName, getAppServicePlanName, getAppServicePlanResourceGroup, getAppSettings, getDeploymentSlotSetting, getDeploymentStagingDirectoryPath, getDeploymentType, getPortalUrl, getResourceGroup, getResourcePortalUrl, setDeploymentSlotexecute, executeWithTimeRecorder, getAuthenticationSetting, getAuthMethod, getAuthType, getAzureClient, getAzureCredentialWrapper, getBuildDirectoryAbsolutePath, getHttpProxyHost, getHttpProxyPort, getInstallationId, getMavenResourcesFiltering, getOrCreateAzureClient, getPluginName, getPluginVersion, getProject, getSession, getSessionId, getSettings, getSubscriptionId, getTelemetryProxy, getUserAgent, handleException, highlightDefaultValue, infoWithMultipleLines, initTelemetry, isAuthConfigurationExist, isFailingOnError, isTelemetryAllowed, printCurrentSubscription, selectSubscription, trackMojoFailure, trackMojoSkip, trackMojoStart, trackMojoSuccesspublic static final String SEARCH_FUNCTIONS
public static final String FOUND_FUNCTIONS
public static final String NO_FUNCTIONS
public static final String GENERATE_CONFIG
public static final String GENERATE_SKIP
public static final String GENERATE_DONE
public static final String VALIDATE_CONFIG
public static final String VALIDATE_SKIP
public static final String VALIDATE_DONE
public static final String SAVE_HOST_JSON
public static final String SAVE_FUNCTION_JSONS
public static final String SAVE_SKIP
public static final String SAVE_FUNCTION_JSON
public static final String SAVE_SUCCESS
public static final String COPY_JARS
public static final String COPY_SUCCESS
public static final String INSTALL_EXTENSIONS
public static final String SKIP_INSTALL_EXTENSIONS_HTTP
public static final String INSTALL_EXTENSIONS_FINISH
public static final String BUILD_SUCCESS
public static final String FUNCTION_JSON
public static final String HOST_JSON
public static final String EXTENSION_BUNDLE
private static final com.microsoft.azure.common.function.bindings.BindingEnum[] FUNCTION_WITHOUT_FUNCTION_EXTENSION
private static final String EXTENSION_BUNDLE_ID
private static final String SKIP_INSTALL_EXTENSIONS_BUNDLE
private static final String CAN_NOT_FIND_ARTIFACT
protected void doExecute()
throws com.microsoft.azure.common.exceptions.AzureExecutionException
doExecute in class AbstractAzureMojocom.microsoft.azure.common.exceptions.AzureExecutionExceptionprotected com.microsoft.azure.common.function.handlers.AnnotationHandler getAnnotationHandler()
protected Set<Method> findAnnotatedMethods(com.microsoft.azure.common.function.handlers.AnnotationHandler handler) throws com.microsoft.azure.common.exceptions.AzureExecutionException, MalformedURLException
com.microsoft.azure.common.exceptions.AzureExecutionExceptionMalformedURLExceptionprotected URL getArtifactUrl() throws MalformedURLException
MalformedURLExceptionprotected URL getTargetClassUrl() throws MalformedURLException
MalformedURLExceptionprotected List<URL> getDependencyArtifactUrls()
protected Map<String,com.microsoft.azure.common.function.configurations.FunctionConfiguration> getFunctionConfigurations(com.microsoft.azure.common.function.handlers.AnnotationHandler handler, Set<Method> methods) throws com.microsoft.azure.common.exceptions.AzureExecutionException
com.microsoft.azure.common.exceptions.AzureExecutionExceptionprotected String getScriptFilePath()
protected void validateFunctionConfigurations(Map<String,com.microsoft.azure.common.function.configurations.FunctionConfiguration> configMap)
protected void writeFunctionJsonFiles(com.fasterxml.jackson.databind.ObjectWriter objectWriter,
Map<String,com.microsoft.azure.common.function.configurations.FunctionConfiguration> configMap)
throws IOException
IOExceptionprotected void writeFunctionJsonFile(com.fasterxml.jackson.databind.ObjectWriter objectWriter,
String functionName,
com.microsoft.azure.common.function.configurations.FunctionConfiguration config)
throws IOException
IOExceptionprotected void copyHostJsonFile(com.fasterxml.jackson.databind.ObjectWriter objectWriter)
throws IOException
IOExceptionprotected void writeObjectToFile(com.fasterxml.jackson.databind.ObjectWriter objectWriter,
Object object,
File targetFile)
throws IOException
IOExceptionprotected com.fasterxml.jackson.databind.ObjectWriter getObjectWriter()
protected void copyJarsToStageDirectory()
throws IOException
IOExceptionpublic List<org.apache.maven.model.Resource> getResources()
getResources in class AbstractAppServiceMojoprotected com.microsoft.azure.common.function.handlers.FunctionCoreToolsHandler getFunctionCoreToolsHandler(com.microsoft.azure.common.function.handlers.CommandHandler commandHandler)
protected void installExtension(com.microsoft.azure.common.function.handlers.FunctionCoreToolsHandler handler,
Set<com.microsoft.azure.common.function.bindings.BindingEnum> bindingEnums)
throws com.microsoft.azure.common.exceptions.AzureExecutionException
com.microsoft.azure.common.exceptions.AzureExecutionExceptionprotected Set<com.microsoft.azure.common.function.bindings.BindingEnum> getFunctionBindingEnums(Map<String,com.microsoft.azure.common.function.configurations.FunctionConfiguration> configMap)
protected boolean isInstallingExtensionNeeded(Set<com.microsoft.azure.common.function.bindings.BindingEnum> bindingTypes)
protected com.google.gson.JsonObject readHostJson()
protected void promptCompileInfo()
throws com.microsoft.azure.common.exceptions.AzureExecutionException
com.microsoft.azure.common.exceptions.AzureExecutionExceptionprivate File getArtifactFile() throws com.microsoft.azure.common.exceptions.AzureExecutionException
com.microsoft.azure.common.exceptions.AzureExecutionExceptionprivate static void copyResources(org.apache.maven.project.MavenProject project,
org.apache.maven.execution.MavenSession session,
org.apache.maven.shared.filtering.MavenResourcesFiltering filtering,
List<org.apache.maven.model.Resource> resources,
String targetDirectory)
throws IOException
project - session - filtering - resources - targetDirectory - IOExceptionCopyright © 2021. All rights reserved.