You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to read or set values from the field in the azure-maven-plugin ?
<plugin>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-functions-maven-plugin</artifactId>
<version>${azure.functions.maven.plugin.version}</version>
<configuration>
<!-- function app name -->
<appName>${functionAppName}</appName>
<!-- function app resource group -->
<resourceGroup>${resourceGroupName}</resourceGroup>
<!-- function app service plan name -->
<appServicePlanName>${appServicePlanName}</appServicePlanName>
<!-- function app region-->
<!-- refers https://github.com/microsoft/azure-maven-plugins/wiki/Azure-Functions:-Configuration-Details#supported-regions for all valid values -->
<region>${azure.region}</region>
<!-- function pricingTier, default to be consumption if not specified -->
<!-- refers https://github.com/microsoft/azure-maven-plugins/wiki/Azure-Functions:-Configuration-Details#supported-pricing-tiers for all valid values -->
<!-- <pricingTier></pricingTier> -->
<!-- Whether to disable application insights, default is false -->
<!-- refers https://github.com/microsoft/azure-maven-plugins/wiki/Azure-Functions:-Configuration-Details for all valid configurations for application insights-->
<!-- <disableAppInsights></disableAppInsights> -->
<runtime>
<!-- runtime os, could be windows, linux or docker-->
<os>Linux</os>
<javaVersion>11</javaVersion>
<!-- for docker function, please set the following parameters -->
<!-- <image>[hub-user/]repo-name[:tag]</image> -->
<!-- <serverId></serverId> -->
<!-- <registryUrl></registryUrl> -->
</runtime>
<appSettings>
<property>
<name>FUNCTIONS_EXTENSION_VERSION</name>
<value>~4</value>
</property>
</appSettings>
</configuration>
<executions>
<execution>
<id>package-functions</id>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
Something like System.getenv("FUNCTIONS_EXTENSION_VERSION");
or System.getProperty("FUNCTIONS_EXTENSION_VERSION");
The text was updated successfully, but these errors were encountered:
@sreyanps Thanks for your report and really sorry for the late response. Yes you could get the app settings with System.getenv("FUNCTIONS_EXTENSION_VERSION");, and functions maven plugin will help you set the app settings defined in pom to Azure after deployment.
However, if you want to test it locally with mvn azure-functions:run, you need to set the value in local.settings.json, which by default locate in the root of your project, here is an example
azure-maven-plugin
Is there a way to read or set values from the field in the azure-maven-plugin ?
Something like
System.getenv("FUNCTIONS_EXTENSION_VERSION");
or
System.getProperty("FUNCTIONS_EXTENSION_VERSION");
The text was updated successfully, but these errors were encountered: