request for feedback : maven + scalacs integration

2 views
Skip to first unread message

David Bernard

unread,
Apr 7, 2010, 5:58:03 PM4/7/10
to Maven and Scala, liftweb
[Sorry to spam lift mailing-list but there is lot of maven + scala 2.7.7  lift users]

Hello,

Before releasing maven-scala-plugin 2.14, I do a call for test/feedback about the following goals:
 scala:cs-init : to register project to scalacs (install and start scalacs if needed)
 scala:cs-compile : to compile your project (and dependencies if modified and registered)
 scala:cs-compile-single : to only compile the project
 scala:cs-remove : to de-register the project from scalacs
 scala:cs-stop : stop scalacs

The 'cs-xxx' goals are about using [ScalaCS][1] and should allow quicker compilation (via a compilation server).

you could also use only the scala:cs-init and request compilation via cUrl or any http client (see documentaion of [ScalaCS][1], there is a basic sample for emacs integration).
I copypast a fragment a session (I used [MavenShell][2], also recommanded for maven command line users, it works with maven2 based projects).

WARNING : scalacs 0.2 (last released) only works with scala 2.7.7

to use the snapshot version

 <pluginRepositories>
   <pluginRepository>
     <id>scala-tools.org</id>
     <name>Scala-Tools Maven2 Repository</name>
     <url>http://scala-tools.org/repo-snapshots</url>
     <snapshots><enabled>true</enabled></snapshots>
   </pluginRepository>
 </pluginRepositories>

     <plugin>
       <groupId>org.scala-tools</groupId>
       <artifactId>maven-scala-plugin</artifactId>
       <version>2.14-SNAPSHOT</version>

[1]: http://github.com/davidB/scalacs
[2]: http://shell.sonatype.org/

/davidB

--8<------------------------------------------------------------------

mvnsh(/):~/work/oss/scalacs> mvn scala:cs-init
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[INFO] Building ScalaCS 0.3-SNAPSHOT
[INFO] --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[INFO]
[INFO] --- maven-scala-plugin:2.14-SNAPSHOT:cs-init (default-cli) @ scalacs ---
[INFO] Checking for multiple versions of scala
[INFO] start scala-tools-server...
....
[INFO] scalacs connected
-INFO createOrUpdate createdOrUpdated {sourceDirs=[/home/dwayne/work/oss/scalacs/src/main/scala], targetDir=/home/dwayne/work/oss/scalacs/target/classes, excludes=[], name=scalacs-0.3-SNAPSHOT/main, exported=/home/dwayne/.m2/repository/net/alchim31/scalacs/0.3-SNAPSHOT/scalacs-0.3-SNAPSHOT.jar, includes=[], classpath=[/home/dwayne/work/oss/scalacs/target/classes, /home/dwayne/.m2/repository/org/scala-lang/scala-library/2.7.7/scala-library-2.7.7.jar, /home/dwayne/.m2/repository/org/scala-lang/scala-compiler/2.7.7/scala-compiler-2.7.7.jar, /home/dwayne/.m2/repository/org/eclipse/jetty/jetty-server/7.0.2.RC0/jetty-server-7.0.2.RC0.jar, /home/dwayne/.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar, /home/dwayne/.m2/repository/org/eclipse/jetty/jetty-continuation/7.0.2.RC0/jetty-continuation-7.0.2.RC0.jar, /home/dwayne/.m2/repository/org/eclipse/jetty/jetty-http/7.0.2.RC0/jetty-http-7.0.2.RC0.jar, /home/dwayne/.m2/repository/org/eclipse/jetty/jetty-io/7.0.2.RC0/jetty-io-7.0.2.RC0.jar, /home/dwayne/.m2/repository/org/eclipse/jetty/jetty-util/7.0.2.RC0/jetty-util-7.0.2.RC0.jar, /home/dwayne/.m2/repository/org/yaml/snakeyaml/1.4/snakeyaml-1.4.jar, /home/dwayne/.m2/repository/org/scala-tools/sbt/sbt-launch/0.7.2/sbt-launch-0.7.2.jar]} :: net_alchim31_scalacs.SingleConfig@8ab08f
-INFO createOrUpdate createdOrUpdated {sourceDirs=[/home/dwayne/work/oss/scalacs/src/test/java], targetDir=/home/dwayne/work/oss/scalacs/target/test-classes, excludes=[], name=scalacs-0.3-SNAPSHOT/test, includes=[], classpath=[/home/dwayne/work/oss/scalacs/target/test-classes, /home/dwayne/work/oss/scalacs/target/classes, /home/dwayne/.m2/repository/org/scala-lang/scala-library/2.7.7/scala-library-2.7.7.jar, /home/dwayne/.m2/repository/org/scala-lang/scala-compiler/2.7.7/scala-compiler-2.7.7.jar, /home/dwayne/.m2/repository/org/eclipse/jetty/jetty-server/7.0.2.RC0/jetty-server-7.0.2.RC0.jar, /home/dwayne/.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar, /home/dwayne/.m2/repository/org/eclipse/jetty/jetty-continuation/7.0.2.RC0/jetty-continuation-7.0.2.RC0.jar, /home/dwayne/.m2/repository/org/eclipse/jetty/jetty-http/7.0.2.RC0/jetty-http-7.0.2.RC0.jar, /home/dwayne/.m2/repository/org/eclipse/jetty/jetty-io/7.0.2.RC0/jetty-io-7.0.2.RC0.jar, /home/dwayne/.m2/repository/org/eclipse/jetty/jetty-util/7.0.2.RC0/jetty-util-7.0.2.RC0.jar, /home/dwayne/.m2/repository/org/yaml/snakeyaml/1.4/snakeyaml-1.4.jar, /home/dwayne/.m2/repository/org/scala-tools/sbt/sbt-launch/0.7.2/sbt-launch-0.7.2.jar, /home/dwayne/.m2/repository/org/testng/testng/5.11/testng-5.11-jdk15.jar, /home/dwayne/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar, /home/dwayne/.m2/repository/commons-io/commons-io/1.3.2/commons-io-1.3.2.jar, /home/dwayne/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar]} :: net_alchim31_scalacs.SingleConfig@6c5482
-INFO createOrUpdate nb compiler created/updated/total : 2/0/2
-INFO time to process :0.129s


