What is the fastest way to compile Scala files using maven?

前端 未结 1 1105
青春惊慌失措
青春惊慌失措 2021-01-12 07:19

ideally using the FSC compiler

Question becomes what command or pom file set up should I use?

I\'m currently using the scala maven plugin but it doesn\'t see

相关标签:
1条回答
  • 2021-01-12 08:13

    You can run the fsc as part of the compile phase of maven by adding the following to the plugins section of your pom.xml

    <plugin>
     <groupId>org.scala-tools</groupId>
     <artifactId>maven-scala-plugin</artifactId>
     <version>2.9.1</version>
     <executions>
      <execution>
       <id>cc</id>
       <goals>
         <goal>cc</goal>
       </goals>
       <phase>compile</phase>
       <configuration>
        <useFsc>true</useFsc>
        <once>true</once>
       </configuration>
      </execution>
     </executions>
    </plugin>
    

    Of course you have to remove the standard scala compile execution from your POM if necessary.

    0 讨论(0)
提交回复
热议问题