xsbt-web-plugin

sbt web plugin: Not a valid key: jetty-run (similar: jetty-port, jetty-context, run)

泪湿孤枕 提交于 2020-01-02 02:32:10
问题 I'm trying to set up a scala sbt project with the lift web framework. I'm using scala 2.9.0-1 sbt 0.10.1 lift 2.3 xsbt-web-plugin 0.1.1 (which is only on scala 2.8.1, see end of question) (quite recent versions I know). I followed http://d.hatena.ne.jp/k4200/20110711/1310354698 and https://github.com/siasia/xsbt-web-plugin/blob/master/README.md to obtain the following sbt configuration files: project/build.properties sbt.version=0.10.1 project/plugins/build.sbt resolvers += "Web plugin repo"

resolvers not shared to dependent sbt projects?

ⅰ亾dé卋堺 提交于 2019-12-21 20:53:09
问题 In this weird case that seems to involve xsbt-web-plugin, I get the error unresolved dependency: play#play-json_2.10;2.2-SNAPSHOT: not found when loading the server subproject. The dependency and the correct resolver are specified in the library subproject, which server depends on. It doesn't blow up if I don't include webSettings in server, but I am trying to build a .war there. [root]/project/Build.scala import sbt._ import Keys._ object MyBuild extends Build { lazy val root = Project("root

SBT “package” depend on “test”

南楼画角 提交于 2019-12-20 04:24:19
问题 How do I make target "package" depend on target "test" ? There is a solution here: Force sbt 0.11 to run tests But it doesn't really work with the xsbt-web-plugin. 回答1: Here's what I did: Keys.`package` <<= (test in Test, Keys.`package` in Compile) map { (_, in) => println("after package & test") in } It runs test, and iff the tests were successful, runs package task. (tested on fresh install of lift-2.5-RC2) 来源: https://stackoverflow.com/questions/15547784/sbt-package-depend-on-test

How to have different webapp resources for container:start and package tasks in SBT

帅比萌擦擦* 提交于 2019-12-12 17:26:05
问题 I have a web application with pure JS frontend and Scala backend. I would like to use Grunt in my build pipeline to process src/main/webapp into target dist/webapp dir with concatenated/minified js and html files, compiled sass sheets etc. I also want to preserve original JS and HTML files for local testing using container:start task, while the package task would build my WAR file with resources processed by Grunt. When I use following setting in SBT: webappResources in Compile <<=

How to set system property for xsbt-web-plugin's jetty()?

偶尔善良 提交于 2019-12-10 22:48:08
问题 I've migrated my project to 0.13.5 and started using the xsbt-web-plugin. I'd like to configure logback to be using a configuration file outside the classpath which is set by a system property logback.configurationFile (so I can keep the logconfig outside the war file). Previously I would simply set: System.setProperty("logback.configurationFile", "/some/path/logback.xml") inside the project/build.scala and logback would pick it up. However, after upgrading sbt to 0.13.5 and migrating to the

How can sbt-web output be used with xsbt-web-plugin via a SBT project dependency?

我的未来我决定 提交于 2019-12-09 07:44:29
问题 I am trying to use the sbt-web plugin without the play framework and instead build a webapp using the xsbt-web-plugin. I have gotten the sbt-web plugin working correctly in handling the asset pipeline and have it creating a valid webjar output (via packageBin) as well as the standard "web/public/main" output (via assets). Separately, I have been using the xsbt-web-plugin to develop a webapp and serve that webapp from within SBT (via container:start). The webapp project can consume webjar

sbt 0.11.2 how to combine ~copy-resources with ~aux-compile

戏子无情 提交于 2019-12-09 04:26:22
问题 I'm using sbt 0.11.2 with xsbt-web-plugin 0.2.10 to build a Wicket (1.5.3) app. I'm using this version of Jetty: "org.eclipse.jetty" % "jetty-webapp" % "8.0.1.v20110908" % "container", So when I do > container:start my app starts up just fine. But if I change some some of the html, the change does not kick in until I do > copy-resources and scala source code changes are not reflected until I do > aux-compile (this one was hard to find out!!) The problem is that I want this to be reflected

How to “package” some modules to jars and others to wars in multi-module build with single task?

无人久伴 提交于 2019-12-07 13:01:04
问题 I use package task (from xsbt-web-plugin) to package a project to a war, and assembly task (from sbt-assembly) to package the project to a jar. I have a multi-module build and some modules are packaged into wars and some into jars. I'd like to set up the build to execute assembly task and: Jar modules are packaged into jar files War modules are packaged into war files How to execute package task for the war projects while executing assembly task? 回答1: Both package task and assembly task

java.lang.reflect.InvocationTargetException in jetty-web.xml when setting WebAppContext.configurationClasses

安稳与你 提交于 2019-12-06 14:56:03
问题 I'm trying to add org.eclipse.jetty.annotations.AnnotationConfiguration to the configurationClasses property of org.eclipse.jetty.webapp.WebAppContext but (when invoking Jetty with sbt containe:start ), getting: [warn] Config error at <Set name="configurationClasses"> [warn] <Array type="java.lang.String"><Item>org.eclipse.jetty.webapp.WebInfConfiguration</Item><Item>org.eclipse.jetty.webapp.WebXmlConfiguration</Item><Item>org.eclipse.jetty.webapp.MetaInfConfiguration</Item><Item>org.eclipse

How to “package” some modules to jars and others to wars in multi-module build with single task?

為{幸葍}努か 提交于 2019-12-05 19:22:41
I use package task (from xsbt-web-plugin ) to package a project to a war, and assembly task (from sbt-assembly ) to package the project to a jar. I have a multi-module build and some modules are packaged into wars and some into jars. I'd like to set up the build to execute assembly task and: Jar modules are packaged into jar files War modules are packaged into war files How to execute package task for the war projects while executing assembly task? Both package task and assembly task evaluate to File type, so as @James commented you should be able to rewire assembly task in webapp project to