Maven defines a standard directory layout for all projects. Once all projects adopt this layout, it allows developers to switch between projects with ease.
The following screenshot shows an example directory layout for a web project:
The following are some of the important standard directories:
- src/main/java: All application-related source code
- src/main/resources: All application-related resources--Spring context files, property files, logging configuration, and so on
- src/main/webapp: All resources related to the web application--view files (JSP, view templates, static content, and so on)
- src/test/java: All unit testing code
- src/test/resources: All resources related to unit testing