Search code examples
scalamavenmaven-scala-plugin

What Scala version is used in maven Scala plugin by default?


Here link to maven Scala plugin usage. But it is not mentioned what exactly Scala version it uses. I have created maven Scala project with following configuration:

<plugin>
    <groupId>org.scala-tools</groupId>
    <artifactId>maven-scala-plugin</artifactId>
    <executions>
        <execution>
            <goals>
                <goal>compile</goal>
                <goal>testCompile</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Then I build effective pom, the plugin section for maven Scala plugin is:

 <plugin>
     <groupId>org.scala-tools</groupId>
     <artifactId>maven-scala-plugin</artifactId>
     <executions>
       <execution>
         <goals>
           <goal>compile</goal>
           <goal>testCompile</goal>
         </goals>
       </execution>
     </executions>
   </plugin>

And also no Scala version in configuration tag. So what Scala version does maven Scala plugin use by default?


Solution

  • run the mvn scala:console goal and check the version

    updated link:

    https://davidb.github.io/scala-maven-plugin/example_console.html