Skip to content

Commit

Permalink
Improve error message when no sources with Gradle
Browse files Browse the repository at this point in the history
This is unfortunate but we probably need to spend a lot more time to
fully understand all the consequences of lifting this restriction.

Related to #45169
  • Loading branch information
gsmet committed Dec 26, 2024
1 parent db2a4dc commit cd8ebf7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,9 @@ public QuarkusDev extensionJvmOptions(Action<ExtensionDevModeJvmOptionFilter> ac
@TaskAction
public void startDev() {
if (!sourcesExist()) {
throw new GradleException("The `src/main/java` directory is required, please create it.");
throw new GradleException(
"At least one source directory (e.g. src/main/java, src/main/kotlin) should contain sources before starting Quarkus in dev mode when using Gradle. "
+ "Please initialize your project a bit further before restarting Quarkus in dev mode.");
}

if (!classesExist()) {
Expand Down

0 comments on commit cd8ebf7

Please sign in to comment.