spark 编译遇到的错误及解决办法(五)

终端错误提示:

Saving to outputFile=/usr/spark/spark-2.0.2/streaming/target/scalastyle-output.xml
Processed 195 file(s)
Found 101 errors

打开scalastyle-output.xml文件后,发现错误全是由scalastyle引起的,类似:

<file name="/usr/spark/spark-2.0.2/streaming/src/main/scala/org/apache/spark/streaming/util/._FileBasedWriteAheadLogReader.scala"><error severity="error" message="Could not read file, caught MalformedInputException"/></file>

对于这种问题的解决,是打开pom.xml,找到scalastyle标签,将配置标签下的true都改为false

<plugin><groupId>org.scalastyle</groupId><artifactId>scalastyle-maven-plugin</artifactId><version>0.8.0</version><configuration><verbose>false</verbose><failOnViolation>true</failOnViolation><includeTestSourceDirectory>false</includeTestSourceDirectory><failOnWarning>false</failOnWarning><sourceDirectory>${basedir}/src/main/scala</sourceDirectory><testSourceDirectory>${basedir}/src/test/scala</testSourceDirectory><configLocation>scalastyle-config.xml</configLocation><outputFile>${basedir}/target/scalastyle-output.xml</outputFile><inputEncoding>${project.build.sourceEncoding}</inputEncoding><outputEncoding>${project.reporting.outputEncoding}</outputEncoding></configuration>
View Code
原文地址:https://www.cnblogs.com/o-din/p/6442615.html