首页 文章

ubuntu上的STS:不可解析的父POM无法转移org.springframework.boot:spring-boot-starter-parent:pom:2.0.3.RELEASE

提问于
浏览
0

我正在努力研究ubuntu,我遇到了刚安装的STS问题 . 这是一个玩具项目,我没有任何代理,因为我正在使用我的家庭网络,互联网似乎工作得很好 . 我认为问题是ubuntu相关,因为我在我的Windows计算机上安装了相同版本的STS,它对我的项目没有任何问题 .

我试图在互联网上搜索,但没有一个解决方案有帮助,我找不到任何ubuntu特定的解决方案 . 我的POM只是:http://maven.apache.org/xsd/maven-4.0.0.xsd“> 4.0.0

<groupId>com.globomatics</groupId>
<artifactId>bike</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>bike</name>
<description>Demo project for Spring Boot</description>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.3.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>10</java.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
</dependencies>

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

错误是:

项目构建错误:com.globomatics的不可解析的父POM:bike:0.0.1-SNAPSHOT:无法传输org.springframework.boot:来自https://repo.maven.apache.org/maven2的spring-boot-starter-parent:pom:2.0.3.RELEASE被缓存在本地存储库中,在中心的更新间隔过去或强制更新之前,不会重新尝试解析 . 原始错误:无法传输工件org.springframework.boot:spring-boot-starter-parent:pom:2.0.3.RELEASE from / to central(https://repo.maven.apache.org/maven2):java.lang.RuntimeException:意外错误:java.security.InvalidAlgorithmParameterException :trustAnchors参数必须为非空且'parent.relativePath'指向无本地POM pom.xml / bike line 14 Maven pom加载问题

2 回答

  • 0

    我想你只需要将Java版本更新到最近的Java 8或更新版本 .

    这是因为与Maven Central的连接现在需要TLS 1.2,这不是Java早期版本中的默认设置,这可以解释为什么Maven无法下载您的父pom .

    有关详细信息,请参见Could not transfer artifact (https://repo.maven.apache.org/maven2): Received fatal alert: protocol_version -> [Help 1] .

  • 0

    当我试图从Marketplace获得Gradle插件时,问题刚刚解决了 .

    不知何故我的STS中的Internet连接没有完全激活,通过安装插件,我将其激活,maven可以下载pom中的依赖项 .

相关问题