首页 > 解决方案 > 计算有效 POM 时如何防止出现未知打包“捆绑”错误

问题描述

我正在从命令行读取有效的 POM(使用此处描述的方法:如何在帮助中指定工件:有效的 pom?

对于工件:

<dependency>
    <groupId>com.typesafe.scala-logging</groupId>
    <artifactId>scala-logging_2.12</artifactId>
    <version>3.7.2</version>
</dependency>

使用命令:

mvn help:effective-pom -Dartifact=com.typesafe.scala-logging:scala-logging_2.12:3.7.2

我收到此错误:

[INFO] Scanning for projects...
[INFO] 
[INFO] ---------------------------< mvntmp:mvntmp >----------------------------
[INFO] Building mvntmp 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-help-plugin:3.2.0:effective-pom (default-cli) @ mvntmp ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.540 s
[INFO] Finished at: 2020-05-20T15:26:34+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-help-plugin:3.2.0:effective-pom (default-cli) on project mvntmp: Unable to get the POM for the artifact 'com.typesafe.scala-logging:scala-logging_2.12:3.7.2'. Verify the artifact parameter.: Some problems were encountered while processing the POMs:
[ERROR] [ERROR] Unknown packaging: bundle @ line 6, column 16: 1 problem was encountered while building the effective model for com.typesafe.scala-logging:scala-logging_2.12:3.7.2
[ERROR] [ERROR] Unknown packaging: bundle @ line 6, column 16
[ERROR] -> [Help 1]
[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/MojoExecutionException

标签: mavenbundleeffective-pom

解决方案


推荐阅读