Intellij not recognizing source directory in project
Answered
Hello, I have a Spring Boot maven project that is not compiling 'unable to find main class'. The code was working when I built it and pushed it to bitbucket. I had to delete the project and start over so I cloned repository and pulled. Now it will not run. I get an error that the main class is not found. When I set the subdirectory (actual project) src to source dirctory it still does not compile. Please let me know what steps I need to take to get the subdirectory of the project to run. Thanks!
Please sign in to leave a comment.
Please share the sample project to reproduce the issue.
Please let me know the best way to share the project.
See https://intellij-support.jetbrains.com/hc/articles/206869619.
Hi Serge I have emailed the project zipped to intellij-support@jetbrains.com at your attention.
Can't find anything from your account. Could you please provide the ticket number?
I haven't opened a ticket. I have only posted here.
When you send a new e-mail to intellij-support@jetbrains.com, a new ticket is created automatically. Note that you can't reply to forum notification e-mails.
Ok I never received a ticket number but I just uploaded the file weekonetest.zip
This archive has 2 IntelliJ IDEA projects (.idea subdirectories). One is inside the weekonetest directory another is under weekonetest\CompanyManagement. It looks like you open the wrong project which doesn't define any content roots. You should open weekonetest\CompanyManagement project which is managed by Maven and has all the source roots configured correctly:
Ok I was able to do that and it does compile and run. Thank you.