问题描述
执行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>
网友评论