Reputation: 2893
Can someone recommend a basic pom.xml
file for a Scala project on Maven? So far, none of the options I get from mvn archetype:generate
seems to be as basic as I would like. I want only the dependencies and plugins that are absolutely required to run a Scala jar.
Upvotes: 0
Views: 3017
Reputation: 11285
The scala-maven-plugin
is the only friend you need, basically add this plugin to your pom.xml
:
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.2.2</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
You might be interested in adding some configuration
or execution
parts to it, but you can read more about it on their website: http://davidb.github.io/scala-maven-plugin/
Upvotes: 1