4

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

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

The pom.xml for this project contains

 <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>

The understanding I got from this link is

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

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.

Pops
  • 30,199
  • 37
  • 136
  • 151
Anupam Gupta
  • 1,591
  • 8
  • 36
  • 60
  • How about stacktrace - can you run mvn -e and edit the question with this? Perhaps it is related to http://mail-archives.apache.org/mod_mbox/maven-users/201004.mbox/%3Cp2pc67f754e1004160644se64c9e39h702566460b7fd1d5@mail.gmail.com%3E – Raghuram Jul 26 '11 at 13:38

1 Answers1

1

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)

Nicolas Mommaerts
  • 3,207
  • 4
  • 35
  • 55