I am currently working on azure spring. I have recently updated my Spring Tool Suite to Version: 4.21.1.RELEASE and installed Azure Toolkit for Eclipse 3.32.0 from the marketplace. After that, I have started getting the following error when I run mvn package azure-functions:run from STS.
sh: func: command not found
[ERROR]
[ERROR] Azure Functions Core Tools not found. Please go to https://aka.ms/azfunc-install to install Azure Functions Core Tools first.
The following command is working fine.
my-project % func --version
4.0.5530
Also, the command mvn package azure-functions:run works from the command line.
my-project % mvn package azure-functions:run
[INFO] Scanning for projects...
[INFO]
...
Do we need to set some environment variable for this func to make it work in STS?
When launching Eclipse from the dock on a Mac, some environment variables, such as PATH, may not be properly set. As a result, the Azure Toolkit may not be able to locate the function core tools needed to launch a function project. We are working on the fix for this issue, please track the status in https://github.com/microsoft/azure-tools-for-java/issues/8225
As a workaround, you may run Spring Tool Suite from bash with
open -a SpringToolSuite4.app, which should resolve this issue.