Seems like an ultimate deployment in some cases (e.g. to 3rd party sysadmins).
Anybody ever done that, or have pointers on how to....?
--Maarten
On Tuesday, February 22, 2011, Maarten Koopmans
Forgot to mention: I was thinking of using jetty-runner, unpack that
and my war file, and bundle it again as one jar. Not sure that will
work though.
On Tuesday, February 22, 2011, Maarten Koopmans
<maarten....@gmail.com> wrote:
> Does anybody ever manage to bundle jetty6, it's configs and your
> (root.)war file in one standalone jar?
>
> Seems like an ultimate deployment in some cases (e.g. to 3rd party sysadmins).
>
> Anybody ever done that, or have pointers on how to....?
>
> --Maarten
>
--
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.
On Tue, Feb 22, 2011 at 5:34 AM, Maarten Koopmans <maarten....@gmail.com> wrote:
Forgot to mention: I was thinking of using jetty-runner, unpack that
and my war file, and bundle it again as one jar. Not sure that will
work though.
I've heard tell that this is how Foursquare packages/deploys.
--Maarten--
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.
--
My experience with HotSpot running on 64 bit machines in server mode is that it is significantly faster once warmed up than AOT compilers. This is likely to be true with Scala where a lot of the call paths are monomorphic and thus HotSpot can optimize/inline them very, very well.
package com.example // remember this package in the sbt project definition
import org.mortbay.jetty.Server
import org.mortbay.jetty.servlet.{Context, ServletHolder}
import org.scalatra.TemplateExample // this is the example Scalatra servlet
object JettyLauncher { // this is my entry object as specified in sbt project definition
def main(args: Array[String]) {
val server = new Server(8080)
val root = new Context(server, "/", Context.SESSIONS)
root.addServlet(new ServletHolder(new TemplateExample), "/*")
server.start()
server.join()
}
}
root.addServlet(new ServletHolder(new TemplateExample), "/*")
There's also this blog post on making executable wars:
http://eclipsesource.com/blogs/2009/10/02/executable-wars-with-jetty/
Note that I haven't tried this. I was just amazed at how easy it was to
deploy Hudson and wondered how difficult it'd be to produce
similarly-packaged apps. I'm guessing that a bit of wiring in Boot.scala
and SBT's package action should do it--that and command line parsing for
the port and other values.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk1j1RMACgkQIaMjFWMehWI7BQCbBaTtPczG/xMJHEWmGZyx4EG9
t1gAmgMwUg0x/yqhFWmiXKgjeIXM3l/y
=W8pj
-----END PGP SIGNATURE-----
David Bernard wrote:
> see RunWebApp in any Lift archetype
+1 This is what we do in our existing project :)
- Indrajit
>> <tim...@getintheloop.eu <mailto:tim...@getintheloop.eu>>
>> wrote:
>>
>> Yup, this is exactly what I do. Works great and have
>> had next to no problems. Was a complete nightmare to
>> setup in the first instance as it requires a very
>> specific balance of class embedding (due to
>> conflicting dependencies). The bonus is that I can
>> package it completely standalone and not have any
>> other headaches to worry about; do it once and just
>> replicate it.
>>
>> FYI, I use Shade for the embedding and it works great;
>> you just have to get the right mix of dependencies. As
>> I run on windows this meant I had to contend with some
>> other win specific stuff, which affected my config but
>> yes, shading the JAR will give you the most stable
>> type of uber jar.
>>
>> http://maven.apache.org/plugins/maven-shade-plugin/
>>
>> I've not used Jetty runner, but apparently it works well.
>>
>> Cheers, Tim
>>
>> --
>> 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
>> <mailto:lif...@googlegroups.com>.
>> To unsubscribe from this group, send email to
>> liftweb+u...@googlegroups.com
>> <mailto:liftweb%2Bunsu...@googlegroups.com>.
>> 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 <mailto:lif...@googlegroups.com>.
> To unsubscribe from this group, send email to
> liftweb+u...@googlegroups.com
> <mailto:liftweb%2Bunsu...@googlegroups.com>.
> 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
> <mailto:lif...@googlegroups.com>.
> To unsubscribe from this group, send email to
> liftweb+u...@googlegroups.com
> <mailto:liftweb%2Bunsu...@googlegroups.com>.
Maarten Koopmans wrote:
> Wait the loader would do something like this, right:
>
> |package com.example // remember this package in the sbt project definition
> import org.mortbay.jetty.Server
> import org.mortbay.jetty.servlet.{Context, ServletHolder}
> import org.scalatra.TemplateExample // this is the example Scalatra servlet
>
> object JettyLauncher { // this is my entry object as specified in sbt project definition
> def main(args: Array[String]) {
> val server = new Server(8080)
> val root = new Context(server,"/", Context.SESSIONS)
> root.addServlet(new ServletHolder(new TemplateExample),"/*")
> server.start()
> server.join()
> }
> }|
>
> |root.addServlet(new ServletHolder(new TemplateExample),"/*")|
>
> ...would be the line where Lift comes in, but I thought I read Lift was
> a filter. Anyway, worth finding out :-)
>
> Imagine a SBT project file where you could just type 'sbt assembly' and
> then pass whatever you have around!
Please file a ticket and assign this to me. I would attempt to have this
out of the box in 2.3 as part of LiftDefaultWebProject [1].
The idea is to have all the common configuration stuff available to the
applications out of the box by just having this mixed into your project.
- Indrajit
>> lif...@googlegroups.com <mailto:lif...@googlegroups.com>.
>> To unsubscribe from this group, send email to
>> liftweb+u...@googlegroups.com
>> <mailto:liftweb%2Bunsu...@googlegroups.com>.
>> 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
> <mailto:lif...@googlegroups.com>.
> To unsubscribe from this group, send email to
> liftweb+u...@googlegroups.com
> <mailto:liftweb%2Bunsu...@googlegroups.com>.
My experience with HotSpot running on 64 bit machines in server mode is that it is significantly faster once warmed up than AOT compilers. This is likely to be true with Scala where a lot of the call paths are monomorphic and thus HotSpot can optimize/inline them very, very well.
--Maarten--
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.
On Wednesday, February 23, 2011, David Pollak
Maybe I'll find some time next week.
--Maarten
You have a broken class path - seems you have both log4j and the he logback classic facade.Cheers, Tim
--
You might want to look at the transitive dependencies (dunno how to to
that in sbt), some may pull in the log4j stuff. I think jetty uses
slf4j, so perhaps there are some dependencies there that needs
exclusion?
/Jeppe
--Maarten
Jeppe is almost certainly right - its going to be one of the transitive dependencies. FYI, you have to override the def ivyXML in order to define dependencies with exclusions through SBT.Cheers, Tim
--
Yeah this is the only annoying thing about SBT - as far as im aware there is not an equivalent to mvn dependency:tree from Maven. I'm not aware of anyone having made that plugin either so you might be a bit stuck and have to use maven to at least determine the usage.
Cheers, Tim--
--
Hi Marteen,Yes it seems Lift requires change in boot to work with Jetty-7 for continuations, see Tim's post: http://blog.getintheloop.eu/2010/02/18/using-jetty-7-continuations-to-power-lift-comet-support/
I've almost finished support for 7 in my plugin, and can verify that this will make comet work.
Regards,Glen--
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.
--Maarten
On Sunday, February 27, 2011, David Pollak
Regards,Glen--
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.
Regards,Glen--
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.
Regards,Glen--