gpt4 book ai didi

java - 无法加载项目(Netbeans IDE)

转载 作者:行者123 更新时间:2023-12-01 18:17:55 26 4
gpt4 key购买 nike

我下载了该项目的存档,并将其解压。我把它放在项目文件夹中,但是当我通过 Netbeans IDE 打开它时 - 我收到错误(项目无法加载)并且缺少包含代码的包奇怪的是在另一台电脑上打开项目却没有问题处理POM时遇到一些问题:

[ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter:jar is missing. @ line 22, column 21
[ERROR] 'dependencies.dependency.version' for org.projectlombok:lombok:jar is missing. @ line 33, column 21
[ERROR] 'dependencies.dependency.version' for org.apache.logging.log4j:log4j-api:jar is missing. @ line 39, column 21
[ERROR] 'dependencies.dependency.version' for org.apache.logging.log4j:log4j-core:jar is missing. @ line 43, column 21
[ERROR] 'dependencies.dependency.version' for org.springframework:spring-core:jar is missing. @ line 54, column 21
[ERROR] 'dependencies.dependency.version' for org.springframework:spring-aspects:jar is missing. @ line 58, column 21
[ERROR] 'dependencies.dependency.version' for org.springframework:spring-context:jar is missing. @ line 62, column 21
[ERROR] 'dependencies.dependency.version' for org.springframework:spring-web:jar is missing. @ line 66, column 21
[ERROR] 'dependencies.dependency.version' for org.springframework:spring-webmvc:jar is missing. @ line 70, column 21
[ERROR] 'dependencies.dependency.version' for org.springframework:spring-orm:jar is missing. @ line 74, column 21
[ERROR] 'dependencies.dependency.version' for org.springframework:spring-tx:jar is missing. @ line 78, column 21

最佳答案

您复制的项目似乎引用了另一个项目。如果您打开 pom.xml,那里可能有一个“parent”部分,其中定义了父项目:

<!-- Identifier of the parent project -->
<parent>
<groupId>...group of your parent project...</groupId>
<artifactId>... artefactId of your parent project ...</artifactId>
<version>... version of your parent project ...</version>
</parent

此父项目可能包含版本依赖项。您复制的子模块包含没有版本的依赖项:

<!-- Version of the dependency is defined in parent pom in dependencyManagement section -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<!-- here should be the version -->
</dependency>

您还需要复制计算机上的父项目,或者手动设置所有依赖项版本。

关于java - 无法加载项目(Netbeans IDE),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60332349/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com