scala 初建maven工程

scala 初建maven工程

盘点遇到的问题

1 Failed to execute goal org.scala-tools:maven-scala-plugin:2.15.2:compile(default) on Project DataFus
解决办法

更换 scala-maven-plugin 配置,并且删除其他 idea 自动创建的配置信息和test下的文件,配置信息只保留需要的 ,填写本地安装的版本号
下面附pom文件基本配置内容

<properties>
    <encoding>UTF-8encoding>
    <scala.version>2.12.10scala.version>
    <scala.compat.version>2.12scala.compat.version>
    <akka.version>2.4.17akka.version>
  properties>
<build>
    <sourceDirectory>src/main/scalasourceDirectory>
    <testSourceDirectory>src/test/scalatestSourceDirectory>
    <plugins>
      
      <plugin>
        <groupId>net.alchim31.mavengroupId>
        <artifactId>scala-maven-pluginartifactId>
        <version>3.3.2version>
        <executions>
          <execution>
            <goals>
              <goal>compilegoal>
              <goal>testCompilegoal>
            goals>
            <configuration>
              <args>
                <arg>-dependencyfilearg>
                <arg>${project.build.directory}/.scala_dependenciesarg>
              args>
            configuration>
          execution>
        executions>
      plugin>
    plugins>
  build>

你可能感兴趣的:(scala)