简体   繁体   中英

Jar Invalid signature file digest for Manifest main attributes

I have a google cloud app engine application, this application is implemented with Java 11, and is possible to compile it. But for some reason when I deploy I on the app engine google cant create an instance of this application.

When I test the Jar by command: jarsigner -verify <APP-JAR-NAME>

I will get this error message: jarsigner: java.lang.SecurityException: Invalid signature file digest for Manifest main attributes

Here is my POM configuration for Maven Shade plugin:

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <configuration>
                            <transformers>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <mainClass>${exec.mainClass}</mainClass>
                                </transformer>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

Do you please have any idea about what can be wrong or how should I try to fix it?

Thanks for every help.

It may be caused by one of your dependencies. when there is some of your dependencies signed, you can face this kinds of issues.

The solution listed here may help https://stackoverflow.com/a/6743609/15353227

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM