maven项目出现红色感叹号

来源:互联网 发布:电影推荐算法数据集 编辑:程序博客网 时间:2024/04/23 14:43

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包位置


回车即可





0 0
原创粉丝点击