Maven - 无法执行目标org.apache.maven.plugins:maven-assembly-plugin:2.4:单项(1-pre-dist)项目

时间:2016-10-27 08:20:00

标签: maven wso2 wso2-emm

我正在使用wso2 emm 2.2.0 Beta,请参阅以下错误控制台。当我运行maven安装时,我遇到了maven assembly插件问题。

那么请让我知道它为什么会发生?并提出一些解决此问题的建议。

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building WSO2 Mobile Device Manager (MDM) - Distribution 2.2.0-BETA2
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- incremental-build-plugin:1.3:incremental-build (default) @ wso2emm ---
[INFO] Verifying module descriptor ...
[INFO] Verifying parent modules...
[INFO] Verifying resources...
[INFO] Resources directory does not exist : /home/next/Praveen/Project/secureON/Project/Project_Setup/product-emm-2.2.0-BETA2/modules/distribution/src/main/resources
[INFO] Verifying sources...
[INFO] No sources to check ...
[INFO] 
[INFO] --- buildnumber-maven-plugin:1.3:create (default) @ wso2emm ---
[INFO] Storing buildNumber: 27 Oct 2016 at timestamp: 1477554746130
[WARNING] Cannot get the branch information from the git repository: 
Detecting the current branch failed: fatal: Not a git repository (or any of the parent directories): .git

[INFO] Executing: /bin/sh -c cd /home/next/Praveen/Project/secureON/Project/Project_Setup/product-emm-2.2.0-BETA2/modules/distribution && git rev-parse --verify HEAD
[INFO] Working directory: /home/next/Praveen/Project/secureON/Project/Project_Setup/product-emm-2.2.0-BETA2/modules/distribution
[INFO] Storing buildScmBranch: UNKNOWN_BRANCH
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ wso2emm ---
[INFO] 
[INFO] --- maven-assembly-plugin:2.4:single (1-pre-dist) @ wso2emm ---
[INFO] Reading assembly descriptor: /home/next/Praveen/Project/secureON/Project/Project_Setup/product-emm-2.2.0-BETA2/modules/distribution/src/assembly/dist.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.203s
[INFO] Finished at: Thu Oct 27 13:22:26 IST 2016
[INFO] Final Memory: 13M/188M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4:single (1-pre-dist) on project wso2emm: Failed to create assembly: Error creating assembly archive dist: You must set at least one file.

1 个答案:

答案 0 :(得分:1)

如果您想构建WSO2 EMM 2.2.0 Beta,请遵循以下步骤。

  1. 克隆产品-emm回购 git clone https://github.com/wso2/product-emm.git

  2. 查看v2.2.0-BETA标记。 git checkout v2.2.0-BETA

  3. 从root pom构建。转到项目根文件夹并发出 mvn clean install

  4. 如果您只想要产品zip,可以为该项目根目录构建分发模块 - >模块 - >分发文件夹并从那里发出mvn clean install。您可以在distribution/target文件夹中找到构建zip文件。

    好像你在主分公司。在创建emm beta标签后添加了失败的maven目标。失败的原因是,在构建时它尝试连接到互联网上的某些资源,而您的计算机无法连接到互联网上的资源。如果你真的想要建立主分支(2.2.0-SNAPSHOT),只需检查你的互联网连接或防火墙阻塞。