In the previous blog with their own words of saliva to say a bit of MAVEN, here will need to know what to put forward, for the back of the blog to prepare.
0. Information
The best information to learn maven is the official site, followed by the search component is the central warehouse, the actual use can be used in the OSC image can also be self-built private warehouse cache (recommended to build a private warehouse cache).
Official website: http://maven.apache.org/
Central Warehouse: http://search.maven.org/
Eclipse's M2E project: https://projects.eclipse.org/projects/technology.m2e
Maven repository for OSC: http://maven.oschina.net/home.html
To build a local cache service, you can view my blog: Use Nexus to build a MAVEN private warehouse server.
1. Maven Introduction
The MAVEN project itself is an Apache project, but its project management approach has become a recognized practice. Helps solve many of the problems encountered in real-world development: Environment, dependencies, organizational structure, testing, running, publishing, and so on.
2. Using Maven
To use MAVEN, the project needs to meet some conditions that require that at least one pom.xml file be in the project root path, and you can choose to have the file organized in a default or non-compliant way (configuration required).
Please refer to the official documentation or the following blog introduction for specific pom.xml configuration.
3. Common MAVEN project file structure
Files and their placement paths that are common in MAVEN projects:
A.java source file: Src/main/java
B. configuration file: src/main/resources
C. Tested Java source files: Src/test/java
D. Test configuration file: Src/test/resources
Web root directory for E.web project: Src/main/webapp
F. Compiling the output directory (when Maven compiles, we don't need to): Target
The file structure uses the tree command to look up the results (removing some extraneous irrelevant content):
│ pom.xml│ ├─src│ ├─main│ │ ├─java│ │ │ │ │ ├─resources│ │ │ log4j.properties│ │ │ spring-config.xml│ │ │ spring-mvc.xml│ │ │ │ │ └─webapp│ │ │ │ │ └─WEB-INF│ │ web.xml│ │ │ └─test│ └─java│ └─target ├─classes │ ├─m2e-wtp │ └─web-resources │ └─meta-inf │ │ MANIFEST. mf │ │ │ └─maven │ └─test-classes
4. PostScript
This article simply outlines some of the main points of Maven, ready to contact MAVEN, where you can start.
The Next blog will talk about how to use Eclipse's Project Wizard to create a new MAVEN project.
enjoy!!
Using Eclipse-maven-git to do Java Development (7)--maven Overview