简体   繁体   中英

Idea 13 and Gradle when trying to use scala-compiler in the Scala facets does not find scala-library

I would like to use in my project the scala-compiler from Gradle dependencies but when I try to use it I get:

在此输入图像描述

Am I using the wrong dependency? Why scala-library is not found? Here is my build:

apply plugin: 'java'
apply plugin: 'scala'
apply plugin: 'eclipse'

repositories { mavenCentral() }

dependencies {
    def hamcrestVersion = "1.3"
    def jmockVersion = "2.6.0"
    compile 'org.mongodb:mongo-java-driver:2.12.0-rc0',
            'org.mongodb.morphia:morphia:0.106',
            'org.scala-lang:scala-library:2.10.3',
            'org.scala-lang:scala-compiler:2.10.3'

    testCompile 'org.scalatest:scalatest_2.10:2.1.0',
            'junit:junit:4.11',
            'de.flapdoodle.embed:de.flapdoodle.embed.mongo:1.42',
            "org.hamcrest:hamcrest-core:${hamcrestVersion}",
            "org.hamcrest:hamcrest-library:${hamcrestVersion}",
            "org.jmock:jmock:${jmockVersion}"
    testCompile("org.jmock:jmock-junit4:${jmockVersion}") {
        exclude group: "junit"
    }
}

perhaps you can modify the entry of the gradle generated library by adding scala-library*.jar e scala-reflect*.jar

It works but it's an ugly workaround (wich probably you will have ot do again and again when you change the project dependencies in the gradle file)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM