Eclipse에서 Apache Spark 종속성이있는 Scala 프로젝트를 설정할 수 없습니다. Eclipse에서 Scala IDE 플러그인 및 Gradle 플러그인 사용. build.gradle
프로젝트는 다음과 같습니다.
apply plugin: 'scala'
apply plugin: 'eclipse'
repositories{
mavenCentral()
mavenLocal()
}
dependencies{
compile 'org.slf4j:slf4j-api:1.7.5'
compile "org.scala-lang:scala-library:2.11.2"
compile 'com.sparkjava:spark-core:2.3'
testCompile "junit:junit:4.11"
}
task run(type: JavaExec, dependsOn: classes) {
main = 'Main'
classpath sourceSets.main.runtimeClasspath
classpath configurations.runtime
}
아래에서 Referenced Libraries
spark-core-2.3.jar을 볼 수 있습니다. 하지만 Spark 라이브러리를 Scala 클래스로 가져올 수 없습니다. 명령을
실행하려고 gradle eclipse
했지만 운이 없었습니다.
잘못된 종속성을 참조하고 있습니다. com.sparkjava:spark-core:2.3
(다른 프로젝트 인 Spark 웹 프레임 워크에 속함) 대신 다음을 포함해야합니다.
compile 'org.apache.spark:spark-core_2.11:2.0.1'
이것은 최신 안정 버전 (2.0.1)을 사용합니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다