spark 编译遇到的错误及解决办法(一)
[INFO] Building Spark Project Parent POM 2.1.0 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ spark-parent_2.10 --- [INFO] Deleting /usr/spark/spark-2.1.0/target [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Spark Project Parent POM ........................... FAILURE [ 1.877 s] [INFO] Spark Project Sketch ............................... SKIPPED [INFO] Spark Project Networking ........................... SKIPPED [INFO] Spark Project Shuffle Streaming Service ............ SKIPPED [INFO] Spark Project Unsafe ............................... SKIPPED [INFO] Spark Project Tags ................................. SKIPPED [INFO] Spark Project Core ................................. SKIPPED [INFO] Spark Project GraphX ............................... SKIPPED [INFO] Spark Project ML Library ........................... SKIPPED [INFO] Spark Project ML Local Library ..................... SKIPPED [INFO] Spark Project Tools ................................ SKIPPED [INFO] Spark Project Streaming ............................ SKIPPED [INFO] Spark Project Catalyst ............................. SKIPPED [INFO] Spark Project SQL .................................. SKIPPED [INFO] Spark Project Hive ................................. SKIPPED [INFO] Spark Project Assembly ............................. SKIPPED [INFO] Spark Project External Flume ....................... SKIPPED [INFO] Spark Project External Flume Sink .................. SKIPPED [INFO] Spark Project External Flume Assembly .............. SKIPPED [INFO] Spark Project Examples ............................. SKIPPED [INFO] Spark Project REPL ................................. SKIPPED [INFO] Spark Project Launcher ............................. SKIPPED [INFO] Spark Integration for Kafka 0.8 .................... SKIPPED [INFO] Spark Project External Kafka Assembly .............. SKIPPED [INFO] Spark Integration for Kafka 0.10 ................... SKIPPED [INFO] Spark Integration for Kafka 0.10 Assembly .......... SKIPPED [INFO] Kafka 0.10 Source for Structured Streaming ......... SKIPPED [INFO] Spark Project Java 8 Tests ......................... SKIPPED [INFO] Spark Project YARN ................................. SKIPPED [INFO] Spark Project YARN Shuffle Service ................. SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.733 s [INFO] Finished at: 2017-01-16T18:48:27-08:00 [INFO] Final Memory: 25M/66M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:3.0.0:clean (default-clean) on project spark-parent_2.10: Failed to clean project: Failed to delete /usr/spark/spark-2.1.0/target/tmp -> [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/MojoExecutionException
官方解决方案:
忽略clean错误,设置failOnError为false
<build> [...] <plugin> <artifactId>maven-clean-plugin</artifactId> <version>3.0.0</version> <configuration> <failOnError>false</failOnError> </configuration> </plugin> [...] </build>
或者添加代码:
mvn clean -Dmaven.clean.failOnError=false
这里选用的第二种方法,编译通过:
[INFO] Building Spark Project Java 8 Tests 2.1.0 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ java8-tests_2.10 --- [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Spark Project Parent POM ........................... SUCCESS [ 20.695 s] [INFO] Spark Project Sketch ............................... SUCCESS [02:16 min] [INFO] Spark Project Networking ........................... SUCCESS [03:34 min] [INFO] Spark Project Shuffle Streaming Service ............ SUCCESS [02:03 min] [INFO] Spark Project Unsafe ............................... SUCCESS [02:37 min] [INFO] Spark Project Tags ................................. SUCCESS [01:00 min] [INFO] Spark Project Core ................................. SUCCESS [01:05 min] [INFO] Spark Project GraphX ............................... SUCCESS [ 0.009 s] [INFO] Spark Project ML Library ........................... SUCCESS [ 0.032 s] [INFO] Spark Project ML Local Library ..................... SUCCESS [ 0.003 s] [INFO] Spark Project Tools ................................ SUCCESS [ 0.005 s] [INFO] Spark Project Streaming ............................ SUCCESS [ 0.010 s] [INFO] Spark Project Catalyst ............................. SUCCESS [ 6.924 s] [INFO] Spark Project SQL .................................. SUCCESS [ 0.006 s] [INFO] Spark Project Hive ................................. SUCCESS [ 0.012 s] [INFO] Spark Project Assembly ............................. SUCCESS [ 0.013 s] [INFO] Spark Project External Flume ....................... SUCCESS [ 0.002 s] [INFO] Spark Project External Flume Sink .................. SUCCESS [ 0.003 s] [INFO] Spark Project External Flume Assembly .............. SUCCESS [ 0.019 s] [INFO] Spark Project Examples ............................. SUCCESS [ 0.005 s] [INFO] Spark Project REPL ................................. SUCCESS [ 0.003 s] [INFO] Spark Project Launcher ............................. SUCCESS [01:41 min] [INFO] Spark Integration for Kafka 0.8 .................... SUCCESS [ 0.009 s] [INFO] Spark Project External Kafka Assembly .............. SUCCESS [ 0.015 s] [INFO] Spark Integration for Kafka 0.10 ................... SUCCESS [ 0.004 s] [INFO] Spark Integration for Kafka 0.10 Assembly .......... SUCCESS [ 0.015 s] [INFO] Kafka 0.10 Source for Structured Streaming ......... SUCCESS [ 0.004 s] [INFO] Spark Project Java 8 Tests ......................... SUCCESS [ 0.005 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 14:46 min [INFO] Finished at: 2017-01-16T18:54:15-08:00 [INFO] Final Memory: 26M/66M [INFO] ------------------------------------------------------------------------