On 14/09/2010, at 7:43 AM, Jeppe Nejsum Madsen wrote: > On Mon, Sep 13, 2010 at 5:26 AM, Adam Murdoch <[email protected]> wrote: >> >> On 13/09/2010, at 7:52 AM, Jeppe Nejsum Madsen wrote: >> >> Hi, >> >> I've been using Gradle with the Scala plugin for quite some time and >> this has worked fine with Scala 2.7.7 >> >> I'm trying to create a new project using Scala 2.8, but this seems to >> cause some problems. >> >> The project (which can be found here: >> http://github.com/jeppenejsum/liftstart) compiles fine but when >> launched with jettyRun, it fails: >> >> ERROR - Failed to Boot! Your application may not run properly >> java.lang.NoSuchMethodError: >> net.liftweb.mapper.KeyedMetaMapper$class.$init$(Lnet/liftweb/mapper/KeyedMetaMapper;)V >> at example.model.User$.<init>(User.scala:11) >> at example.model.User$.<clinit>(User.scala) >> at bootstrap.liftweb.Boot.boot(Boot.scala:35) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at >> net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply(ClassHelpers.scala:361) >> at >> net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply(ClassHelpers.scala:359) >> at >> net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply(LiftRules.scala:1496) >> at >> net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply(LiftRules.scala:1496) >> at net.liftweb.common.Full.map(Box.scala:398) >> at net.liftweb.http.DefaultBootstrap$.boot(LiftRules.scala:1496) >> at >> net.liftweb.http.provider.HTTPProvider$class.bootLift(HTTPProvider.scala:75) >> at net.liftweb.http.LiftFilter.bootLift(LiftServlet.scala:586) >> at >> net.liftweb.http.provider.servlet.ServletFilterProvider$class.init(ServletFilterProvider.scala:40) >> at net.liftweb.http.LiftFilter.init(LiftServlet.scala:586) >> at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97) >> >> Now, this kind of error is usually because there's a mismatch between >> the libs used at compile time vs runtime, but I'm not sure this is the >> case here. >> >> This is a good place to start. Perhaps check the contents of the 'compile', >> 'runtime' and 'scalaTools' configurations. Just run gradle --dependencies >> and make sure they all contain the correct scala jars. > > Ok, some progress: > > If I remove the Scala plugin and instead add > > configurations { > scalaTools > } > > in the beginning and > > task compile { > ant.taskdef(resource: 'scala/tools/ant/antlib.xml', classpath: > configurations.scalaTools.asPath) > ant.mkdir(dir: "build/classes/main") > ant.scalac(srcdir: "src/main/scala/", destdir: "build/classes/main", > classpath: configurations.compile.asPath) > } > > in the end, everything works as expected! > > So I'm wondering how the Scala plugin calls the ant task and what has > changed between Scala 2.7.7 and 2.8.0?? > > Any hints as how to proceed? >
I think I have a fix for this. Could you try your build with a new snapshot of Gradle? You can download a snapshot from our CI machine (log in as guest): http://teamcity.jetbrains.com/viewLog.html?buildId=40099&buildTypeId=bt107&tab=artifacts -- Adam Murdoch Gradle Developer http://www.gradle.org CTO, Gradle Inc. - Gradle Training, Support, Consulting http://www.gradle.biz
