14

I need to run the embedded Jetty on port different to the default 8080, using SBT 0.10 The question was answered here for SBT 0.7 - In which file do I need to add an override for the jetty port when running a lift webapp in dev mode from sbt?. I can find no reference to do the same for SBT 0.10 I am using the Full configuration (Build.scala) for multi modules and not quick the sbt dsl.

Community
  • 1
  • 1
iandebeer
  • 227
  • 2
  • 8
  • Where did you put "jettyPort"? I put it in Build.scala and got "reassignment to val". Thanks. – k4200 Jul 10 '11 at 03:19

2 Answers2

8

In SBT 0.10 Jetty support no longer goes as a part of the build tool, but rather shipped as a plugin. In order to change the port, you'll have to initialize jettyPort setting with your value:

jettyPort := 1111

Or, if you're running from the console:

set jettyPort := 1111
session save

See plugin instructions for more details.

Vasil Remeniuk
  • 20,519
  • 6
  • 71
  • 81
6

For sbt 0.11.2 , you specify

port in container.Configuration := 8081

in build.sbt

fmpwizard
  • 2,758
  • 1
  • 22
  • 24