目标org.apache.maven.plugins:maven-dependency-plugin:3.0.0:analyze-only的执行分析失败:此功能需要ASM7

时间:2019-08-01 13:17:10

标签: maven

我正在使用open jdk-11。当我运行Maven时,出现以下错误:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.0.0:analyze-only (analyze) on project mobilefabric-install-common: Execution analyze of goal org.apache.maven.plugins:maven-dependency-plugin:3.0.0:analyze-only failed: This feature requires ASM7 -> [Help 1]


org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.0.0:analyze-only (analyze) on project mobilefabric-install-common: Execution analyze of goal org.apache.maven.plugins:maven-dependency-plugin:3.0.0:analyze-only failed: This feature requires ASM7

Maven版本:3.6.1

pom.xml

<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
<dependencies> 
  <dependency> 
   <groupId>org.ow2.asm</groupId> 
   <artifactId>asm</artifactId> 
   <version>7.2-beta</version> 
  </dependency> 
</dependencies>

1 个答案:

答案 0 :(得分:0)

此配置在Java 11上对我有效:

<plugin>
  <artifactId>maven-dependency-plugin</artifactId>
  <version>3.1.1</version>
  <dependencies>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-dependency-analyzer</artifactId>
      <version>1.11.1</version>
    </dependency>
  </dependencies>
</plugin>

来源:Rune Flobakk's comment on MDEP-613