How can I most easily/quickly run the liftweb demo apps?
I'm attempting to run the liftweb demo apps, available here. The build instructions, here, imply that I can compile them with a single command, but when I try, I get an error complaining about not being able to find the other parts of the framework, so I presume I have to run the superbuild.
I've tried that, and, after following the implied (but not stated) step of downloading all the main repositories to a directory, running it appears to work, but takes a ridiculously long time - 6 hours after starting 开发者_高级运维the build, I left work with it still running. Coming back in on Monday I'm faced with this message:
[info] == lift-squeryl-record / test-start ==
[info] == lift-squeryl-record / test-start ==
[info]
[info] == lift-squeryl-record / net.liftweb.squerylrecord.SquerylRecordSpec ==
17:39:08.409 [Finalizer] DEBUG o.a.h.i.c.t.ThreadSafeClientConnManager - Shutting down
[info] == lift-squeryl-record / net.liftweb.squerylrecord.SquerylRecordSpec ==
Exception in thread "Thread-1735" Java HotSpot(TM) 64-Bit Server VM warning: Exception java.lang.OutOfMemoryError occurred dispatching signal Unknown Signal to handler- the VM may need to be forcibly terminated
The build process was stalled, and I had to terminate it. To boot, it seems 'buildall' does a clean before starting.
My questions are twofold:
- Should the liftweb build process really take that long? What could be making it so incredibly slow? My build machine is only a Mac Mini, but I wouldn't expect anything to take this long - I could've built the linux kernel a dozen or more times in the time it took liftweb to (mostly) compile.
- Is there a way to build the sample apps that doesn't involve building the whole lift framework from scratch?
You do not have to build any part of the Lift framework in order to use it. SBT will simply download the bits you declare as dependencies and build your code.
The build instructions you reference are for the Lift Framework build - probably only used by the developers that work on the releases.
The examples project you referenced contains lots of (every?) example projects - probably a little more than most people want to get started with. I cloned the repository and ran following commands:
liftsh
- launches SBTupdate
- downloads dependenciesjetty-run
- compiles and runs the examples (the first one grabs the port - we
probably have to select a specific
sub project with SBT)
This took me about 10 minutes on a notebook and ended with hello Lift running on localhost:8080
A much lighter weight way to get started is to clone: https://github.com/lift/lift_24_sbt/tree/master/scala_29/lift_basic
run:
sbt
update
jetty-run
This takes only a couple of minutes.
精彩评论