POM错误:找不到org.springframework.boot

问题描述:

我一直在尝试设置spring boot项目,但出现错误.我研究并尝试了各种选择,但到目前为止还没有运气.任何帮助,将不胜感激.

I have been trying to setup a spring boot project but am getting an error. I researched and tried various options but no luck so far. Any help would be appreciated.

项目构建错误:不可解析的父POM:无法在 http://repo.maven.apache.org/ maven2已缓存在本地存储库中,直到Central的更新间隔过去或强制执行更新并重新启动解析后,才会重新尝试解析 "parent.relativePath"指向没有本地POM的地方

Project build error: Non-resolvable parent POM: Failure to find org.springframework.boot:spring-boot-starter-parent:pom:1.1.3.RELEASE in http://repo.maven.apache.org/ maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at no local 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>com.programmingfree</groupId>
  <artifactId>spring-data-rest-angular</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <name>Spring Data Rest + AngularJS</name>
  <description>This project uses Spring Data Rest and AngularJS to perform CRUD operations against MySql Database.</description>
  <parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>1.1.3.RELEASE</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>
  <dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-thymeleaf</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-jpa</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-rest</artifactId>
		</dependency>		
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
		</dependency>
	</dependencies>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<start-class>com.programmingfree.springservice.Application</start-class>
		<java.version>1.7</java.version>
	</properties>

	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
			</plugin>
		</plugins>
	</build>
</project>

可能是间歇性的Internet问题或其他原因.我昨天也面临着同样的问题.在修复项目后,更新项目(在STS或Eclipse上,右键单击该项目,然后在Maven->更新项目->勾选除 Offline 之外的所有内容上进行勾选).

There might have been some intermittent Internet issue or something. I was facing the same problem yesterday. Updating the the project (On STS or Eclipse, right click on the project and Maven -> Update project -> tick everything except Offline) after sometime fixed it.