ngocdaothanh/xitrum — Issue #47: Can't access public files when run as a subproject
Author: itang
Created: 2011-11-01 15:08:54+00:00
State: open

The project layout:
ROOT
├── build.sbt
├── project
│ ├── Build.scala
│ ├── plugins.sbt
├── README.md
└── xitrumWeb
├── bin
├── config
├── public
├── src

Run as below:
$ sbt "project XitrumWeb" run
Then can't access the public resources, e.g. http://localhost:8000/scripts/jquery.js
Try to move xitrumWeb/public directory as ROOT/public, just OK.

Notice "xitrum/src/main/scala/xitrum/handler/up/PublicFileServer.scala" source:
...
System.getProperty("user.dir") + "/public"
...

In this case, System.getProperty("user.dir") should be the ROOT project dir. So the problem is coming.