Maven creates a dynamic web 3.0 project, maven3.0

Source: Internet
Author: User

Maven creates a dynamic web 3.0 project, maven3.0

The default value is 2.3 when you use eclipse to create a Maven project. You need some tips to convert it into a 3.0 project.

The procedure is as follows,

1. Create a simple maven project

2. convert to a web3.0 Project

3. Configure publishing options

4. Modify pop. xml build to prevent JRE from returning 2.5 when updating the project

The following describes the specific operations of each step.

 

Step 1: Create a maven project and check "Create s simple project ".

1) create a maven Project

 

2) set the Artifact Id. Note that here we select jar for Pacagin and do not need to select War format

3) created Project

 

 Step 2: complete the conversion operation

1) set build path and modify JRE to JRE7

 

 

2) Click Project Facets, click Convert to faceted from, and Convert it to a dynamic web Project.

 

 

3) Click More available configuration options,

4) Check "Create web. xml ".

5) Now it is a dynamic web3.0 project. The website file directory is the WebContext directory.

 

 Step 3: Configure publishing options

The above operation has not been completed. You need to configure the release Option

1) Right-click the project properties and set Deployment Assembly

 

2) Add a Maven Project to the site

 

 

 

 

Step 4: Add configuration information in pop. xml to prevent jre from being modified when maven updates the project.

<build><finalName>maven_dynamicweb_3</finalName><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.5.1</version><configuration><source>1.8</source><target>1.8</target><encoding>UTF-8</encoding></configuration></plugin></plugins></build>

  

So far, the dynamic web3.0 project has been created.

 

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.