当前位置: 首页 > 知识库问答 >
问题:

Netbeans上maven项目中的Spring-boot-start jar加载错误

程毅
2023-03-14

我从https://start.spring.io/加载了一个新的Spring Boot应用程序(版本2.0.0),并尝试使用netbeans IDE构建它。

在maven构建过程中,我遇到了以下错误:

The build could not read 1 project -> [Help 1]

  The project com.deepit.springboot.example:spring-boot-in-deep:0.0.1-SNAPSHOT (~=NetBeansProjects\spring-boot-in-deep\pom.xml) has 1 error
    Non-resolvable parent POM: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.0.BUILD-SNAPSHOT from/to spring-snapshots (https://repo.spring.io/snapshot): repo.spring.io and 'parent.relativePath' points at no local POM @ line 14, column 10: Unknown host repo.spring.io -> [Help 2]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

共有1个答案

衡翰翮
2023-03-14

http://maven.apache.org/xsd/maven-4.0.0.xsd“>4.0.0

<groupId>com.deepit.springboot.example</groupId>
<artifactId>spring-boot-in-deep</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>spring-boot-in-deep</name>
<description>Demo project for Spring Boot</description>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.0.BUILD-SNAPSHOT</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>1.8</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>

<repositories>
    <repository>
        <id>spring-snapshots</id>
        <name>Spring Snapshots</name>
        <url>https://repo.spring.io/snapshot</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
    <repository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>https://repo.spring.io/milestone</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>

<pluginRepositories>
    <pluginRepository>
        <id>spring-snapshots</id>
        <name>Spring Snapshots</name>
        <url>https://repo.spring.io/snapshot</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </pluginRepository>
    <pluginRepository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>https://repo.spring.io/milestone</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </pluginRepository>
</pluginRepositories>
 类似资料:
  • 我尝试在本地运行基于maven的spring proyect,但没有修改pom,但它不起作用,我得到以下错误(将${IP}替换为http://172.24.14.196:8888,因为我的排名不能发布超过2个链接): [信息]正在扫描项目...下载:${IP}/archiva/repository/internal/org/springframework/boot/spring-boot-star

  • 这是我的文件: 这是Maven命令输出

  • 我试图移动到maven作为构建系统,以便对依赖关系进行更标准的管理。 以下是我做的步骤和我问的简单问题。这个过程是我能想到的最简单的,所以这个问题应该很容易重现。 让我们从文件、新项目、Maven和Web应用程序开始。在下面的表单中,我保留了所有默认值,但对于应用服务器字段,我选择了“ApacheTomcat 7.0.11.0”。我注意到,这个向导没有提出任何框架(Sring、Hibernate等

  • 我正在尝试使用,要做到这一点,我必须通过他们的。我目前也在使用NetBeans,据我所知,它应该与它们以后的版本(后来的意思是6.5)一起提供,但是在创建项目时,我没有这样的选项来使用maven。 另外,我检查了插件,那里没有maven插件,我需要手动安装插件吗? 感谢任何回复!

  • 当我右键单击Maven项目并选择AddDependency选项,然后在查询中键入外部jar的名称时,找不到它。如何将外部jar添加到Maven项目中?