Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Sbt: Rolling with continuous/incremental compilation and Jetty

DZone's Guide to

Sbt: Rolling with continuous/incremental compilation and Jetty

· Agile Zone
Free Resource

See how three solutions work together to help your teams have the tools they need to deliver quality software quickly. Brought to you in partnership with CA Technologies

As I mentioned in an earlier post we’re using SBT on our project and one of it’s cool features is that it will listen to the source directory and then automatically recompile the code when it detects file changes.

We’ve also installed the sbt-jetty-embed plugin which allows us to create a war which has Jetty embedded so that we can keep our application containerless.

That plugin adds an action called ‘jetty’ to sbt so we (foolishly in hindsight) thought that we would be able to launch the application in triggered execution mode by making use of a ~ in front of that:

$ ./sbt
> ~jetty

 

Unfortunately that doesn’t do any continuous compilation which left us quite confused until we realised that RTFM might be a good idea…

What we actually needed to launch the application locally and edit code/see changes as if it’s written in a dynamic language was the following:

$ ./sbt
> jetty-run
> ~ prepare-webapp

 

Discover how TDM Is Essential To Achieving Quality At Speed For Agile, DevOps, And Continuous Delivery. Brought to you in partnership with CA Technologies

Topics:

Published at DZone with permission of Mark Needham, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}