Maven Plugins for Scala Code Quality

Knoldus

SBT is an excellent tool for Scala and there are many plugins available for SBT to improve and measure the code quality of our Scala code. Sometime you may require to use only the Maven as a build tool and most of the popular plugins available in SBT for Scala are also available in maven.

In this blog I will try to list down  the plugins related to Scala that you can easily integrate with Maven and the sample configuration.

The Scala Compiler Plugin provides a lot of options and  below sample configuration can be used for  project that uses a mix of Java and Scala Code

<plugin> <groupId>net.alchim31.maven</groupId> <artifactId>scala-maven-plugin</artifactId> <version>3.2.2</version> <configuration> <jvmArgs> <jvmArg>-Xms64m</jvmArg> <jvmArg>-Xmx1024m</jvmArg> </jvmArgs> <args> <arg>-target:jvm-1.7</arg> <arg>-deprecation</arg> <arg>-feature</arg> <arg>-language:existentials</arg> <arg>-language:implicitConversions</arg> <arg>-language:postfixOps</arg> </args> <sourceDir>src/main/scala</sourceDir> <testSourceDir>src/test/scala</testSourceDir> </configuration> <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>…

View original post 416 more words

Advertisements