maven版本:apache-maven-3.6.1
环境配置
配置settings.xml
全局配置(不做修改)
用户配置(copy)
用户配置settings.xml
http://maven.aliyun.com/nexus/content/groups/public/
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<profile>
<id>jdk-1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<repositories>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</repositories>
</profile>
myeclipse maven项目创建
创建项目成功后index.jsp报错
解决方法:导入依赖
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
至此,ok