Eclipse新建maven web项目

https://blog.csdn.net/YLXD_class/article/details/78772444

配置Maven的settings.xml:

1、本地存储库位置:

<localRepository>E:/apache-maven-3.5.2</localRepository>

2、中央仓库使用阿里的比较快:

 
  1. <mirrors>

  2. <mirror>

  3. <id>alimaven</id>

  4. <name>aliyun maven</name>

  5. <url>http://maven.aliyun.com/nexus/content/groups/public/</url>

  6. <mirrorOf>central</mirrorOf>

  7. </mirror>

  8. </mirrors>

3、Maven编译的JDK版本

 
  1. <profiles>

  2.  
  3. <profile>

  4. <id>jdk-1.8</id>

  5. <activation>

  6. <activeByDefault>true</activeByDefault>

  7. <jdk>1.8</jdk>

  8. </activation>

  9. <properties>

  10. <maven.compiler.source>1.8</maven.compiler.source>

  11. <maven.compiler.target>1.8</maven.compiler.target>

  12. <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>

  13. </properties>

  14. </profile>

  15.  
  16. </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..."

 

 

 

 

 

 
 
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值