Eclipse+intellij idea Create a maven project __eclipse

Source: Internet
Author: User
Tags tomcat server
Brief Introduction
One of the MAVEN uses is to build, a very powerful build tool that automates builds, from cleaning, compiling, testing to generating reports, and then packaging and deploying.
Install maven

Connection: http://blog.csdn.net/weisheixiaoxin/article/details/75078748 Eclipse Create project install maven

Open Eclipse->window->preferences->maven

Referencing the MAVEN plug-in

Configuring settings files and local warehouses
The default path is: ${user.home}/.m2/repository
Custom Warehouse Address: Open settings.xml file

Create maven Project

Open File->new->maven Project

MAVEN defines the basic coordinates of the project using the group Id,artifact Id,version ternary, and the Jar,pom,war in packaging is differentiated by these basic coordinates, and the execution of the packaging command is either a jar package or a war package.

Where the group ID of multiple items can be consistent but the artifact ID must be unique for the same group, version specifies the current project, and snapshot means the snapshot indicates that the project is in an unstable version of development.
Modify Project

Modify file characters to UTF-8

Modifying a compiled version

Cancel Dynamic Web Module (click Apply to save)

The WebContent folder is generated after checking the dynamic Web Module (click Apply Save).

Move the Web-inf and Meta-inf as WebApp and remove the build path.

Publish to the root directory when the WebApp directory is built

Maven Project created successfully ... IntelliJ Idea Create a project Install maven

Create maven Project

Select JDK Select a Web model next

To create a project Hello2, there is a problem with the same group only if it is not unique to install to the local warehouse, the next step.

Project Development Address

Waiting to wait ... IntelliJ can create a project according to the web model you just selected, (Eclipse can also create the first map of the MAVEN project, remove the Create a simple project, and the next step is to select the Web model), of course IntelliJ You can also create a blank Maven project.
Modify Project

Create Java directory, mark as resource file

Modify post-compile address

Add a resource path

Deployment path

New publishing information for the description file

Save
deploying to a Tomcat server

running the server

Success...

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.