Git Product home page Git Product logo

xsbt-web-plugin's Introduction

Usage

Setup SBT.

Add plugin to project in project/plugins.sbt:

resolvers += "Web plugin repo" at "http://siasia.github.com/maven2"    
	
addSbtPlugin("com.github.siasia" %% "xsbt-web-plugin" % "0.1.2")

Artifacts are available for 0.10.1 and 0.11.0 SBT versions.

Inject plugin settings into project in build.sbt:

seq(webSettings :_*)

or in case if you're using full configuration webSettings are com.github.siasia.WebPlugin.webSettings.

Add other required stuff like web.xml, properties and source code.

This will add commands required to run web application. Invoke jetty-run(as in sbt 0.7) to run web application:

> jetty-run
[info] jetty-7.3.0.v20110203
[info] NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
[info] started o.e.j.w.WebAppContext{/,file:/home/siasia/work/sample-copy/target/webapp/},/home/siasia/work/sample-copy/target/webapp
[info] Started [email protected]:8080

Web application is now accesible on http://localhost:8080

Use jetty-stop to stop Jetty and prepare-webapp to build webapp after you've done some changes:

> prepare-webapp
[success] Total time: 1 s, completed 02.05.2011 17:08:43
> [info] Reloading web application...
17:08:44.595 [Scanner-0] DEBUG net.liftweb.http.LiftServlet - Destroyed Lift handler.
[info] stopped o.e.j.w.WebAppContext{/,file:/home/siasia/work/sample-copy/target/webapp/},/home/siasia/work/sample-copy/target/webapp
[info] NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
[info] started o.e.j.w.WebAppContext{/,file:/home/siasia/work/sample-copy/target/webapp/},/home/siasia/work/sample-copy/target/webapp
[info] Reload complete.
	
> jetty-stop
17:09:21.739 [main] DEBUG net.liftweb.http.LiftServlet - Destroyed Lift handler.
[info] stopped o.e.j.w.WebAppContext{/,file:/home/siasia/work/sample-copy/target/webapp/},/home/siasia/work/sample-copy/target/webapp

Running Lift

Please note that Jetty dependencies should go to jetty configuration instead of test as it was in 0.7.x version.

Add Lift and Jetty to project dependencies:

libraryDependencies ++= Seq(
  "net.liftweb" %% "lift-webkit" % "2.3" % "compile",
  "org.mortbay.jetty" % "jetty" % "6.1.22" % "jetty",
  "ch.qos.logback" % "logback-classic" % "0.9.26"
)

or in case if you want to use Jetty 7:

libraryDependencies ++= Seq(
  "net.liftweb" %% "lift-webkit" % "2.3" % "compile",
  "org.eclipse.jetty" % "jetty-webapp" % "7.3.0.v20110203" % "jetty",
  "ch.qos.logback" % "logback-classic" % "0.9.26"
)

Check Lift Basic Sample for further examples.

License

This software is distributed under modified 3-clause BSD license. See LICENSE for more information.

xsbt-web-plugin's People

Contributors

aolshevskiy avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.