【问题标题】:Maven - Invalid signature file digest for Manifest main attributesMaven - Manifest 主要属性的签名文件摘要无效
【发布时间】:2021-05-17 16:26:57
【问题描述】:

Java 和 Maven 新手。

尝试向包 pulsar-functions-local-runner 添加依赖项时出现错误:

Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5:assembly (make-assembly) on project java-function: Execution make-assembly of goal org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5:assembly failed: Invalid signature file digest for Manifest main attributes

使用 maven 3.6.3.

我在网上搜索了 3 个小时后,我错过了什么?

这是我的pom.xml 文件:

<?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>java-function</groupId>
    <artifactId>java-function</artifactId>
    <version>1.0-SNAPSHOT</version>

    <dependencies>
        <dependency>
            <groupId>org.apache.pulsar</groupId>
            <artifactId>pulsar-functions-api</artifactId>
            <version>2.7.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.pulsar</groupId>
            <artifactId>pulsar-functions-local-runner</artifactId>
            <version>2.7.0</version>
        </dependency>
    </dependencies>

    <build>
        <sourceDirectory>src/</sourceDirectory>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>                
                <version>3.8.0</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <appendAssemblyId>false</appendAssemblyId>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                    <archive>
                    <manifest>
                        <mainClass>org.example.test.ExclamationFunction</mainClass>
                    </manifest>
                </archive>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>assembly</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>

【问题讨论】:

    标签: java maven


    【解决方案1】:

    我猜他们在 2.7.0 的 jar 中做了一些更改,因为更改为 pulsar-functions-local-runner 2.6.0 解决了问题

    【讨论】:

      猜你喜欢
      • 2018-10-05
      • 2019-12-18
      • 2015-11-14
      • 2019-03-03
      • 2015-11-22
      • 1970-01-01
      • 2012-08-29
      • 2018-11-13
      • 2016-04-23
      相关资源
      最近更新 更多