我有一个多模块 Maven 项目。如果我跑
mvn clean install
一切正常。但是如果我运行:
mvn site
我收到以下错误:
[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.
同时mvn clean install
我得到:
[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 ""
一切正常。
知道为什么依赖插件要解压目录而不是战争吗?