https://blog.csdn.net/YLXD_class/article/details/78772444
配置Maven的settings.xml:
1、本地存储库位置:
<localRepository>E:/apache-maven-3.5.2</localRepository>
2、中央仓库使用阿里的比较快:
-
<mirrors>
-
<mirror>
-
<id>alimaven</id>
-
<name>aliyun maven</name>
-
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
-
<mirrorOf>central</mirrorOf>
-
</mirror>
-
</mirrors>
3、Maven编译的JDK版本
-
<profiles>
-
<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>
-
</profiles>
eclipse设置Maven:
window -> preference ->
eclipse新建Maven项目:
New -> other... ->
生成一个web.xml: 右键项目 -> properties ->
(注:如果开始 Dynamic Web Module被选中 且没有下面的 "! further configuration available..." 可以去掉Dynamic Web Module的选中点击 Applly按钮 然后再选中Dynamic Web Module项)
点击 "! further configuration available..."