无法执行目标net.alchim31.maven:scala-maven-plugin:3.2.2 [英] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.2.2

查看:198
本文介绍了无法执行目标net.alchim31.maven:scala-maven-plugin:3.2.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在编译Maven项目时,发生以下错误:

While compiling the Maven project the following error occured:

[INFO] --- scala-maven-plugin:3.2.2:compile (scala-compile-first) @ spark-streaming-flume-sink_2.10 --- 
[WARNING] Zinc server is not available at port 3030 - reverting to normal incremental compile 
[INFO] Using incremental compilation 
[INFO] Compiling 6 Scala sources and 3 Java sources to /home/gorlec/Desktop/test/external/flume-sink/target/scala-2.10/classes... 
[ERROR] /home/gorlec/Desktop/test/external/flume-sink/src/main/scala/org/apache/spark/streaming/flume/sink/SparkAvroCallbackHandler.scala:47: identifier expected but 'with' found. 
[ERROR] with Logging { 
[ERROR] ^ 
[ERROR] one error found 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 7.992s 
[INFO] Finished at: Fri Apr 15 17:44:33 CEST 2016 
[INFO] Final Memory: 25M/350M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.2.2:compile (scala-compile-first) on project spark-streaming-flume-sink_2.10: Execution scala-compile-first of goal net.alchim31.maven:scala-maven-plugin:3.2.2:compile failed. CompileFailed -> 
[Help 1] 
[ERROR]

我从pom.xml中删除了属性<useZincServer>true</useZincServer>,但仍然记录错误.

I removed the property <useZincServer>true</useZincServer> from pom.xml, and still the Logging error persists.

[INFO] --- scala-maven-plugin:3.2.2:compile (scala-compile-first) @ spark-streaming-flume-sink_2.10 --- 
[INFO] Using incremental compilation 
[INFO] Compiling 6 Scala sources and 3 Java sources to /home/gorlec/Desktop/test/external/flume-sink/target/scala-2.10/classes... 
[ERROR] /home/gorlec/Desktop/test/external/flume-sink/src/main/scala/org/apache/spark/streaming/flume/sink/SparkAvroCallbackHandler.scala:47: identifier expected but 'with' found. 
[ERROR] with Logging { 
[ERROR] ^ 
[ERROR] one error found 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 5.814s 
[INFO] Finished at: Fri Apr 15 17:41:00 CEST 2016 
[INFO] Final Memory: 25M/335M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.2.2:compile (scala-compile-first) on project spark-streaming-flume-sink_2.10: Execution scala-compile-first of goal net.alchim31.maven:scala-maven-plugin:3.2.2:compile failed. CompileFailed -> 
[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.

我检查了~/.bashrc中是否定义了PATHJAVA_HOME,如下所示:

I checked that PATH and JAVA_HOME are defined in ~/.bashrc as follows:

export PATH=$PATH:/usr/lib/jvm/java-7-openjdk-amd64/bin
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64

我注意到的唯一问题是,尽管我做了source ~/.bashrc,但echo $JAVA_HOME却给出了空的输出​​.

The only issue that I noticed is that echo $JAVA_HOME gives an empty output, though I did source ~/.bashrc.

我们非常感谢您的帮助.

Any help is highly appreciated.

推荐答案

问题可能出在[INFO] Using incremental compilation

在您的pom.xml中,尝试删除该行
<recompileMode>incremental</recompileMode>
,然后重试.

In your pom.xml try to remove the line
<recompileMode>incremental</recompileMode>
and then try again.

这篇关于无法执行目标net.alchim31.maven:scala-maven-plugin:3.2.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