java - 缺少工件 org.springframework:spring-core:jar:4.3.0.RELEASE
问题描述
我试图使用 maven-springboot 制作一个 webbservice。以下是我在 pom 文件中使用的依赖项。
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework</groupId>
<artifactId>SpringService</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>SpringService Maven Webapp</name>
<url>http://www.example.com</url>
<properties>
<springframework.version>4.3.0.RELEASE</springframework.version>
<jackson.library>2.7.5</jackson.library>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.library}</version>
</dependency>
</dependencies>
但是,我收到一个错误Missing artifact org.springframework:spring-core:jar:4.3.0.RELEASE for spring-web、spring-core和spring-webmvc。请提出解决方案。
解决方案
删除文件夹
/Users/username/.m2/repository/org/springframework
然后运行maven install
对我有用。
推荐阅读
- flutter - Flutter Streambuilder 正在复制项目
- javascript - 如何通过 package.json 中的脚本运行应用程序?
- java - Android MapBox - 添加带有信息窗口的标记的最佳方法是什么?
- python - Multigrid Poisson Solver
- cloud - 带有主机文件配置的 Argo 工作流
- rust - 在其他特征上继承/嵌套特征
- json - 获取异常为无法从数组值(令牌“JsonToken.START_ARRAY”)中反序列化类型为“response.BookingIDList”的值
- cognos-11 - 是否可以在 COGNOS 版本 11 的组摘要中创建自定义方程
- javascript - 返回的对象未定义
- html - 动画文本以从上到下更改颜色