gpt4 book ai didi

maven - 使用 Eclipse 构建 Maven 项目时出现 "unknown archiver type"异常

转载 作者:行者123 更新时间:2023-12-02 04:07:37 25 4
gpt4 key购买 nike

我在 Maven 项目中收到以下构建错误:

Build errors for my-project; org.apache.maven.lifecycle.LifecycleExecutionException:
Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.1:unpack- dependencies (unpack-config) on project my-project: Unknown archiver type


pom.xml对于这个项目包含
 <plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-config</id>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<outputDirectory>
${project.build.directory}/${project.build.finalName}/
</outputDirectory>
<includeArtifactIds>my-project-ui</includeArtifactIds>
<includeGroupIds>${project.groupId}</includeGroupIds>
<excludeTransitive>true</excludeTransitive>
</configuration>
</execution>
</executions>
</plugin>

我从 this link得到的理解是

"It will resolve the dependencies (including transitive dependencies) from the repository and unpack them to the specified location."



请帮助我理解这一点。我目前的理解是,我创建的Maven项目会先打包成JAR形式放到repository中。在构建时,该项目将被解压,所需文件将被放置在目标文件夹中。这样对吗?异常的原因是什么?

我尝试了很多搜索,但找不到答案。

最佳答案

好像是这个问题?
http://jira.codehaus.org/browse/MDEP-194
一个解决方案似乎是升级依赖解包插件并指定 mvn install (而不是 mvn test)

关于maven - 使用 Eclipse 构建 Maven 项目时出现 "unknown archiver type"异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6830763/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com