[INFO] --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[INFO] Total time: 5.165s
[INFO] Finished at: Wed Apr 07 23:46:20 CEST 2010
[INFO] Final Memory: 6M/89M
[INFO] --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
mvnsh(/):~/work/oss/scalacs> mvn scala:cs-compile
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[INFO] Building ScalaCS 0.3-SNAPSHOT
[INFO] --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[INFO]
[INFO] --- maven-scala-plugin:2.14-SNAPSHOT:cs-compile (default-cli) @ scalacs ---
[INFO] Checking for multiple versions of scala
-INFO scalacs-0.3-SNAPSHOT/main.compiler dependency file modified : /home/dwayne/.m2/repository/org/scala-lang/scala-library/2.7.7/scala-library-2.7.7.jar
-INFO scalacs-0.3-SNAPSHOT/main.compiler dependency file modified : /home/dwayne/.m2/repository/org/scala-lang/scala-compiler/2.7.7/scala-compiler-2.7.7.jar
-INFO scalacs-0.3-SNAPSHOT/main.compiler dependency file modified : /home/dwayne/.m2/repository/org/eclipse/jetty/jetty-server/7.0.2.RC0/jetty-server-7.0.2.RC0.jar
-INFO scalacs-0.3-SNAPSHOT/main.compiler dependency file modified : /home/dwayne/.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar
-INFO scalacs-0.3-SNAPSHOT/main.compiler dependency file modified : /home/dwayne/.m2/repository/org/eclipse/jetty/jetty-continuation/7.0.2.RC0/jetty-continuation-7.0.2.RC0.jar
-INFO scalacs-0.3-SNAPSHOT/main.compiler dependency file modified : /home/dwayne/.m2/repository/org/eclipse/jetty/jetty-http/7.0.2.RC0/jetty-http-7.0.2.RC0.jar
-INFO scalacs-0.3-SNAPSHOT/main.compiler dependency file modified : /home/dwayne/.m2/repository/org/eclipse/jetty/jetty-io/7.0.2.RC0/jetty-io-7.0.2.RC0.jar
-INFO scalacs-0.3-SNAPSHOT/main.compiler dependency file modified : /home/dwayne/.m2/repository/org/eclipse/jetty/jetty-util/7.0.2.RC0/jetty-util-7.0.2.RC0.jar
-INFO scalacs-0.3-SNAPSHOT/main.compiler dependency file modified : /home/dwayne/.m2/repository/org/yaml/snakeyaml/1.4/snakeyaml-1.4.jar
-INFO scalacs-0.3-SNAPSHOT/main.compiler dependency file modified : /home/dwayne/.m2/repository/org/scala-tools/sbt/sbt-launch/0.7.2/sbt-launch-0.7.2.jar
-INFO scalacs-0.3-SNAPSHOT/main.compiler compile server was reset
-INFO scalacs-0.3-SNAPSHOT/main.compiler Compiling 6 source files to /home/dwayne/work/oss/scalacs/target/classes
-INFO scalacs-0.3-SNAPSHOT/main.compiler /home/dwayne/work/oss/scalacs/src/main/scala#-1,-1,-1,0 compiling
-INFO scalacs-0.3-SNAPSHOT/main.compiler Starting new compile server instance
-INFO scalacs-0.3-SNAPSHOT/test.compiler dependency file modified : /home/dwayne/.m2/repository/org/scala-lang/scala-library/2.7.7/scala-library-2.7.7.jar
-INFO scalacs-0.3-SNAPSHOT/test.compiler dependency file modified : /home/dwayne/.m2/repository/org/scala-lang/scala-compiler/2.7.7/scala-compiler-2.7.7.jar
-INFO scalacs-0.3-SNAPSHOT/test.compiler dependency file modified : /home/dwayne/.m2/repository/org/eclipse/jetty/jetty-server/7.0.2.RC0/jetty-server-7.0.2.RC0.jar
-INFO scalacs-0.3-SNAPSHOT/test.compiler dependency file modified : /home/dwayne/.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar
-INFO scalacs-0.3-SNAPSHOT/test.compiler dependency file modified : /home/dwayne/.m2/repository/org/eclipse/jetty/jetty-continuation/7.0.2.RC0/jetty-continuation-7.0.2.RC0.jar
-INFO scalacs-0.3-SNAPSHOT/test.compiler dependency file modified : /home/dwayne/.m2/repository/org/eclipse/jetty/jetty-http/7.0.2.RC0/jetty-http-7.0.2.RC0.jar
-INFO scalacs-0.3-SNAPSHOT/test.compiler dependency file modified : /home/dwayne/.m2/repository/org/eclipse/jetty/jetty-io/7.0.2.RC0/jetty-io-7.0.2.RC0.jar
-INFO scalacs-0.3-SNAPSHOT/test.compiler dependency file modified : /home/dwayne/.m2/repository/org/eclipse/jetty/jetty-util/7.0.2.RC0/jetty-util-7.0.2.RC0.jar
-INFO scalacs-0.3-SNAPSHOT/test.compiler dependency file modified : /home/dwayne/.m2/repository/org/yaml/snakeyaml/1.4/snakeyaml-1.4.jar
-INFO scalacs-0.3-SNAPSHOT/test.compiler dependency file modified : /home/dwayne/.m2/repository/org/scala-tools/sbt/sbt-launch/0.7.2/sbt-launch-0.7.2.jar
-INFO scalacs-0.3-SNAPSHOT/test.compiler dependency file modified : /home/dwayne/.m2/repository/org/testng/testng/5.11/testng-5.11-jdk15.jar
-INFO scalacs-0.3-SNAPSHOT/test.compiler dependency file modified : /home/dwayne/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
-INFO scalacs-0.3-SNAPSHOT/test.compiler dependency file modified : /home/dwayne/.m2/repository/commons-io/commons-io/1.3.2/commons-io-1.3.2.jar
-INFO scalacs-0.3-SNAPSHOT/test.compiler dependency file modified : /home/dwayne/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar
-INFO scalacs-0.3-SNAPSHOT/test.compiler compile server was reset
-INFO scalacs-0.3-SNAPSHOT/test.compiler Compiling 1 source files to /home/dwayne/work/oss/scalacs/target/test-classes
-INFO scalacs-0.3-SNAPSHOT/test.compiler /home/dwayne/work/oss/scalacs/src/test/java#-1,-1,-1,0 compiling
-INFO scalacs-0.3-SNAPSHOT/test.compiler Starting new compile server instance
-INFO time to process :9.406s


