码迷,mamicode.com
首页 > 编程语言 > 详细

【异常】Caused by: java.lang.IllegalStateException: Zip64 archives are not supported

时间:2019-07-27 12:56:37      阅读:211      评论:0      收藏:0      [点我收藏+]

标签:ram   参数   mic   des   rsa   异常   mave   created   ati   

1 自己打包Spring boot项目依赖了第三方的Phoenix jar包过大,导致启动后报错

参考了这篇博客:https://cloud.tencent.com/developer/ask/135010

发现是不支持文件数过多,然后根据文章:

技术图片

说到需要改变文件创建方式,自己再点击进去去查询问题:

https://github.com/spring-projects/spring-boot/issues/2895

在这个问题列表后面,大家讨论了,大概有人提交了修复bug,然后,自己去看,发现支持的版本要到Spring boot 2.2.x的版本,现在发布版本最新的才2.0.3,我绝望了,直到最后发现。

技术图片

As a workaround, I switched to use maven shade plugin. It worked!

 

改变Maven的打包插件采用shade插件,查了下这个插件貌似就是把大的jar包拆分

自己的maven shade插件配置,就只保留了这一个打包,自己的参数Main方法,根据自己的项目去调整

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <version>2.1.6.RELEASE</version>
        </dependency>
    </dependencies>
    <!--<configuration>-->
    <!--<includeSystemScope>true</includeSystemScope>-->
    <!--</configuration>-->
    <!--<configuration>-->
    <!--<includeSystemScope>true</includeSystemScope>-->
    <!--</configuration>-->
    <configuration>
        <keepDependenciesWithProvidedScope>true</keepDependenciesWithProvidedScope>
        <createDependencyReducedPom>true</createDependencyReducedPom>
        <filters>
            <filter>
                <artifact>*:*</artifact>
                <excludes>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                </excludes>
            </filter>
        </filters>
    </configuration>
    <executions>
        <execution>
            <phase>package</phase>
            <goals>
                <goal>shade</goal>
            </goals>
            <configuration>
                <transformers>
                    <transformer
                            implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                        <resource>META-INF/spring.handlers</resource>
                    </transformer>
                    <transformer
                            implementation="org.springframework.boot.maven.PropertiesMergingResourceTransformer">
                        <resource>META-INF/spring.factories</resource>
                    </transformer>
                    <transformer
                            implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                        <resource>META-INF/spring.schemas</resource>
                    </transformer>
                    <transformer
                            implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
                    <transformer
                            implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                        <manifestEntries>
                            <Main-Class>com.wm.bigdata.WmBigdataBiApplication</Main-Class>
                        </manifestEntries>
                    </transformer>
                </transformers>
            </configuration>
        </execution>
    </executions>
</plugin>

  

 

最后解决了问题,感谢,最后回复的哪位小哥,解决了我的问题

 

【异常】Caused by: java.lang.IllegalStateException: Zip64 archives are not supported

标签:ram   参数   mic   des   rsa   异常   mave   created   ati   

原文地址:https://www.cnblogs.com/QuestionsZhang/p/11254488.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!