Java scalac错误:错误选项:'-make:transitive';
我开始学习Scala,希望从Maven原型开始。我正在使用Java scalac错误:错误选项:'-make:transitive';,java,scala,maven,Java,Scala,Maven,我开始学习Scala,希望从Maven原型开始。我正在使用net.alchim31.maven:scala原型simple:1.6和以下maven设置: $ mvn -version Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T08:41:47-08:00) Maven home: /usr/local/Cellar/maven/3.3.9/libexec Java version: 1.8.0
net.alchim31.maven:scala原型simple:1.6
和以下maven设置:
$ mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T08:41:47-08:00)
Maven home: /usr/local/Cellar/maven/3.3.9/libexec
Java version: 1.8.0_73, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.11.3", arch: "x86_64", family: "mac"
我生成了一个普通的项目。但是,当我使用$mvn package
时,我得到以下信息:
[INFO] --- scala-maven-plugin:3.2.0:compile (default) @ test ---
[INFO] /Users/user/workspace/test/src/main/scala:-1: info: compiling
[INFO] Compiling 1 source files to /Users/user/workspace/test/target/classes at 1463433593873
[ERROR] scalac error: bad option: '-make:transitive'
在这里,您可以找到我生成的未触及的pom.xml
文件:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.mitchk</groupId>
<artifactId>sparktest</artifactId>
<version>1.0-SNAPSHOT</version>
<name>${project.artifactId}</name>
<description>My wonderfull scala app</description>
<inceptionYear>2015</inceptionYear>
<licenses>
<license>
<name>My License</name>
<url>http://....</url>
<distribution>repo</distribution>
</license>
</licenses>
<properties>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<encoding>UTF-8</encoding>
<scala.version>2.11.5</scala.version>
<scala.compat.version>2.11</scala.compat.version>
</properties>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
</dependency>
<!-- Test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.specs2</groupId>
<artifactId>specs2-core_${scala.compat.version}</artifactId>
<version>2.4.16</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_${scala.compat.version}</artifactId>
<version>2.2.4</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/scala</sourceDirectory>
<testSourceDirectory>src/test/scala</testSourceDirectory>
<plugins>
<plugin>
<!-- see http://davidb.github.com/scala-maven-plugin -->
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
<configuration>
<args>
<arg>-make:transitive</arg>
<arg>-dependencyfile</arg>
<arg>${project.build.directory}/.scala_dependencies</arg>
</args>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<useFile>false</useFile>
<disableXmlReport>true</disableXmlReport>
<!-- If you have classpath issue like NoDefClassError,... -->
<!-- useManifestOnlyJar>false</useManifestOnlyJar -->
<includes>
<include>**/*Test.*</include>
<include>**/*Suite.*</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</project>
4.0.0
com.github.mitchk
火花测试
1.0-快照
${project.artifactId}
我的奇妙scala应用程序
2015
我的执照
http://....
回购
1.6
1.6
UTF-8
2.11.5
2.11
org.scala-lang
scala图书馆
${scala.version}
朱尼特
朱尼特
4.11
测试
org.specs2
specs2-core_${scala.compat.version}
2.4.16
测试
org.scalatest
scalatest{scala.compat.version}
2.2.4
测试
src/main/scala
src/test/scala
net.alchim31.maven
scala maven插件
3.2.0
编译
测试编译
-make:及物的
-从属文件
${project.build.directory}/.scala\u依赖项
org.apache.maven.plugins
maven surefire插件
2.18.1
假的
真的
**/*测试*
**/*套房*
这是一个原型错误吗?你可以检查一下。它解决了我的问题。你可以检查一下。它解决了我的问题。