我下载了项目的存档,并解压缩它。我把它扔在项目文件夹中,但当我通过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
2条答案
按热度按时间wh6knrhe1#
看起来,您复制的项目引用了另一个项目。如果您打开pom.xml,可能会有一个“parent”部分,其中定义了父项目:
此父项目可能包含具有版本的依赖项。您复制的子模块包含没有版本的依赖项:
您需要同时复制计算机上的父项目,或者手动设置所有依赖项版本。
yvgpqqbh2#
这是一个Sping Boot 项目。要在Netbeans中正确显示该项目,请执行以下操作:
spring-boot-starter-parent
被下载到您的本地maven资源库中,现在Netbeans可以正确地显示项目。