You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Quarkus Version: 1.7.0.Final
Quarkus Gradle fails building the application because the plugin scans the workspace and retrieves the "main" sourceSet of all modules, but there is no "main" sourceSet in some modules.
For example: I have kotlin MPP submodules where there is a javaconvention but the javaconvention has no sourceSets.
Expected behavior
Should not fail.
Actual behavior
Build fails with:
Caused by: org.gradle.api.UnknownDomainObjectException: SourceSet with name 'main' not found.
at org.gradle.api.internal.DefaultNamedDomainObjectCollection.createNotFoundException(DefaultNamedDomainObjectCollection.java:504)
at org.gradle.api.internal.DefaultNamedDomainObjectCollection.getByName(DefaultNamedDomainObjectCollection.java:333)
at io.quarkus.gradle.tasks.QuarkusGradleUtils.getSourceSet(QuarkusGradleUtils.java:41)
at io.quarkus.gradle.builder.QuarkusModelBuilder.getWorkspaceModule(QuarkusModelBuilder.java:121)
at io.quarkus.gradle.builder.QuarkusModelBuilder.getWorkspace(QuarkusModelBuilder.java:113)
at io.quarkus.gradle.builder.QuarkusModelBuilder.buildAll(QuarkusModelBuilder.java:100)
at io.quarkus.gradle.QuarkusPluginExtension.create(QuarkusPluginExtension.java:185)
at io.quarkus.gradle.QuarkusPluginExtension.getQuarkusModel(QuarkusPluginExtension.java:178)
at io.quarkus.gradle.QuarkusPluginExtension.getAppModelResolver(QuarkusPluginExtension.java:170)
at io.quarkus.gradle.QuarkusPluginExtension.getAppModelResolver(QuarkusPluginExtension.java:166)
at io.quarkus.gradle.QuarkusPluginExtension_Decorated.getAppModelResolver(Unknown Source)
at io.quarkus.gradle.tasks.QuarkusBuild.buildQuarkus(QuarkusBuild.java:97)
...
Suggestions for a fix:
I have several ideas to fix this problem:
Only scan modules that are related through dependencies to the module that is to be build.
Ignore modules which have no "main" sourceSet
Allow configuration of "to be excluded" sourceSets
Allow configuration of the "main" sourceSet for each module
I think the second one is the easiest to implement, but i have no idea about the impact it would have.
The text was updated successfully, but these errors were encountered:
Describe the bug
Quarkus Version: 1.7.0.Final
Quarkus Gradle fails building the application because the plugin scans the workspace and retrieves the "main" sourceSet of all modules, but there is no "main" sourceSet in some modules.
For example: I have kotlin MPP submodules where there is a javaconvention but the javaconvention has no sourceSets.
Expected behavior
Should not fail.
Actual behavior
Build fails with:
Suggestions for a fix:
I have several ideas to fix this problem:
I think the second one is the easiest to implement, but i have no idea about the impact it would have.
The text was updated successfully, but these errors were encountered: