Maven project is usually organized as src/main/java/somepackage, but from time to time my eclipse would recognize src/main/java as part of package too. How to fix this? In the following picture, common and helloworld are both maven projects, where common is organized correctly but helloworld is not.


The src directory is the default directory where Eclipse stores the source code, while in Maven is src/main/java. Better check if the .classpath file has not been corrupted or externally modified. It should contain something like this:
<classpathentry kind="src" output="target/classes" path="src/main/java">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With