Development environment:
Eclipse Jee Mars (current version eclipse4.5 as of December 1, 2015): http://www.eclipse.org/downloads/
Because this version already integrates the M2E plug-in, the Mars version of Eclipse is also relatively stable, can save some unnecessary trouble.
I. Building a MAVEN Project
- Before we build a Maven project with Eclipse, we need to do some necessary configuration for eclipse
- Some of the necessary configuration
1. Click Preferences under Window in the Eclipse menu bar to select the Maven menu
2. Select installations, select Add, and add your locally installed MAVEN installation directory as shown below. (if MAVEN is not installed, refer to maven installation and configuration on Windows )
3. Click the Apply app and select User Settings on the left menu to configure the global settings for MAVEN. Click Browse to select the Settings.xml file in the Conf subdirectory under the MAVEN directory you installed, and click on the Apply app to get the other options.
4, then click on the car Maven root menu, to do maven's custom configuration, whether to download the source code, whether to download the Javadoc file, according to the need to tick the application can be.
Configuration Complete! The next step is to build the MAVEN project.
- Start building a MAVEN project
1. Create a new Maven Project in Eclipse, and use the default tick to click Next to proceed
2, Filter Filter Select QuickStart, click Next to proceed to the next
(You can also enter the Web keyword filter, select the Web to create the project, he is not in the creation of the directory structure is not the same.) You need to complete the directory structure yourself. )
3, in the group Id fill in our project package name, according to the specification we choose the domain name inverted. Artifact Id fill in our project name and click Finish to complete the creation.
4. Well, this MAVEN project is created. The following is its directory structure:
Ii. release of MAVEN projects
1. Select the project and select Run Configratis under the running button ...
2, enter the configuration interface, the Maver Build right mouse button new, and then modify the name, click Browse Workspace Select the project, and then fill in goals (target) for the package, click Apply Application is OK.
3, click Apply, look at the console if the build success the release is successful!
4, the project on the right mouse button refresh, and then you can see the newly generated directory structure and jar files
Maven Learning (ii) build MAVEN projects with Eclipse and publish a MAVEN project