Preparation for creating MAVEN projects in Eclipse

Source: Internet
Author: User

1. Tomcat Run environment 2, check maven plugin (4.0 + Eclipse version comes with maven plugin) 3,Modify the Eclipse.ini file to add support for the JDK-VMC:\Java\jdk1.8.0_131\bin\javaw.exe4.Modify the default JRE for Eclipse to the private JRE location under JDK directory (typically the private JRE by default)C:\Java\jdk1.8.0_131\jre5.add maven to eclipse6.configuration of the settings.xml file7. Create a MAVEN Web projectmethod ①:   method ②:   = = "8, modify the default configuration at deployment (WebApp configuration) 9, add JSP page error (need to add servlet-api dependency)①

③ added Servlet-api dependency in the project
<!--index.jsp file error, add Servlet-api dependency--<dependency><groupId>javax.servlet</groupId><artifactId>servlet-api</artifactId><version>2.5</version><!--dependency range: -<scope>provided</scope></dependency>
then operate:
project-> Right-click->maven-> Update Project , so that it can be resolved (do a timely refresh of use)

④10, modify the default JRE environment (configuration is required or do not configure)= = "

the way[1] Open settings.xml file[2] Find profiles tags[3] Add the following configuration<profile><id>jdk-1.8</id><activation><activeByDefault>true</activeByDefault><jdk>1.8</jdk></activation><properties><maven.compiler.source>1.8</maven.compiler.source><maven.compiler.target>1.8</maven.compiler.target><maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion></properties></profile>
11. Access the project page in the browserusing the jetty containerNote: You can specify to run the jetty service during the packaging phase
then access the localhost:8080 in the browser

You can also use Tomcat as a web container find Maven plugins on the Tomcat website: tomcat-maven-plugin<plugins><plugin><groupId>org.apache.tomcat.maven</groupId><artifactId>tomcat6-maven-plugin</artifactId><version>2.2</version></plugin><plugin><groupId>org.apache.tomcat.maven</groupId><artifactId>tomcat7-maven-plugin</artifactId><version>2.2</version></plugin></plugins>     = = "Execute the clean package:

Preparation for creating MAVEN projects in Eclipse

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.