-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Running a project with a main class from IntelliJ when project is built using gradle fails #10961
Comments
/cc @quarkusio/devtools |
Is there a chance you could try current quarkus master branch? I merged a pr that should fix it a couple of hours ago. |
Is master built? I have cloned the repo but it's taking too much time to build. 30 minutes already have passed and still not even reached half of the process. |
@aloubyansky Ok, It has finished and it works but there are some issues:
Note that my main is like this: @QuarkusMain
public class Main {
public static void main(final String... args) {
System.out.println("Starting.............");
Quarkus.run(args);
System.out.println("After starting.............");
}
} |
It seems that after running |
Another issue is that after stopping the app (from the IDE), there are some times in which the app does not really stops (address and port remain in use). Don't know if this has something to be with your PR though. |
@juanmbellini thanks a lot for giving it a try and providing the fast feedback. |
I guess the slow start relates to "connecting to the project". We'll need to investigate how we can do it more efficiently. |
@juanmbellini thanks for these test. |
@glefloch With my computer (a Macbook Pro 15" 2018, 6-core i9, with 32GiB):
|
Yes, I think we could have quite better performance, for example we are creating the model two times, with a new project connection for each one. BTW, I have multiple sample project on my machine (including one with a CLI application) and I re run some tests today, I wasn't able to get the run method executed twice. Are you running some Gradle command before executing the main method? |
Nope, just calling run from my main method, and running the application from intelliJ just pressing the "play" button as any java project with a main method. However, some gradle tasks are run before ( But once |
Describe the bug
(Describe the problem clearly and concisely.)
After downloading a generated project from the quarkus website (https://code.quarkus.io/), using gradle as build tool, and adding a "main" class according to https://quarkus.io/guides/lifecycle#the-main-method, and trying to run from IntelliJ (just clicking the "play" button next to the main method), makes the application startup fail with the following stacktrace:
Expected behavior
I expect the application to start without any issue
Actual behavior
The application does not start, and the previous stacktrace is printed.
To Reproduce
Steps to reproduce the behavior:
Configuration
# No properties have been set
Screenshots

Environment (please complete the following information):
Does not apply
Additional context
Have tried this using OpenJDK-11.0.2, GraalVM-20.1.0 and GraalVM-19.3.2.
The text was updated successfully, but these errors were encountered: