美文网首页
mvn dependency:analyze使用默认插件问题记录

mvn dependency:analyze使用默认插件问题记录

作者: 佛系小懒 | 来源:发表于2020-03-10 08:20 被阅读0次

    问题描述

    执行mvn dependency:analyze,出现如下错误:

    Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.1:analyze (default-cli) on project AllureTestNG: Cannot analyze dependencies: invalid distance too far back -> [Help 1]

    执行mvn dependency:analyze -X,出现如下错误提示:

    Caused by: java.util.zip.ZipException: invalid distance too far back

    at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:164)

    at java.util.zip.ZipInputStream.read(ZipInputStream.java:194)

    at java.util.jar.JarInputStream.read(JarInputStream.java:207)

    at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:140)

    at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:118)

    at java.util.jar.JarInputStream.getNextEntry(JarInputStream.java:142)

    at java.util.jar.JarInputStream.getNextJarEntry(JarInputStream.java:179)

    at org.apache.maven.shared.dependency.analyzer.ClassFileVisitorUtils.acceptJar(ClassFileVisitorUtils.java:99)

    at org.apache.maven.shared.dependency.analyzer.ClassFileVisitorUtils.accept(ClassFileVisitorUtils.java:60)

    at org.apache.maven.shared.dependency.analyzer.DefaultClassAnalyzer.analyze(DefaultClassAnalyzer.java:46)

    at org.apache.maven.shared.dependency.analyzer.DefaultProjectDependencyAnalyzer.buildArtifactClassMap(DefaultProjectDependencyAnalyzer.java:153)

    at org.apache.maven.shared.dependency.analyzer.DefaultProjectDependencyAnalyzer.analyze(DefaultProjectDependencyAnalyzer.java:72)

    ... 23 more

    解决方法

    在pom.xml中显示使用插件maven-dependency-plugin的其他版本:

    <plugin>

        <groupId>org.apache.maven.plugins</groupId>

        <artifactId>maven-dependency-plugin</artifactId>

        <version>3.1.1</version>

    </plugin>

    相关文章

      网友评论

          本文标题:mvn dependency:analyze使用默认插件问题记录

          本文链接:https://www.haomeiwen.com/subject/tdmvdhtx.html