我已经从 github 克隆了 spark 项目,并将 scoverage 插件添加到父 pom.xml 中,并将zincZerver 设置为 false 并在 pom.xml 中添加了一个报告标签,以下是我对 pom.xml 所做的更改。
<useZincServer>false</useZincServer>
在属性标签中
<scoverage.scalacPluginVersion>1.3.1</scoverage.scalacPluginVersion>
<scoverage.aggregate>true</scoverage.aggregate>
构建后
<reporting>
<plugins>
<plugin>
<groupId>org.scoverage</groupId>
<artifactId>scoverage-maven-plugin</artifactId>
<version>1.3.0</version>
<reportSets>
<reportSet>
<reports>
<report>report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
进行更改后,我对 make-distribution.sh 的构建命令进行了更改,即:
BUILD_COMMAND=("$MVN" -T 1C -DskipTests clean scoverage:package $@)
现在,在运行命令 make-distribution.sh --pip --r --tzg 和所有其他带有 --mvn -DskipTests clean package 的标签时,它给了我这个输出。
+ DISTDIR=/home/linuxuser/spark-new/spark/dist
+ MAKE_TGZ=false
+ MAKE_PIP=false
+ MAKE_R=false
+ NAME=none
+ MVN=/home/linuxuser/spark-new/spark/build/mvn
+ (( 17 ))
+ case $1 in
+ NAME=custom-scoverage-spark
+ shift
+ shift
+ (( 15 ))
+ case $1 in
+ MAKE_PIP=true
+ shift
+ (( 14 ))
+ case $1 in
+ MAKE_R=true
+ shift
+ (( 13 ))
+ case $1 in
+ MAKE_TGZ=true
+ shift
+ (( 12 ))
+ case $1 in
+ break
+ '[' -z /opt/java ']'
+ '[' -z /opt/java ']'
++ command -v git
+ '[' /usr/bin/git ']'
++ git rev-parse --short HEAD
+ GITREV=5f4b50513c
+ '[' '!' -z 5f4b50513c ']'
+ GITREVSTRING=' (git revision 5f4b50513c)'
+ unset GITREV
++ command -v /home/linuxuser/spark-new/spark/build/mvn
+
'[' '!' /home/linuxuser/spark-new/spark/build/mvn ']'
++ /home/linuxuser/spark-new/spark/build/mvn help:evaluate -Dexpression=project.version -Psparkr -Phadoop-2.7 -Phive -Phive-thriftserver -Pmesos -Pyarn -Pkubernetes --mvn -DskipTests clean package -Dscala.version=2.12.6
++ grep -v INFO
++ grep -v WARNING
++ tail -n 1
+ VERSION=' -X,--debug Produce execution debug output
'
有人可以告诉我出了什么问题,这将非常有帮助。
谢谢