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.