This chapter focuses on the structure of the Maven project, its architecture, which covers the required topics, and finally learns how to create a simple MAVEN project. This chapter mainly includes the following sections.
- The structure of the Maven project
- POM file (Project Object Model)
-
- Maven's coordinates
- The relationship of POM
- Basic POM
- Top-level POM
3. The build architecture of Maven projects
4. Other important concepts
-
- Warehouse
- Project Dependencies
- Plugins and Tasks
- Site generation and reporting
5. Create a Maven project
-
- Creating with prototypes
- Do not use prototypes to create
- Retrieving a Maven project
6. Introduction of a Maven project
First section of the MAVEN project structure
MAVEN, with a convention greater than the configuration of the way, so that the project has a standard design, first of all to understand the Maven project in each directory or file meaning.
Folder/files |
Description |
Src/main/java |
Store all Java Source code |
Src/main/resources |
Storage of application resource files, examples, audio, templates, etc. |
Src/main/filters |
Resource filter file for the project |
Src/main/config |
Files that hold configuration information |
Src/main/scripts |
To store the script file specified by the project |
Src/test/java |
Test source code to store Java |
Src/test/resources |
To store the resource file for testing |
Src/filters |
A filter file that holds the specified resources for testing |
Src/it |
Storage of integrated test files, mainly referred to as plugins |
src/assembly |
Files that store assembly plugins |
Src/site |
Storing documents related to Web pages |
LICENSE.txt |
The license information for the project is stored |
NOTICE.txt |
Contains the ownership of the project and the dependency information for the project |
README.txt |
Information that indicates the project needs to know |
Target |
All files generated by the compiled build are stored |
Pom.xml |
Pom file, the most core file |
Maven for Eclipse chapter III-Creating and importing MAVEN projects