microsoft / azure-maven-plugins

Maven plugins for Azure
MIT License
272 stars 140 forks source link

plugin ignoring LocalHttpPort from 1.23 onwards #2449

Open mark-lindseth-kr opened 1 month ago

mark-lindseth-kr commented 1 month ago

Plugin name and version

1.23, 1.32 & 1.34

Plugin configuration in your pom.xml

build pluginManagement plugins plugin groupId com.microsoft.azure /groupId artifactId azure-functions-maven-plugin /artifactId version ${azure.functions.maven.plugin.version} /version /plugin

Expected behavior

Connect to 7072 as per local.settings.json

Actual behavior

Connects to 7071 and because it is used by another function app I get "Port 7071 is unavailable. Close the process using that port, or specify another port using --port [-p]."

Steps to reproduce the problem

local.settings.json: { "version": "2.0", "extensionBundle": { "id": "Microsoft.Azure.Functions.ExtensionBundle", "version": "[3.3.0, 4.0.0)" }, "Host": { "LocalHttpPort": 7072 }, "IsEncrypted": false, "Values": { stuff } }

The maven command I am using is "mvn clean package --projects name azure-functions:run"

With 1.20 & 1.21 it works fine and connects to 7072 but 1.23 onwards it ignores the setting and uses 7071. I tried the 1.32 and 1.34 and again it tries 7071. As a final test I went into the target/azure-functions/name/ folder and ran "func start" and it connected to 7072 without issue leading me to believe it is how this module is executing the function.