Scala2.11编译

gmxoilav  于 2021-05-24  发布在  Spark
关注(0)|答案(1)|浏览(444)

不确定这是否是发布此问题的正确位置(如果不是,我道歉。如果是这样,请给我指出正确的方向。)
我正在尝试编译apachebahir来生成scala2.11工件(如下所示) mvn clean install -P scala-2.11 -Dscala-2.11 -DskipTests ). 尝试执行此操作时,我遇到以下生成问题:

[INFO] Reactor Summary for Apache Bahir - Parent POM 3.0.0-SNAPSHOT:
[INFO]
[INFO] Apache Bahir - Parent POM .......................... SUCCESS [ 4.166 s]
[INFO] Apache Bahir - Common .............................. SUCCESS [ 20.276 s]
[INFO] Apache Bahir - Spark SQL Cloudant DataSource ....... FAILURE [ 0.147 s]
[INFO] Apache Bahir - Spark SQL Streaming Akka ............ SKIPPED
[INFO] Apache Bahir - Spark SQL Streaming MQTT ............ SKIPPED
[INFO] Apache Bahir - Spark SQL Streaming JDBC ............ SKIPPED
[INFO] Apache Bahir - Spark SQL Streaming SQS ............. SKIPPED
[INFO] Apache Bahir - Spark Streaming Akka ................ SKIPPED
[INFO] Apache Bahir - Spark Streaming MQTT ................ SKIPPED
[INFO] Apache Bahir - Spark Streaming PubNub .............. SKIPPED
[INFO] Apache Bahir - Spark Streaming Google PubSub ....... SKIPPED
[INFO] Apache Bahir - Spark Streaming Twitter ............. SKIPPED
[INFO] Apache Bahir - Spark Streaming ZeroMQ .............. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.877 s
[INFO] Finished at: 2020-10-07T18:42:46-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project spark-sql-cloudant_2.12: Could not resolve
 dependencies for project org.apache.bahir:spark-sql-cloudant_2.12:jar:3.0.0-SNAPSHOT: 
The following artifacts could not be resolved: org.apache.bahir:bahir-common_2.11:jar:3.0.0-
SNAPSHOT, org.apache.bahir:bahir-common_2.11:jar:tests:3.0.0-SNAPSHOT: Failure to find 
org.apache.bahir:bahir-common_2.11:jar:3.0.0-SNAPSHOT in https://repository.apache.org/snapshots
 was cached in the local repository, resolution will not be reattempted until the update 
interval of apache.snapshots has elapsed or updates are forced -> [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/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :spark-sql-cloudant_2.12

在检查 common/target 目录,我看到虽然有一个 scala-2.11 子目录中有编译过的类文件,我看不到合适的 bahir-common_2.11-3.0.0-SNAPSHOT*.jar 正在生成的文件(当 bahir-common_2.12-3.0.0-SNAPSHOT*.jar 似乎生成得很好)。
我想知道这里是否有人能帮上忙。提前谢谢!

c2e8gylq

c2e8gylq1#

我想这是一种方法(?):

$ cd <project_root_dir>
$ ./dev/change-scala-version.sh 2.11
$ mvn clean package -Pscala-2.11 -Dscala-2.11 -DskipTest

附言:如果有人对此有权威的答案,请插话。谢谢!

相关问题