I found that Maven implies specific directory layout. But I don’t understand from here: http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
where java libraries needed to compile and run my code should be placed. I think they shouldn’t be placed under ‘src/main/resources’ because resources is something like images or so. Also it doesn’t look right to place them under ‘src/main/java’. If I wouldn’t use maven, I’d place libraries in project’s root lib directory. But I don’t think that for maven project it will be right. Please advise.
UPD: I solved the problem. The matter was that I set packages for my sources as src.main.myApp instead of main.myApp. This seems to upset maven.
Maven handles your project dependencies in a different way to a ‘Standard’ Java project.
You declare the libraries you depend on in your project’s pom.xml:
e.g.
When you use a maven command to build the project, i.e.
mvn install, it will download the dependencies for you and store them in your local repository.