1

依存関係を分析しようとしていますが、「マニフェストの主な属性の署名ファイル ダイジェストが無効です」という問題が発生しました。署名されたjarが変更されたことが原因であることはわかっています。しかし、そこには多くの依存関係の jar があることを知っています。どの署名付き jar が変更されたかを識別するツールはありますか?

エラーログはここにあります:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin: 2.1:analyze (default-cli) on project XXX: Execution default-cli of goal org.apache.maven.plugins:maven-dependency-plugin:2.1:analyze failed: Invalid signature file digest for Manifest main attributes -> [Help 1]

4

1 に答える 1

0

私はまったく同じ問題を抱えています、

私の場合、pom.xml に以下を追加して修正します。

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>2.10</version>
            <executions>
                <execution>
                    <id>Analize</id>
                    <goals>
                        <goal>analyze</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        .
        .
        .
    </plugins>
    .
    .
    .
</build>

問題自体の詳細が必要な場合は、これが

mvn dependency:analyze -X

印刷済み (問題を修正する前):

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.1:analyze 
(default-cli) on project com.yourproject: 
Execution default-cli of goal org.apache.maven.plugins:maven-dependency-plugin:2.1:analyze failed: 
Invalid signature file digest for Manifest main attributes -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:
maven-dependency-plugin:2.1:analyze (default-cli) on project com.yourproject: 
Execution default -cli of goal org.apache.maven.plugins:maven-dependency-plugin:2.1:analyze failed: 
Invalid signature file digest for Manifest main attributes
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal 
org.apache.maven.plugins:maven-dependency-plugin:2.1:analyze failed: Invalid signature file digest for Manifest main attributes
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 19 more
Caused by: java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
        at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:286)
        at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:239)
        at java.util.jar.JarVerifier.processEntry(JarVerifier.java:317)
        at java.util.jar.JarVerifier.update(JarVerifier.java:228)
        at java.util.jar.JarInputStream.read(JarInputStream.java:212)
        at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:139)
        at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:117)
        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)
        at org.apache.maven.plugin.dependency.AbstractAnalyzeMojo.checkDependencies(AbstractAnalyzeMojo.java:168)
        at org.apache.maven.plugin.dependency.AbstractAnalyzeMojo.execute(AbstractAnalyzeMojo.java:152)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
        ... 20 more
[ERROR]
[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/PluginExecutionException

しかし、ビルド時に maven-dependency-plugin を追加するとすぐに (上記のように)、消えてしまいました!

于 2015-04-22T14:50:52.017 に答える