Reputation: 2502
I have a multi module maven project. If I run
mvn clean install
everything works fine. But if I run:
mvn site
I get the following error:
[INFO] --- maven-dependency-plugin:2.4:unpack (copy-war) @ module2 ---
[INFO] Configured Artifact: com.example:module1:1.0-SNAPSHOT:war
Unpacking path\2\module1\target\classes to path\2\module2\target\module1 with includes "" and excludes ""
org.codehaus.plexus.archiver.ArchiverException: The source must not be a directory.
With mvn clean install
at the same point I get:
[INFO] --- maven-dependency-plugin:2.4:unpack (copy-war) @ module2 ---
[INFO] Configured Artifact: com.example:module1:1.0-SNAPSHOT:war
[INFO] Unpacking path\2\module1\target\module1-1.0-SNAPSHOT.war to path\2\module2\target\module1 with includes "" and excludes ""
and everything works fine.
Any idea why the dependency plugin wants to unpack a directory instead of a war?
Upvotes: 0
Views: 823
Reputation: 12087
This is indeed a long standing (since 2007!) bug in maven-dependency-plugin. Have a look at the MDEP-98 JIRA issue for a discussion and possible workarounds.
Upvotes: 0
Reputation: 2502
I found a workaround. I disabled the site plugin for that module:
<plugin>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<generateReports>false</generateReports>
</configuration>
</plugin>
I think the comand fails due to a bug in the site plugin.
Upvotes: 1