簡體   English   中英

Jar Manifest 主要屬性的簽名文件摘要無效

[英]Jar Invalid signature file digest for Manifest main attributes

我有一個谷歌雲應用引擎應用程序,這個應用程序是用 Java 11 實現的,並且可以編譯它。 但是由於某種原因,當我在應用程序引擎上部署時,谷歌無法創建此應用程序的實例。

當我通過命令測試 Jar 時: jarsigner -verify <APP-JAR-NAME>

我將收到此錯誤消息: jarsigner: java.lang.SecurityException: Invalid signature file digest for Manifest main attributes

這是我對 Maven Shade 插件的 POM 配置:

<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>

您對可能出現的問題或我應該如何嘗試解決問題有任何想法嗎?

感謝您的每一個幫助。

它可能是由您的依賴項之一引起的。 當您簽署了一些依賴項時,您可能會遇到此類問題。

此處列出的解決方案可能會有所幫助https://stackoverflow.com/a/6743609/15353227

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM