部署Maven項目引發(fā)java.util.zip.ZipException:無效LOC標頭(錯誤簽名)運行我的mvn install..我甚至刪除了本地存儲庫,并再次運行,得到了相同的異常。[錯誤]未能在項目核心上執(zhí)行目標org.apache.maven.plugins:maven-shade-plugin:2.1:shade(默認)-批處理:創(chuàng)建陰影JAR:無效loc標頭(錯誤簽名)->[幫助1]<?xml version="1.0" encoding="UTF-8"?><plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.1</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<excludes>
<exclude>commons-logging:commons-logging:jar:*</exclude>
</excludes>
</artifactSet>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<!-- workaround for a spring issues -->
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
<!-- don't want to pick up any other log4j.xml -->
<exclude>log4j.xml</exclude>
</excludes>
</filter>
</filters>
<!-- May be needed to work around another issue in Spring -->
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.handlers</resource>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.schemas</resource>
</transformer>
</transformers>
</configuration>
</execution>
</executions></plugin>
3 回答

回首憶惘然
TA貢獻1847條經驗 獲得超11個贊
mvn spring-boot:run
mvn spring-boot:run
.m2

largeQ
TA貢獻2039條經驗 獲得超8個贊
java.util.zip.ZipException
ZipException
JarFile.getManifestFromReference()
name
添加回答
舉報
0/150
提交
取消