Scala Maven项目的基本pom.xml文件

时间:2016-07-21 08:20:32

标签: scala maven

有人可以为Maven上的Scala项目推荐一个基本的pom.xml文件吗?到目前为止,我从mvn archetype:generate获得的选项似乎都不像我想的那样基本。我只想要运行Scala jar绝对需要的依赖项和插件。

1 个答案:

答案 0 :(得分:1)

scala-maven-plugin是您唯一需要的朋友,基本上将此插件添加到您的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>

您可能有兴趣在其中添加一些configurationexecution部分,但您可以在他们的网站上详细了解它:http://davidb.github.io/scala-maven-plugin/

相关问题