Template project

30 views
Skip to first unread message

Anton K

unread,
Oct 30, 2016, 10:28:35 AM10/30/16
to Lift
I had much trouble setting up a basic project that would run with triggered reloads (on file change).
The exact source of the issue is not known to me; perhaps it is the use of xsbt-web-plugin version 2.1 instead of 0.7.
What solved it in the end was using a different format for build.sbt: the scala format rather than bare sbt.

I would like to share this template in hopes that it will help someone else.
It can be found here: https://bitbucket.org/serendippity/example-lift-web-project/src

All the best

Peter Petersson

unread,
Oct 30, 2016, 3:36:09 PM10/30/16
to lif...@googlegroups.com

Thank you for posting your experience and solution.

Before addressing the issue you have encountered I would like to, point out, to anyone that is about to try out Lift or start a new project from scratch to check out Lifts template applications [1] they are in many cases god starting points.

Now the issue, It may be the use of

> ~jetty:start
that made you stumble, did you try
> ~container:start (and container:stop) 
I haven't tried the latest version of xsbt-web-plugin (v2.1) but normally triggered reload's after changes in file(s) in a lift project should not be a issue, the one thing to look out for is if you change something in lift.boot then a container stop and start may be needed.

[1] https://github.com/lift/lift_30_sbt

Best regards Peter Petersson
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anton K

unread,
Oct 31, 2016, 3:37:23 PM10/31/16
to Lift
Hi Peter,

I have tried
> container:start

but it led to an error of some sorts, which I don't remember now, while the
> jetty:start

worked as is instructed in xsbt-web-plugin documentation (https://earldouglas.com/projects/xsbt-web-plugin/2.1.html)

Best,
Anton

Peter Petersson

unread,
Oct 31, 2016, 5:37:18 PM10/31/16
to lif...@googlegroups.com

Hi Anton

Yes both the jetty start and container start instructions is mentioned on the page, and as it seems the simplest usage is (as you pointed out) now back to using

>~jetty:start

I did play around with v2.1 in one of my Lift projects after changing

//addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "0.7.0")
addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "2.1.0")

and in build.sbt

//seq(webSettings :_*)
enablePlugins(JettyPlugin)

Now running the container using ~jetty:start instead of as before ~container:start
I did how ever not notice any change in reload behavior, as before the sbt noticed the source changes. 

best regards Peter

Anton Kats

unread,
Oct 31, 2016, 6:10:27 PM10/31/16
to lif...@googlegroups.com
Here's something interesting
Running
> container:start

gives this error
> Error: Could not find or load main class

but >jetty:start works fine

To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to a topic in the Google Groups "Lift" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/liftweb/AJHj4TZy2TY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to liftweb+unsubscribe@googlegroups.com.

Diego Medina

unread,
Oct 31, 2016, 9:07:10 PM10/31/16
to Lift
See inline comments: 
 
Running
> container:start

gives this error
> Error: Could not find or load main class

but >jetty:start works fine



the command used to be container:start with older sbt plugins, now that you are using the newer version, the command is called

jetty:start

this is why one works but not the other.

We'll update the README on those projects to reflect this information.

Thanks for bringing it up!

Diego



--
Diego Medina
Lift/Scala Consultant
di...@fmpwizard.com
http://blog.fmpwizard.com/

Anton Kats

unread,
Nov 1, 2016, 11:37:18 AM11/1/16
to lif...@googlegroups.com
Thank you.
Best wishes,
Anton
Reply all
Reply to author
Forward
0 new messages