SyntaxFix
Write A Post
Hire A Developer
Questions
I was getting this error because my main class is in test package, and I am creating artifact using IntelliJ. After I checked the box Include Tests when creating artifact, it got resolved.
Screenshot from IntelliJ showing Include Tests checkbox