java - maven 打包依赖重复 求大佬
巴扎黑
巴扎黑 2017-07-03 11:43:25
[Java讨论组]

报错信息:

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
    at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:314)
    at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:268)
    at java.util.jar.JarVerifier.processEntry(JarVerifier.java:316)
    at java.util.jar.JarVerifier.update(JarVerifier.java:228)
    at java.util.jar.JarFile.initializeVerifier(JarFile.java:383)
    at java.util.jar.JarFile.getInputStream(JarFile.java:450)
    at sun.misc.JarIndex.getJarIndex(JarIndex.java:137)
    at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:839)
    at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:831)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.misc.URLClassPath$JarLoader.ensureOpen(URLClassPath.java:830)
    at sun.misc.URLClassPath$JarLoader.(URLClassPath.java:803)
    at sun.misc.URLClassPath$3.run(URLClassPath.java:530)
    at sun.misc.URLClassPath$3.run(URLClassPath.java:520)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.misc.URLClassPath.getLoader(URLClassPath.java:519)
    at sun.misc.URLClassPath.getLoader(URLClassPath.java:492)
    at sun.misc.URLClassPath.getNextLoader(URLClassPath.java:457)
    at sun.misc.URLClassPath.getResource(URLClassPath.java:211)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:365)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)

facade_app.jar pom.xml:


    
        iot_cloud
        com.iot.nero
        1.0-SNAPSHOT
    
    4.0.0

    facade_app
    jar

    facade_app
    http://maven.apache.org

    
        UTF-8
    


    
        
            com.iot.nero
            parent_app
            1.0-SNAPSHOT
        
        
            com.iot.nero
            common
            1.0-SNAPSHOT
        
        
            junit
            junit
            4.12
        
    


    
        
            
                org.apache.maven.plugins
                maven-shade-plugin
                1.4
                
                    
                        package
                        
                            shade
                        
                        
                            
                                
                                    *:*
                                    
                                        META-INF/*.SF
                                        META-INF/*.DSA
                                        META-INF/*.RSA
                                    
                                
                            
                            
                                
                                    com.defonds.RsaEncryptor
                                
                                
                                    META-INF/spring.handlers
                                
                                
                                    META-INF/spring.schemas
                                
                            
                        
                    
                
            
        
    

parent_app pom.xml


    
        iot_cloud
        com.iot.nero
        1.0-SNAPSHOT
    
    4.0.0

    parent_app
    jar

    parent_app
    http://maven.apache.org

    
        UTF-8
    

    
        
            com.iot.nero
            parent
            1.0-SNAPSHOT
        
    

parent pom.xml


    
        iot_cloud
        com.iot.nero
        1.0-SNAPSHOT
    
    4.0.0

    parent
    jar

    parent
    http://maven.apache.org

    
        UTF-8
    

    
        
    

common pom.xml


    
        iot_cloud
        com.iot.nero
        1.0-SNAPSHOT
    
    4.0.0

    common
    jar

    common
    http://maven.apache.org

    
        UTF-8
    

    
        
            org.slf4j
            slf4j-api
            1.7.12
        
        
            ch.qos.logback
            logback-core
            1.1.1
        
        
            ch.qos.logback
            logback-classic
            1.1.1
        
        

        

        
            mysql
            mysql-connector-java
            5.1.35
            runtime
        
        
            c3p0
            c3p0
            0.9.1.2
        
        
        
            org.mybatis
            mybatis
            3.3.0
        


        
            org.mybatis
            mybatis-spring
            1.2.3
        

        
        
        
            com.fasterxml.jackson.core
            jackson-core
            2.5.4
        

        
            com.fasterxml.jackson.core
            jackson-databind
            2.5.4
        
        
        
            com.fasterxml.jackson.core
            jackson-annotations
            2.5.4
        



        
            javax.servlet
            javax.servlet-api
            3.1.0
        

        
        
            org.springframework
            spring-core
            4.1.7.RELEASE
        
        
            org.springframework
            spring-context
            4.1.7.RELEASE
        
        
            org.springframework
            spring-beans
            4.1.7.RELEASE
        
        
            org.springframework
            spring-jdbc
            4.1.7.RELEASE
        
        
            org.springframework
            spring-tx
            4.1.7.RELEASE
        
        
            org.springframework
            spring-web
            4.1.7.RELEASE
        
        
            org.springframework
            spring-webmvc
            4.1.7.RELEASE
        

        
        
            org.springframework
            spring-test
            4.1.7.RELEASE
        


        
        
            javax.mail
            mail
            1.5.0-b01
        

        
        
            org.apache.commons
            commons-email
            1.4
        

        
        
            io.netty
            netty-all
            5.0.0.Alpha2
        
        
        
            com.alibaba
            dubbo
            2.5.3
            
                
                    spring
                    org.springframework
                
            
        

        
        
            org.ow2.util.bundles
            zookeeper-3.3.1
            1.0.0
        
        
        
            com.github.sgroschupf
            zkclient
            0.1
        

    


    
        META-INF/*.SF
        META-INF/*.DSA
        META-INF/*.RSA
        junit:junit
    

facade_app.jar

类都有两份
求大神帮忙

巴扎黑
巴扎黑

全部回复(1)
ringa_lee

是不是因为

<excludes>
    <exclude>META-INF/*.SF</exclude>
    <exclude>META-INF/*.DSA</exclude>
    <exclude>META-INF/*.RSA</exclude>
</excludes>

然后再MAINFEST.ME 上又存在定义

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号