部署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>
回首忆惘然
largeQ
相关分类