Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
maven站点解包错误_Maven_Maven Dependency Plugin - Fatal编程技术网

maven站点解包错误

maven站点解包错误,maven,maven-dependency-plugin,Maven,Maven Dependency Plugin,我有一个多模块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

我有一个多模块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清洁安装
在同一点上,我得到:

[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 ""
一切正常


知道依赖插件为什么要解压目录而不是war吗?

我找到了一个解决方法。我禁用了该模块的站点插件:

        <plugin>
            <artifactId>maven-site-plugin</artifactId>
            <configuration>
                <generateReports>false</generateReports>
            </configuration>
        </plugin>

maven站点插件
假的

我认为comand失败的原因是站点插件中的一个bug。

这确实是maven依赖插件中一个长期存在的bug(自2007年以来!)。请查看以进行讨论和可能的解决方法

不确定为什么会-1'ed,这似乎是一个合理的问题,在哪个阶段运行“maven dependency plugin:2.4:unpack”?该插件是在构建阶段定义的。如果有人在-1提问时给出原因,那就太好了。