简体   繁体   English

清单主要属性的签名文件摘要无效,无法执行目标org.codehaus.mojo:exec-maven-plugin

[英]Invalid signature file digest for Manifest main attributes, Failed to execute goal org.codehaus.mojo:exec-maven-plugin

I am writing an app in JavaFx with Humble video . 我正在用JavaFx和Humble video编写一个应用程序。 After adding Humble video dependency to pom file I recieved folowing error: 将低级视频依赖项添加到pom文件后,出现以下错误:

Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
    at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:284)
    at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:238)
    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:675)
    at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:667)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.misc.URLClassPath$JarLoader.ensureOpen(URLClassPath.java:666)
    at sun.misc.URLClassPath$JarLoader.<init>(URLClassPath.java:639)
    at sun.misc.URLClassPath$3.run(URLClassPath.java:366)
    at sun.misc.URLClassPath$3.run(URLClassPath.java:356)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.misc.URLClassPath.getLoader(URLClassPath.java:355)
    at sun.misc.URLClassPath.getLoader(URLClassPath.java:332)
    at sun.misc.URLClassPath.getResource(URLClassPath.java:198)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:364)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 41.410s
Finished at: Tue Jan 27 19:36:23 CET 2015
Final Memory: 20M/208M
------------------------------------------------------------------------
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project VideoRandomizer: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]

My pom file: 我的pom文件:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>pl.edu.radomski</groupId>
    <artifactId>VideoRandomizer</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>VideoRandomizer</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <mainClass>pl.edu.radomski.videorandomizer.MainApp</mainClass>
    </properties>

    <organization>
        <!-- Used as the 'Vendor' for JNLP generation -->
        <name>Your Organisation</name>
    </organization>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>pl.edu.radomski.videorandomizer.MainApp</mainClass>
                        </manifest>
                    </archive>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <id>unpack-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>
                            <excludeScope>system</excludeScope>
                            <excludeGroupIds>junit,org.mockito,org.hamcrest</excludeGroupIds>
                            <outputDirectory>${project.build.directory}/classes</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.2.1</version>
                <executions>
                    <execution>
                        <id>unpack-dependencies</id>

                        <phase>package</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <executable>${java.home}/../bin/javafxpackager</executable>
                            <arguments>
                                <argument>-createjar</argument>
                                <argument>-nocss2bin</argument>
                                <argument>-appclass</argument>
                                <argument>${mainClass}</argument>
                                <argument>-srcdir</argument>
                                <argument>${project.build.directory}/classes</argument>
                                <argument>-outdir</argument>
                                <argument>${project.build.directory}</argument>
                                <argument>-outfile</argument>
                                <argument>${project.build.finalName}.jar</argument>
                            </arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>default-cli</id>
                        <goals>
                            <goal>exec</goal>                            
                        </goals>
                        <configuration>
                            <executable>${java.home}/bin/java</executable>
                            <commandlineArgs>${runfx.args}</commandlineArgs>
                        </configuration>
                    </execution>
                </executions>  
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <compilerArguments>
                        <bootclasspath>${sun.boot.class.path}${path.separator}${java.home}/lib/jfxrt.jar</bootclasspath>
                    </compilerArguments>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.16</version>
                <configuration>
                    <additionalClasspathElements>
                        <additionalClasspathElement>${java.home}/lib/jfxrt.jar</additionalClasspathElement>
                    </additionalClasspathElements>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>io.humble</groupId>
            <artifactId>humble-video-all</artifactId>
            <version>0.2.1</version>
        </dependency>
    </dependencies>
</project>

How to fix this? 如何解决这个问题?

Project is build using Netbeans on Linux Mint 17. 该项目是在Linux Mint 17上使用Netbeans构建的。

The humble-video-all-0.2.1.jar contains a broken/invalid signature which prevents the execution. humble-video-all-0.2.1.jar包含一个损坏的/无效的签名,阻止了执行。

To solve this remove the META-INF folder of this jar (eg using 7-Zip ) and re-upload it to your maven repository manager of choice under a different version and reflect that new version in your pom. 要解决此问题,请删除此jar的META-INF文件夹(例如,使用7-Zip ),然后将其重新上传到您使用其他版本选择的maven存储库管理器中,并在pom中反映该新版本。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Maven错误:无法执行目标org.codehaus.mojo:exec-maven-plugin:1.2.1:exec - Maven error: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec Smooks-无法执行目标org.codehaus.mojo:exec-maven-plugin:1.2.1:exec - Smooks - Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec 无法执行目标org.codehaus.mojo:exec-maven-plugin:1.2.1:exec( - Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec ( 无法执行目标org.codehaus.mojo:exec-maven-plugin:1.2.1:exec - Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec 无法执行目标org.codehaus.mojo:exec-maven-plugin:1.4.0:exec - Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec 未能执行目标 org.codehaus.mojo:exec-maven-plugin:1.5.0:exec - Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.5.0:exec 无法在项目上执行目标 org.codehaus.mojo:exec-maven-plugin:1.6.0:exec(默认):参数“可执行文件”丢失或无效 - Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (default) on project ors: The parameter 'executable' is missing or invalid Maven无法执行目标org.codehaus.mojo:exec-maven-plugin:1.3 - Maven Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.3 无法执行目标org.codehaus.mojo:exec-maven-plugin:1.6.0:java - Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java netbeans运行错误:无法执行目标org.codehaus.mojo:exec-maven-plugin:1.2.1 - netbeans Run error :Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM