maven项目出现红色感叹号

maven项目出现红色感叹号

我在我自己的电脑上建了一个maven私有仓库,使用一段时间都没有问题,今天我本地的eclipse项目发现有一个红色的感叹号,并且打包的时候提示


 Missing artifact org.springframework:org.springframework.web.servlet:jar:3.0.5.RELEASE:compile

最终的解决办法是手动在本地仓库加入该jar包


pom.xml文件中是这样配置的

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>org.springframework.web.servlet</artifactId>
    <version>3.0.5.RELEASE</version>
</dependency>

在控制台cmd下:


C:\Users\kly>mvn install:install-file -DgroupId=org.springframework -DartifactId=org.springframewor
.web.servlet -Dversion=3.0.5.RELEASE -Dfile=E:\Spring3.x\spring\org.springfram
work.web.servlet-3.0.5.RELEASE.jar -Dpackaging=jar -DgeneratePom=true


-DgroupId:对应的groupId

-DartifactId:对应的artifactId

-Dversion:对应的版本号

-Dfile:对应的我本地的jar包位置


回车即可





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值