部署Maven项目引发java.util.zip.ZipException:无效LOC标头(错误签名)运行我的mvn install..我甚至删除了本地存储库,并再次运行,得到了相同的异常。[错误]未能在项目核心上执行目标org.apache.maven.plugins:maven-shade-plugin:2.1:shade(默认)-批处理:创建阴影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条经验 获得超7个赞
java.util.zip.ZipException
ZipException
JarFile.getManifestFromReference()
name
添加回答
举报
0/150
提交
取消