[INFO] --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[INFO] Total time: 9.709s
[INFO] Finished at: Wed Apr 07 23:46:44 CEST 2010
[INFO] Final Memory: 4M/89M
[INFO] --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
mvnsh(/):~/work/oss/scalacs> mvn scala:cs-compile
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[INFO] Building ScalaCS 0.3-SNAPSHOT
[INFO] --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[INFO]
[INFO] --- maven-scala-plugin:2.14-SNAPSHOT:cs-compile (default-cli) @ scalacs ---
[INFO] Checking for multiple versions of scala
-INFO scalacs-0.3-SNAPSHOT/main.compiler Nothing to compile - all classes are up to date
-INFO scalacs-0.3-SNAPSHOT/test.compiler Compiling 1 source files to /home/dwayne/work/oss/scalacs/target/test-classes
-INFO scalacs-0.3-SNAPSHOT/test.compiler /home/dwayne/work/oss/scalacs/src/test/java#-1,-1,-1,0 compiling
-INFO time to process :0.186s


[INFO] --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[INFO] Total time: 0.445s
[INFO] Finished at: Wed Apr 07 23:46:52 CEST 2010
[INFO] Final Memory: 5M/86M
[INFO] --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

.... Edit one file ......

mvnsh(/):~/work/oss/scalacs> mvn scala:cs-compile
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[INFO] Building ScalaCS 0.3-SNAPSHOT
[INFO] --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[INFO]
[INFO] --- maven-scala-plugin:2.14-SNAPSHOT:cs-compile (default-cli) @ scalacs ---
[INFO] Checking for multiple versions of scala
-INFO scalacs-0.3-SNAPSHOT/main.compiler Compiling 6 source files to /home/dwayne/work/oss/scalacs/target/classes
-INFO scalacs-0.3-SNAPSHOT/main.compiler /home/dwayne/work/oss/scalacs/src/main/scala#-1,-1,-1,0 compiling
-INFO scalacs-0.3-SNAPSHOT/test.compiler Compiling 1 source files to /home/dwayne/work/oss/scalacs/target/test-classes
-INFO scalacs-0.3-SNAPSHOT/test.compiler /home/dwayne/work/oss/scalacs/src/test/java#-1,-1,-1,0 compiling
-INFO time to process :3.1s

Reply all
Reply to author
Forward
0 new messages