Search code examples
eclipsemavenm2eclipse

Eclipse and Maven configuration


I'm new to Maven. I've just installed and configured it. When I started coding, I realized Eclipse doesn't show the error messages. I haven't found anything helpful by searching Google. Some sources say to add java builder to your project but I already did.

Here's a screenshot.


Solution

  • It looks, that you had project in eclipse configured to have source code in 'src' subdirectory (and compile classes to 'bin'). Maven by default looks for java sources in src/main/java (and compile classes to 'target/classes'). So you'd need to move your source code to src/main/java or modify pom.xml to point to 'src' as source directory. I'd suggest following maven convention and store source code in src/main/java.