我正在使用IDEA 10.5.2和Scala插件版本0.4.1395以及IDE附帶的標準Maven集成插件。我有一個Scala 2.8.0項目與上述設置,我想升級到Scala 2.9.1。我對pom.xml進行了必要的更改。下面是我的pom.xml的相關章節:在IDEA中的Maven項目中升級Scala版本
插件部分:
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<executions>
<execution>
<id>compile</id>
<goals>
<goal>compile</goal>
</goals>
<phase>compile</phase>
</execution>
<execution>
<id>test-compile</id>
<goals>
<goal>testCompile</goal>
</goals>
<phase>test-compile</phase>
</execution>
<execution>
<phase>process-resources</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
依賴性部分:
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-compiler</artifactId>
<version>2.9.1</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.9.1</version>
</dependency>
我有斯卡拉2.9.1我的機器上安裝。
在我的項目設置中,在Scala構面中,編譯器實例化部分有幾個「編譯器庫」選項。不過,我的項目並沒有選擇任何一個。
當我選擇Maven: org.scala-lang:scala-compiler-bundle:2.9.1
,我得到以下錯誤:
Cannot compile Scala files.
Please, adjust compiler library in Scala facet: unable to read scala-library-2.9.1.jar version.
當我選擇Maven: org.scala-lang:scala-compiler:2.9.1
,我得到以下錯誤:
Cannot compile Scala files.
Please, adjust compiler library in Scala facet: no scala-library*.jar found.
當我選擇Maven: org.scala-lang:scala-library:2.9.1
,我得到以下錯誤:
Cannot compile Scala files.
Please, adjust compiler library in Scala facet: no scala-compiler*.jar found.
我在做什麼NG?我應該怎樣做才能讓我的項目建立起來?
請注意,我第一次使用構建工具。任何幫助將不勝感激。謝謝!
你能通過「mvn compile」在控制檯上編譯你的項目嗎? –