Maven构建无效的POM

时间:2017-10-18 23:09:59

标签: maven

我使用Spring Boot 1.5.8作为我项目的父POM。在建设过程中,它会继续为某些POM发出警告。它们不是错误,但我对警告感到不舒服,因为它们可能在将来导致难以追查的问题。

Maven版本:3.5.0

以下是POM的一部分:

  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.8.RELEASE</version>
  </parent>

可以在https://paste.ubuntu.com/25828364/

找到整个POM

这是用于创建有效POM的命令:

mvn -X help:effective-pom

日志的相关部分

[DEBUG] =======================================================================
[INFO] 
[INFO] --- maven-help-plugin:2.2:effective-pom (default-cli) @ Apeiron ---
[DEBUG] Using mirror mavenrepo (http://artifactory.zendu.com/mavenrepo) for snapshots (http://snapshots.maven.codehaus.org/maven2).
[WARNING] The POM for org.apache.maven:maven-plugin-api:jar:2.2.1 is invalid, transitive dependencies (if any) will not be available: 3 problems were encountered while building the effective model for org.apache.maven:maven-plugin-api:[unknown-version]
[ERROR] Invalid packaging for parent POM org.apache.maven:maven-plugin-api:[unknown-version], must be "pom" but is "jar" @ 
[ERROR] Invalid packaging for parent POM org.apache.maven:maven-plugin-api:[unknown-version], must be "pom" but is "jar" @ 
[FATAL] The parents form a cycle: org.apache.maven:maven-plugin-api:2.2.1 -> org.apache.maven:maven-plugin-api:2.2.1 @ 

[WARNING] The POM for org.apache.maven:maven-project:jar:2.0.6 is invalid, transitive dependencies (if any) will not be available: 3 problems were encountered while building the effective model for org.apache.maven:maven-project:[unknown-version]
[ERROR] Invalid packaging for parent POM org.apache.maven:maven-project:[unknown-version], must be "pom" but is "jar" @ 
[ERROR] Invalid packaging for parent POM org.apache.maven:maven-project:[unknown-version], must be "pom" but is "jar" @ 
[FATAL] The parents form a cycle: org.apache.maven:maven-project:2.0.6 -> org.apache.maven:maven-project:2.0.6 @ 

[WARNING] The POM for org.apache.maven:maven-model:jar:2.0.6 is invalid, transitive dependencies (if any) will not be available: 3 problems were encountered while building the effective model for org.apache.maven:maven-model:[unknown-version]
[ERROR] Invalid packaging for parent POM org.apache.maven:maven-model:[unknown-version], must be "pom" but is "jar" @ 
[ERROR] Invalid packaging for parent POM org.apache.maven:maven-model:[unknown-version], must be "pom" but is "jar" @ 
[FATAL] The parents form a cycle: org.apache.maven:maven-model:2.0.6 -> org.apache.maven:maven-model:2.0.6 @ 

[WARNING] The POM for org.apache.maven:maven-artifact:jar:2.0.6 is invalid, transitive dependencies (if any) will not be available: 3 problems were encountered while building the effective model for org.apache.maven:maven-artifact:[unknown-version]
[ERROR] Invalid packaging for parent POM org.apache.maven:maven-artifact:[unknown-version], must be "pom" but is "jar" @ 
[ERROR] Invalid packaging for parent POM org.apache.maven:maven-artifact:[unknown-version], must be "pom" but is "jar" @ 
[FATAL] The parents form a cycle: org.apache.maven:maven-artifact:2.0.6 -> org.apache.maven:maven-artifact:2.0.6 @ 

[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=2, ConflictMarker.markTime=1, ConflictMarker.nodeCount=112, ConflictIdSorter.graphTime=2, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=39, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=13, ConflictResolver.conflictItemCount=95, DefaultDependencyCollector.collectTime=821, DefaultDependencyCollector.transformTime=24}

1 个答案:

答案 0 :(得分:1)

考虑到该工件的1.5.8-RELEASE version确实是pom打包,可能是您遇到了网络问题。

这样可以防止工件在maven缓存存储库中正确下载,并解释&#34;未知版本&#34;