Skip to content

"Unable to find main class" in a multi module gradle project #3197

@grundid

Description

@grundid

When I add apply plugin: 'spring-boot' to all subprojects in a multi module gradle project the build task exits with the above error message.

A workaround is to add

bootRepackage {
    mainClass = '...'
}

in all build.gradle files or to set the apply plugin line only in the one module that currently has the Application class but then the version management does not work for all modules.

It would be better if I could only set the mainClass in one module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions