[ERROR] Some problems were encountered while processing the POMs:

maven打包报错:

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[WARNING] 'build.plugins.plugin.version' for org.springframework.boot:spring-boot-maven-plugin is missing. @ line 79, column 21
[ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-amqp:jar is missing. @ line 23, column 25
[ERROR] 'dependencies.dependency.version' for mysql:mysql-connector-java:jar is missing. @ line 29, column 25
[ERROR] 'dependencies.dependency.version' for org.projectlombok:lombok:jar is missing. @ line 35, column 25
[ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-test:jar is missing. @ line 41, column 25
[ERROR] 'dependencies.dependency.version' for org.springframework.amqp:spring-rabbit-test:jar is missing. @ line 47, column 25
[ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-web:jar is missing. @ line 53, column 25
[ERROR] 'dependencies.dependency.version' for com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar is missing. @ line 59, column 25
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project org.example:mq_example:1.0-SNAPSHOT (/Users/jerry/yangyi/mq_example/pom.xml) has 7 errors
[ERROR]     'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-amqp:jar is missing. @ line 23, column 25
[ERROR]     'dependencies.dependency.version' for mysql:mysql-connector-java:jar is missing. @ line 29, column 25
[ERROR]     'dependencies.dependency.version' for org.projectlombok:lombok:jar is missing. @ line 35, column 25
[ERROR]     'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-test:jar is missing. @ line 41, column 25
[ERROR]     'dependencies.dependency.version' for org.springframework.amqp:spring-rabbit-test:jar is missing. @ line 47, column 25
[ERROR]     'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-web:jar is missing. @ line 53, column 25
[ERROR]     'dependencies.dependency.version' for com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar is missing. @ line 59, column 25
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

Process finished with exit code 1

原因:maven引入的依赖没有指定版本号

[ERROR] Some problems were encountered while processing the POMs:_第1张图片

如下:

[ERROR] Some problems were encountered while processing the POMs:_第2张图片

如果只想在子类工程中引用这个依赖使用,在子类工程的maven依赖中用:标签包住即可,如果子父类通用,直接添加到父类,不用包.

如下例子:

 
 
    
        org.springframework.boot
        spring-boot-starter-amqp
        2.6.2
    
 

你可能感兴趣的:(spring,spring,boot,java)