获取“未知的存档器类型". Eclipse构建Maven项目时出现异常 [英] Getting "unknown archiver type" exception when building Maven project with Eclipse

查看:78
本文介绍了获取“未知的存档器类型". Eclipse构建Maven项目时出现异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am getting the following build error in my Maven project:

我的项目的构建错误; org.apache.maven.lifecycle.LifecycleExecutionException:
无法执行目标org.apache.maven.plugins:maven-dependency-plugin:2.1:unpack- 项目my-project上的依赖项(unpack-config):未知的存档器类型

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>

我从此链接获得的理解是

它将从存储库中解决依赖性(包括传递性依赖性)并将其解压缩到指定位置."

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

请帮助我理解这一点.我目前的理解是,我创建的Maven项目将首先以JAR格式打包并放入存储库中.在生成时,将解压缩该项目,并将所需的文件放置在目标文件夹中.这样对吗?造成异常的原因是什么?

Please help me understand this point. My current understanding is that the Maven project created by me will be first packed in JAR form and put in the repository. At build time, this project will be unpacked, and the required files will be placed in the target folder. Is this correct? And what is the cause of the exception?

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

I tried searching a lot, but couldn't find an answer.

推荐答案

看起来像这个问题吗? http://jira.codehaus.org/browse/MDEP-194 一种解决方案似乎是升级dependency-unpack插件并指定mvn install(而不是mvn测试)

Looks like this issue? http://jira.codehaus.org/browse/MDEP-194 A solution seems to be to upgrade the dependency-unpack plugin and specify mvn install (instead of mvn test)

这篇关于获取“未知的存档器类型". Eclipse构建Maven项目时出现异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