David Bernard | 18 Jan 23:19 2008
Picon

[ANN] maven-scala-plugin 2.3.1

Hi,

I'm happy to announce the release of maven-scala-version 2.3.1.

The main changes, it's the new 'cc' goals : the continuous compilation.
run "mvn scala:cc" in a terminal (with -U option the first time) and edit your source file, save ... the
terminal detect the change and recompile it.
(more details at http://scala-tools.org/mvnsites/maven-scala-plugin/usage_cc.html)

actual goals of the plugin :

scala:help 	Display the Scala Compiler help
scala:compile 	Compiles a directory of Scala source. Corresponds roughly to the compile goal of the maven-compiler-plugin
scala:testCompile 	Compile Scala test source into test-classes. Corresponds roughly to testCompile in maven-compiler-plugin
scala:cc 	Compile the main and test scala source directory in continuous (infinite loop). !! This is an
util goal for commandline usage only (Do not use or call it in a pom) !!!
scala:console 	Run the Scala console with all the classes of the projects (dependencies and builded)
scala:run 	Run a Scala class using the Scala runtime
scala:doc 	Produces Scala API documentation.

Feedback, suggestions are welcome. (Please use scala-tools mailing)

/davidB

Eric Torreborre | 23 Jan 16:11 2008
Picon

[ANN] specs 1.2: jMock integration

Hi,

I am very glad to announce the version 1.2 of specs.

This version provides an integration with the jMock library and allow you to define expectations on mocks in your specifications and tests:
object mockExample extends Specification with ButtonAndLightMock {
val mock = mock(classOf[Light])
  val button
= Button(mock)

  "A button and light mock example" should {
   
"not fail if the mock receives the expected messages" in {
      expect
{
        one
(mock).on
        one
(mock).off
     
}
      button
.push
      button
.push  // if the button is pressed twice, then the light will go on and off
   
}
 
}
}
Thanks to Lalit Pant (http://lalitpant.blogspot.com/2007/12/using-jmock-with-scala.html) for showing that this was indeed possible!

I also added 2 matchers (requested by David Pollak) for Partial Functions:
val f = new PartialFunction[Int, String] {
def isDefinedAt(i: Int) = i % 2 == 0
def apply(i: Int) = (i*2).toString
}
"provide a beDefinedAt matcher checking if a PartialFunction is defined at specific values" in {
f must beDefinedAt(2, 4, 6)
}
"provide a beDefinedBy matcher checking if a PartialFunction is defined at specific values" +
 "and returns appropriate results" in {
f must beDefinedBy(2 -> "4", 4 -> "8")
}
A mailing list:  specs-users (http://groups.google.com/group/specs-users) is also available for your feedback about the library.

Happy specs!

Eric.



Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
David Bernard | 30 Jan 19:10 2008
Picon

Setup jedit for scala project

Hi,

I publish a first version of a plugin and a doc to ease the development of scala poject (under maven or simple
file (no-dependencies)) with jEdit like lift itself, any project created with lift 
archetypes or scala-archetypes (for introduction to scala and maven see article at http://scala-blogs.org/).

Main features include :
     * syntax highlight
     * compilation of .scala on save (standalone .scala and into a maven project)
     * running scalaTest (with the right classpath) from jEdit
     * compiling/packaging maven project from jEdit and grab error in the editor
     * set keyboard shortcut for every action
     * a configured environment after 1 or 2 hours

More info at http://liftweb.net/index.php/SetUp_jEdit

Feedbacks and contributions are welcome. (at less to know if there is interesting users)

/davidB

Juan Miguel Garcia | 31 Jan 14:57 2008

Re: Setup jedit for scala project

Hi David,

It worked very nicely for me...

Hoping that you have time to complete the "My First Project" section. I am a newbie both to jEdit and Maven and I cannot make it work...

Cheers,
Juanmi

On Jan 30, 2008 7:10 PM, David Bernard <david.bernard.31-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi,

I publish a first version of a plugin and a doc to ease the development of scala poject (under maven or simple file (no-dependencies)) with jEdit like lift itself, any project created with lift
archetypes or scala-archetypes (for introduction to scala and maven see article at http://scala-blogs.org/).

Main features include :
    * syntax highlight
    * compilation of .scala on save (standalone .scala and into a maven project)
    * running scalaTest (with the right classpath) from jEdit
    * compiling/packaging maven project from jEdit and grab error in the editor
    * set keyboard shortcut for every action
    * a configured environment after 1 or 2 hours

More info at http://liftweb.net/index.php/SetUp_jEdit

Feedbacks and contributions are welcome. (at less to know if there is interesting users)

/davidB


Gmane