-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Closed
Description
I am working on a demo with Java 25 where you can define your main method as package private, i.e.
@SpringBootApplication
public class DemoApplication {
static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
Trying to run or package the app leads to:
* What went wrong:
Execution failed for task ':bootJar'.
> Error while evaluating property 'mainClass' of task ':bootJar'.
> Failed to calculate the value of task ':bootJar' property 'mainClass'.
> Main class name has not been configured and it could not be resolved from classpath /Users/snicoll/workspace/demo/matchmaking/playerprofile/build/classes/java/main:/Users/snicoll/workspace/demo/matchmaking/playerprofile/build/resources/main
It looks like the algorithm should be relaxed now that the main method does not need to be public (at least on Java 25+)
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug