If you have questions/suggestions about maven+scala, then you can post to http://groups.google.com/group/maven-and-scala
The maven-scala-plugin no longer (since 2.13) re-compile only the modified files, because :
You could re-enabled the compile only modified, by
<recompileMode>modified-only</recompileMode>
-Drecompilation-mode=modified-only
(Sorry, the doc online is not the doc of the lastest release of the plugin 2.13.1)
You could also use some option of scalac 2.8.0+
<!-- Specify recompilation detection strategy (all,changed,immediate,transitive,transitivenocp) -->
<arg>-make:transitive</arg>
see message on mailing-list scala-user: Mvn recompiles everything
How-to execute test for scalac'spluginAdd into the configuration node of surefire :
<argLine>-Xbootclasspath/p:${settings.localRepository}/org/scala-lang/scala-library/${scala.version}/scala-library-${scala.version}.jar</argLine>
Cross Building with Maven?
Is it possible to cross build a project for scala 2.8.1, 2.9.2, and 2.10 using scala-maven-plugin?
It's not easy, and I don't remember if the result works for every case. But it's what I did :
modify pom.xml
produce artifact include scala version :
<artifactId>scala-maven-plugin_${scalaVersion}</artifactId>
dependencies available in every value of scalaVersion
<dependencies>
<dependency>
<groupId>y.x</groupId>
<artifactId>z_${scalaVersion}</artifactId>
<version>0.0</version>
</dependency>
dependencies available for specific scalaVersion should be part of profile section
<profile>
<id>scala-2.9.0</id>
<activation>
<property>
<name>scalaVersion</name>
<value>2.9.0</value>
</property>
</activation>
<dependencies>
...
source specific to a scalaVersion (api of dependencies like scala-library can be different)
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/scala_${scalaVersion}</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
to run this pom.xml you have to always define scalaVersion on the call of maven (due to scalaVersion into the package name) so to build your project you will run maven several time :
#! /bin/sh
for v in 2.8.1 2.9.1 2.9.2 ; do
mvn -DscalaVersion=$v $*
done
I hope this will help you (I write it from old code and from memory, fix/feedback welcome)
Read-Eval-Print-Loop (aka scala:console) Why does the mvn scala:console goal not compile the project?The authors of the plugin felt it was much more flexible to allow a REPL to be started during the coding of a project. The REPL is mostly used for experimenting with APIs and therefore users should not need a functioning project to test out potential code paths. Users who want to make use of their latest changes should type "mvn compile scala:console" or "mvn test-compile scala:console" rather than just "mvn scala:console"
Does the REPL support auto-complete?As of Scala 2.8.0 the REPL supports auto-complete features.
(see Using_Maven_with_the_Scala_IDE_for_Eclipse )
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4