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.
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)
精彩评论