春季启动,pom.xml [英] Spring boot , pom.xml
问题描述
我是春天的新蜜蜂, 尝试将gs-rest-service-complete导入到我的STS中,我可以导入,但在pom.xml中出现编译错误
I am a spring new bee, trying to import gs-rest-service-complete into my STS , I am able to import but getting compilation error in pom.xml
无法从/到spring-releases传输工件org.springframework.boot:spring-boot-starter-parent:pom:1.2.3.RELEASE(
Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.2.3.RELEASE from/to spring-releases (https://repo.spring.io/libs-release):
Connection refused: connect and 'parent.relativePath' points at wrong local POM "
这是我的pom.xml
Here's my pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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>gs-rest-service</artifactId>
<version>0.1.0</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.3.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
<properties>
<java.version>1.7</java.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
</pluginRepository>
</pluginRepositories>
</project>
任何人都可以指导我在做什么错吗?
Can anyone guide what mistake I am doing?
推荐答案
代理是问题. 您需要确保([maven install]/conf/)下的全局设置settings.xml或用户设置($ {user.home}/.m2)下的代理部分正确配置
Proxy is the problem. You need to ensure the proxies section in either the global settings settings.xml under ([maven install]/conf/) or user settings (${user.home}/.m2 ) is configured correctly
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>proxy.somewhere.com</host>
<port>8080</port>
<username>proxyuser</username>
<password>somepassword</password>
<nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts>
</proxy>
</proxies>
这篇关于春季启动,pom.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!