From 75019ab281595a1a6137eefea65523ea6ff9f098 Mon Sep 17 00:00:00 2001 From: Anthony Lofton Date: Thu, 12 Dec 2019 12:54:01 -0600 Subject: [PATCH] function-sample-azure cleanup Cleaned up pom to use java.version instead of the compiler.source and compiler.target Added version properties for azure-functions-java-library and azure-functions-maven-plugin Updated the properties to be the latest recommended from Azure Functions Used stagingDirectory in maven-resources-plugin Updated README.adoc to say port 7071 instead of 8080 --- .../function-sample-azure/README.adoc | 2 +- .../function-sample-azure/pom.xml | 48 +++++++++---------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/spring-cloud-function-samples/function-sample-azure/README.adoc b/spring-cloud-function-samples/function-sample-azure/README.adoc index 1b141bdb6..23a6d1dd0 100644 --- a/spring-cloud-function-samples/function-sample-azure/README.adoc +++ b/spring-cloud-function-samples/function-sample-azure/README.adoc @@ -4,7 +4,7 @@ You can run this sample locally, just like the other Spring Cloud Function sampl mvn spring-boot:run ---- -and `curl -H "Content-Type: application/json" localhost:8080/uppercase -d '{"value": "hello foobar"}'`. +and `curl -H "Content-Type: application/json" localhost:7071/uppercase -d '{"value": "hello foobar"}'`. Given that our function takes POJO `Function uppercase()` and it's input is JSON we need to provide the appropriate content-type (in this case `application/json`). diff --git a/spring-cloud-function-samples/function-sample-azure/pom.xml b/spring-cloud-function-samples/function-sample-azure/pom.xml index 8434f93ce..501839a15 100644 --- a/spring-cloud-function-samples/function-sample-azure/pom.xml +++ b/spring-cloud-function-samples/function-sample-azure/pom.xml @@ -19,14 +19,14 @@ - UTF-8 - 1.8 - 1.8 + 1.8 function-sample-azure westus java-function-group ${project.build.directory}/azure-functions/${functionAppName} example.Config + 1.3.4 + 1.3.0 1.0.23.RELEASE @@ -58,6 +58,11 @@ pom import + + com.microsoft.azure.functions + azure-functions-java-library + ${azure.functions.java.library.version} + @@ -84,21 +89,10 @@ - - maven-resources-plugin - 3.0.2 - com.microsoft.azure azure-functions-maven-plugin - 1.3.4 - - - javax.xml.bind - jaxb-api - 2.3.1 - - + ${azure.functions.maven.plugin.version} @@ -127,6 +121,7 @@ false true runtime + azure-functions-java-library @@ -139,14 +134,19 @@ ${functionAppName} ${functionAppRegion} - - FUNCTIONS_EXTENSION_VERSION - beta - - - MSDEPLOY_RENAME_LOCKED_FILES - 1 - + + + WEBSITE_RUN_FROM_PACKAGE + 1 + + + FUNCTIONS_EXTENSION_VERSION + ~2 + + + FUNCTIONS_WORKER_RUNTIME + java + @@ -170,7 +170,7 @@ true - ${project.build.directory}/azure-functions/${functionAppName} + ${stagingDirectory}