Maven and Eclipse:m2eclipse-Create a simple MAVEN project

Source: Internet
Author: User

Chen Kozhan-Welcome reprint, Reproduced Please indicate, thank you!

==================

In maven, we use archetype to create the project. In Ecelipse, we create the project through the New Project Wizard. The New Project Wizard in Eeclipse provides us with a large number of templates for creating projects. M2eclipse adds the following functionality to the wizard:

1. Check out a MAVEN project from the SCM Warehouse

2. Create a MAVEN project using MAVEN archetype (Maven prototype, or template)

3. Create a maven pom file

4. Real-Example

========================== Next we use the M2eclipse Wizard to create a MAVEN project


1. Check out a MAVEN project from the SCM Warehouse

M2eclipse provides the ability to check out projects directly from the SCM warehouse. Simply enter the SCM information for your project and it will check out the project to your chosen

Location, "Check out a new project from Subversion":


Check out a new project from subversion
There are other options in this dialog box to browse the revision of the Subversion repository to specify a specific revision, or to manually enter a revision

No. These features re-use some of the features of the Subclipse plugin to interact with subversion repositories. In addition to the Subversion,m2eclipse plugin also supported

SCM Provider for the polygon:

? Bazaar
? Clearcase
? Cvs
? Git
? Hg
? Perforce
? Starteam
? Subversion
? Synergy
? Visual SourceSafe

2. Create a MAVEN project using MAVEN archetype (Maven prototype, or template)

M2eclipse provides the ability to create a MAVEN project using Maven archetype. Along with the m2eclipse there are many mavenarchetype available,

"Create a MAVEN project using maven archetype":

The archetype list in "Creating a Maven project with Maven archetype" is a nexus indexer generated by an indexer called Nexus(Nexus is a warehouse manager) . a file containing the entire MAVEN repository index, M2eclipse uses it to list all the available in the MAVEN repository

Archetype.

Some of the more typical common ones are:

One, the standard MAVEN archetypes to create:

1.Maven Plug-in

2. Simple Web Application

3. Simple Project

4. Pro-maven Archetypes

Two...

Wait a minute
These are just the archetype listed by the Nexus Indexer directory, and if you switch directories you will see other archetype. Although the results you see will change, the following additional archetype can be found in the internal directory :


A directory is a simple reference to a warehouse index. You see by clicking on the Configure next to the Catalog drop-down menu ... button to manage a set of

M2eclipse already know the directory. If you have your own archetype you need to add to this list, you can click Add Archetype ....

Once you have selected a Archetype,maven will get the corresponding artifact from the MAVEN repository and use this archetype to create a new Clipse

Project.

3. Create a maven pom file

4. Real-Example

Start by creating a Maven parent level project (look down and know what the parent level is-personal definition)



In this step, use a template to create a MAVEN project



OK, it appears, you can delete the SRC directory, keep it useless.


is a parent-level project, let's create a sub-project for it that belongs to it.

See chart operation




Fill in as needed, then finish


Wait to create ....

Look, the desired effect came out.



Maven and Eclipse:m2eclipse-Create a simple MAVEN project

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.