Skip to content

Instantly share code, notes, and snippets.

@p14n
Created October 27, 2012 08:51
Show Gist options
  • Save p14n/3963607 to your computer and use it in GitHub Desktop.
Save p14n/3963607 to your computer and use it in GitHub Desktop.
Scala maven continuous compile
<profiles>
<profile>
<id>scalac-prod</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<fsc.once>true</fsc.once>
<fsc.compilation>all</fsc.compilation>
</properties>
</profile>
<profile>
<id>scalac-dev</id>
<properties>
<fsc.once>false</fsc.once>
<fsc.compilation>modified-only</fsc.compilation>
</properties>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>cc</id>
<goals>
<goal>cc</goal>
</goals>
<phase>compile</phase>
<configuration>
<useFsc>true</useFsc>
<once>${fsc.once}</once>
<recompileMode>${fsc.compilation}</recompileMode>
</configuration>
</execution>
<execution>
<id>scala-test-compile</id>
<phase>process-test-resources</phase>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<useFsc>true</useFsc>
<once>${fsc.once}</once>
<recompileMode>${fsc.compilation}</recompileMode>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment