maven异常问题及处理总结

maven异常问题及处理总结

Eclipse使用Maven创建Web时找不到maven-archetype-webap或报

Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:RELEASE from any of the configured repositories

解决方法:

window-->preferences-->Maven-->Archetypes-->Add Remote Catalog中添加

catalog File:http://repo1.maven.org/maven2/archetype-catalog.xml

Description: 随便填写


2.为Eclipse添加自己的maven环境

 选择window-->preferences-->Maven-->Installations-->Add

选择本地maven安装目录,-->Apply

选择User Settings-->选择本地maven安装目录下conf-->settings.xml-->ok

重启Eclipse。


3.修改本地maven库地址

在settings.xml中<settings ...></settings>添加<localRepository>E:/localMaven/</localRepository>


4.启用jetty-run命令

settings.xml中添加<pluginGroup>org.mortbay.jetty</pluginGroup>


5.规范maven库

settings.xml中的<profiles></profiles>增加<repositories><repository><id></id><url>可以为局域网地址</url></repository></repositoories>


6.安装jar包到本地maven库

mvn install:install-file -Dfile=E:\jodconverter-2.2.2.jar -DgroupId=com.arto
fsolving -DartifactId=jodconverter -Dversion=2.2.2 -Dpackaging=jar -DgeneratePom
=true -DcreateChecksum=true


7.maven 关联本地项目jar包

<dependency>
      <groupId>com.artofsolving</groupId>
      <artifactId>jodconverter-core</artifactId>
      <version>3.0-beta-4</version>
      <scope>system</scope>
      <systemPath>${basedir}/lib/jodconverter-core-3.0-beta-4.jar</systemPath>
    </dependency>

lib目录必须与pom.xml同级

 

8.can not calculate build plan:

选中项目右键—》maven-->Update Dependencies.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值