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

Maven - Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4:single (1-pre-dist) on project

我正在使用 wso2 emm 2.2.0 Beta,请参考下面的错误控制台。当我 运行 安装 maven 时,我遇到了 maven 程序集插件问题。

所以请告诉我为什么会这样?并给出一些解决这个问题的建议。

[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.

如果您想构建 WSO2 EMM 2.2.0 Beta,请按照以下步骤操作。

  1. 克隆 product-emm 存储库 git clone https://github.com/wso2/product-emm.git

  2. 检查 v2.2.0-BETA 标签。 git checkout v2.2.0-BETA

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

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

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