简体   繁体   中英

Maven build invalid POM

I am using Spring Boot 1.5.8 as parent POM for my project. While building, it keeps on giving warnings for some POMs. They are not errors, but I am uncomfortable with warnings as they might cause a problem in future that is difficult to trace.

Maven version: 3.5.0

Here is part of POM:

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

Entire POM can be found at: https://paste.ubuntu.com/25828364/

Here is command used to create effective POM:

mvn -X help:effective-pom

Relevant part of the log

[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}

Considering the 1.5.8-RELEASE version of that artifact is indeed of pom packaging, it is possible that you have a network issue.

That would prevent the artifact to be properly downloaded in your maven cached repository, and explain the "unknown version"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM