1、jar包封装完成后,其他项目引用jar,启动时报错java.lang.SecurityException: Invalid signature file digest for Manifest main attributes

这是因为jar中MATE-INF目录下存在*.SF,*.DSA,*.RSA文件,这些文件中有签名导致错误,删除即可

推荐直接在打包的时候排除掉  pom如下:

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<!-- put your configurations here -->
<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>
</execution>
</executions>
</plugin>
</plugins>
</build>

  

2、maven依赖冲突

idea使用maven helper插件查看依赖冲突,https://plugins.jetbrains.com/plugin/7179-maven-helper

封装jar问题java.lang.SecurityException: Invalid signature file digest for Manifest main attributes以及maven依赖重提解决的更多相关文章

  1. 解决java.lang.SecurityException: Invalid signature file digest for Manifest main attributes

    解决java.lang.SecurityException: Invalid signature file digest for Manifest main attributes 当项目依赖其他jar ...

  2. 执行打的maven jar包时出现“Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes”

    Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for ...

  3. spark提交任务报错: java.lang.SecurityException: Invalid signature file digest for Manifest main attributes

    spark提交任务报错: java.lang.SecurityException: Invalid signature file digest for Manifest main attributes ...

  4. Ubuntu环境下java.lang.SecurityException: Invalid signature file digest for Manifest main attributes

    一.问题描述 Ubuntu环境中,将maven项目打包成jar包传到服务器中后运行以下指令: $ java -cp my.jar com.myproject.Main 遇到报错: java.lang. ...

  5. linux报错jar包时出现“Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes”

    linux安装zip命令: yum install zip zip -d demo.jar META-INF/*.RSA META-INF/*.DSA META-INF/*.SF

  6. Intellij打包jar文件,“java.lang.SecurityException: Invalid signature file digest for Manifest main attrib

    下面是使用Intellij 打包jar文件的步骤,之后会有运行jar文件时遇到的错误. 打包完成. ================================================== ...

  7. idea的jar文件,“java.lang.SecurityException: Invalid signature file digest for Manifest main attribute

    感谢大佬:https://blog.csdn.net/mingyuli/article/details/84674483 命令行运行jar出现问题: 1.找不到主类.打开jar文件包,在MANIFES ...

  8. Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest

    解决办法: 删除对应的jar 包下的文件 zip -d *.jar META-INF/*.RSA META-INF/*.SF

  9. Error- spark streaming 打包将全部依赖打进去Invalid signature file digest for Manifest main attributes

    spark streaming 打包将全部依赖打进去,运行jar包报错:如下 Exception in thread "main" java.lang.SecurityExcept ...

随机推荐

  1. Linq和Lambda 性能对比

    Linq和Lambda 性能对比 1.Where() 使用LINQ创建一个简单的where查询 var query = from person in PersonCollection where pe ...

  2. ELBO surgery: yet another way to carve up the variational evidence lower bound

    目录 概 主要内容 Evidence minus posterior KL Average negative energy plus entropy Average term-by-term reco ...

  3. Gradle sync failed (3 s 402 ms) - Android Studio问题解决方法

    问题:Gradle同步失败 解决方法: 删除gradle-wrpper.jar中的 implementation 'com.android.support:design:30.+' 最后在Build中 ...

  4. PostgreSQL客户端psql常用命令

    使用psql客户端访问数据库, 列出了psql常用命令和参数. 常用命令 -- 使用指定用户和IP端口登陆 psql -h 10.43.159.11 -p 5432 -U postgres -W -- ...

  5. 前端必备,5大mock省时提效小tips,用了提前下班一小时

    ​ 一.一些为难前端的业务场景 在我的工作经历里,需要等待后端童鞋配合我的情形大概有以下几种: a.我们跟外部有项目合作,需要调用到第三方接口. 一般这种情况下,商务那边谈合同,走流程,等第三方审核, ...

  6. Google面试评分卡

    Google对工程面试之前,会让面试人员填一张评分卡,以加强面试官对你的理解,大致内容如下: 0 - 对于相关技术领域还不熟悉. 1 - 可以读懂这个领域的基础知识. 2 - 可以实现一些小的改动,清 ...

  7. visual studio code 修改工具栏风格

    用windows版vscode的同学们是否发现它的工具栏是白色的跟整个界面看起来不太搭调,如下图: 其实要改变标题栏颜色也很简单,点击:文件> 首选项>设置 将 "window. ...

  8. 解决maven每次更新都编程java1.5

    Maven: 每次更新Maven Project ,JAVA 版本都变为1.5 本文转载自:http://www.cnblogs.com/Hxinguan/p/6132446.html 问题: 1.创 ...

  9. Django 优化杂谈

    Django 优化杂谈 Apr 21 2017 总结下最近看过的一些文章,然后想到的一些优化点,整理一下. 数据库连接池 http://mt.dbanotes.net/arch/instagram.h ...

  10. gin框架中的重定向

    重定向redirect func someRedirect(context *gin.Context) { context.Redirect(http.StatusMovedPermanently, ...