alluxio 编译源码遇到如下错误
[ERROR] Failed to execute goal org.codehaus.mojo:buildnumber-maven-plugin:1.4:create-metadata (default) on project alluxio-core-common: Execution default of goal org.codehaus.mojo:buildnumber-maven-plugin:1.4:create-metadata failed.: NullPointerException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :alluxio-core-common
这种错误原因是缺少 .git 信息,使用
git clone https://user:pass@github.com/alluxio/alluxio.git -b v2.7.3 alluxio-2.7.3
替代从release下载的源码包,生成git信息即可解决
然后在alluxio/alluxio-maven 容器内使用类似以下命令即可编译。
mvn install -Phadoop-3 -Dhadoop.version=3.2.1 -DskipTests