New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Failed to discover main class" error when deploying a Spring Cloud Function #912
Comments
@jdubois Thanks for your feedback and really sorry for the late reply. The error message shows that As you said, we could add app setting MAIN_CLASS as a workaround, this will not work in local as maven plugin configuration will not be passed to function host in local, instead, please prepare a
|
Oh thanks @Flanker32 ! |
@jdubois I have opened an issue in azure-functions-java-work to track this, here is the link |
This employs the workaround to the issue described here: microsoft/azure-maven-plugins#912
Now the library provides Though it seems like overhead that we have to explicitly specify it in App Settings, even though it's added by |
The project I'm using here is the sample project I maintain as part of the official Azure Samples.
The current code, with the issue, is here: https://github.com/Azure-Samples/hello-spring-function-azure/tree/35d01ce2bed3b04d612ff56556f8298300905e90
This is related to ticket Azure-Samples/hello-spring-function-azure#1 on the Azure Samples project.
Plugin name and version
azure-functions-maven-plugin 1.3.2
Plugin configuration in your
pom.xml
Expected behavior
The main class of the function should be automatically found. The
MAIN_CLASS
property should not need to be specified in thepom.xml
. Besides, as reported in Azure-Samples/hello-spring-function-azure#1 , this property is picked up correctly when using the "deploy" goal, but it doesn't work with the "run" goal.Actual behavior
If we don't set up manually the
MAIN_CLASS
property, then we get the following error:This fails both with the "deploy" and the "run" goals.
Steps to reproduce the problem
MAIN_CLASS
property in thepom.xml
and deploy the Function usingmvn clean package azure-functions:deploy
azure-functions:deploy
, even when theMAIN_CLASS
property is set up.The text was updated successfully, but these errors were encountered: