[Lift] A Lift/sbt prototype

14 views
Skip to first unread message

David Pollak

unread,
Apr 23, 2010, 2:36:53 PM4/23/10
to liftweb
Folks,

If you'd like to get started with Lift and sbt (rather than Lift and Maven), you can git clone git://github.com/dpp/lift_sbt_prototype.git and be on your way.

You can also fork http://github.com/dpp/lift_sbt_prototype and munge away from there.

Thanks,

David

--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.

Ross Mellgren

unread,
Apr 23, 2010, 3:49:50 PM4/23/10
to lif...@googlegroups.com
Me: mvn archetype:generate bibble bobble gobbledy gook... for a new project
You, 1 minute later: this mail message
Me, 30 minutes after clone, plus some playing around with sbt for the first time:  :-D

I tweaked mine to use 2.0-scala280-SNAPSHOT, and all is joyful.

-Ross

Lukasz Kuczera

unread,
Apr 23, 2010, 4:30:20 PM4/23/10
to Lift
Sorry for the dumb question, but what is all that goodness about sbt ?

On Apr 23, 8:49 pm, Ross Mellgren <dri...@gmail.com> wrote:
> Me: mvn archetype:generate bibble bobble gobbledy gook... for a new project
> You, 1 minute later: this mail message
> Me, 30 minutes after clone, plus some playing around with sbt for the first time:  :-D
>
> I tweaked mine to use 2.0-scala280-SNAPSHOT, and all is joyful.
>
> -Ross
>
> On Apr 23, 2010, at 2:36 PM, David Pollak wrote:
>
>
>
>
>
> > Folks,
>
> > If you'd like to get started with Lift and sbt (rather than Lift and Maven), you can git clone git://github.com/dpp/lift_sbt_prototype.git and be on your way.
>
> > You can also forkhttp://github.com/dpp/lift_sbt_prototypeand munge away from there.
>
> > Thanks,
>
> > David
>
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > Follow me:http://twitter.com/dpp
> > Surf the harmonics
>
> > --
> > You received this message because you are subscribed to the Google Groups "Lift" group.
> > To post to this group, send email to lif...@googlegroups.com.
> > To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "Lift" group.
> To post to this group, send email to lif...@googlegroups.com.
> To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en.

Ross Mellgren

unread,
Apr 23, 2010, 4:34:08 PM4/23/10
to lif...@googlegroups.com
It works without much nonsense, apparently. Configuration of a project is pretty basic (compared to Maven, ant, anyway):

import sbt._

class LiftProject(info: ProjectInfo) extends DefaultWebProject(info) {
val databinder = "Databinder Repository" at "http://databinder.net/repo/"
val mavenLocal = "Local Maven Repository" at "file://"+Path.userHome+"/.m2/repository"
val scalatools_snapshot = "Scala Tools Snapshot" at "http://scala-tools.org/repo-snapshots/"
val scalatools_release = "Scala Tools Snapshot" at "http://scala-tools.org/repo-releases/"

val liftVersion = "2.0-scala280-SNAPSHOT"

override def libraryDependencies = Set(
"net.liftweb" % "lift-webkit" % liftVersion % "compile->default",
"org.squeryl" % "squeryl_2.8.0.Beta1-RC8" % "0.9.3" % "compile->default",
"org.mortbay.jetty" % "jetty" % "6.1.22" % "test->default",
"com.h2database" % "h2" % "1.2.121"
) ++ super.libraryDependencies
}

It has a console which has a variety of nice things:

~ compile watch the source tree and recompile each time it changes. Great for incremental changes until you're ready to test in the browser, then
jetty-start starts jetty with your webapp, and brings you back to sbt console. runs jetty in the background
jetty-stop obvious
reload reload your project definition if you change it
update pull down new dependencies. you can run this when you want rather than having to do it every time like maven
console pop a scala REPL for your project
clean obvious
compile obvious

It's pretty quick as well.

-Ross

Mads Hartmann Jensen

unread,
Apr 24, 2010, 2:25:07 AM4/24/10
to lif...@googlegroups.com, lif...@googlegroups.com
you left out: prepare-webapp which redeploys your app so you won't
have to restart the container :)

Mads

Sent from my iPhone
>> For more options, visit this group at http://groups.google.com/group/liftweb?hl=en
>> .
>>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Lift" group.
> To post to this group, send email to lif...@googlegroups.com.
> To unsubscribe from this group, send email to liftweb+u...@googlegroups.com
> .

Timothy Perrett

unread,
Apr 24, 2010, 4:11:54 AM4/24/10
to Lift
The only thing that annoys me about SBT is that if im doing changes to
the HTML, I have to restart jetty everytime in order to see the
change. The Jetty webroot is set to target/classes rather than the
source path.

Any one know if its possible to change?

Cheers, Tim
> > For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en

Heiko Seeberger

unread,
Apr 24, 2010, 4:41:28 AM4/24/10
to lif...@googlegroups.com
On 24 April 2010 10:11, Timothy Perrett <tim...@getintheloop.eu> wrote:
The only thing that annoys me about SBT is that if im doing changes to
the HTML, I have to restart jetty everytime in order to see the
change. The Jetty webroot is set to target/classes rather than the
source path.

Any one know if its possible to change?

Did you ask on the SBT mailing list? Did you open a bug?
If not, this is the time to do so, because SBT is "only" a zero release and such breaking changes will possible be easier now than when it is >= 1.0

Heiko

Company: weiglewilczek.com
Blog: heikoseeberger.name
Follow me: twitter.com/hseeberger
OSGi on Scala: scalamodules.org
Lift, the simply functional web framework: liftweb.net
Stambecco, highly scalable computing: stambecco.org

Timothy Perrett

unread,
Apr 24, 2010, 5:43:19 AM4/24/10
to lif...@googlegroups.com
Umm not sure I have - really must get around to that! It seems like the kind of thing that should be configurable via def overrides

Cheers, Tim

Heiko Seeberger

unread,
Apr 24, 2010, 6:00:28 AM4/24/10
to lif...@googlegroups.com
On 24 April 2010 11:43, Timothy Perrett <tim...@getintheloop.eu> wrote:
Umm not sure I have - really must get around to that! It seems like the kind of thing that should be configurable via def overrides

Do yourself and a lot of others a favor and ask this on the SBT mailing list, please!

Heiko

Sean Ross

unread,
Apr 24, 2010, 8:22:36 AM4/24/10
to lif...@googlegroups.com
You can force jetty to use the source webapp directory to serve content by adding the following to your project file.

  override def jettyWebappPath  = webappPath


If you are using JRebel,  it's also recommend that you add the following line to prevent unnecessary redeploys  


  override def scanDirectories = Nil


- sean.


Timothy Perrett

unread,
Apr 24, 2010, 2:03:25 PM4/24/10
to lif...@googlegroups.com
What great SBT foo!

Cheers Sean!

Tim

Peter Robinett

unread,
Apr 24, 2010, 3:17:15 PM4/24/10
to Lift
Seconded. Perhaps someone would like to add such tips to our sbt wiki
page? https://www.assembla.com/wiki/show/liftweb/Using_SBT =)

Peter

On Apr 24, 11:03 am, Timothy Perrett <timo...@getintheloop.eu> wrote:
> What great SBT foo!
>
> Cheers Sean!
>
> Tim
>
> On 24 Apr 2010, at 13:22, Sean Ross wrote:
>
>
>
>
>
> > You can force jetty to use the source webapp directory to serve content by adding the following to your project file.
>
> >   override def jettyWebappPath  = webappPath
>
> > If you are using JRebel,  it's also recommend that you add the following line to prevent unnecessary redeploys  
>
> >   override def scanDirectories = Nil
>
> > - sean.    
>
> > On 24 Apr 2010, at 11:00, Heiko Seeberger wrote:
>
> >> On 24 April 2010 11:43, Timothy Perrett <timo...@getintheloop.eu> wrote:
> >> Umm not sure I have - really must get around to that! It seems like the kind of thing that should be configurable via def overrides
>
> >> Do yourself and a lot of others a favor and ask this on the SBT mailing list, please!
>
> >> Heiko
>
> >> Company: weiglewilczek.com
> >> Blog: heikoseeberger.name
> >> Follow me: twitter.com/hseeberger
> >> OSGi on Scala: scalamodules.org
> >> Lift, the simply functional web framework: liftweb.net
> >> Stambecco, highly scalable computing: stambecco.org
>
> >> --
> >> You received this message because you are subscribed to the Google Groups "Lift" group.
> >> To post to this group, send email to lif...@googlegroups.com.
> >> To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> >> For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups "Lift" group.
> > To post to this group, send email to lif...@googlegroups.com.
> > To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "Lift" group.
> To post to this group, send email to lif...@googlegroups.com.
> To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en.
Reply all
Reply to author
Forward
0 new messages