Richard Dallaway
unread,Dec 3, 2010, 8:57:59 AM12/3/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to simple-build-tool
Hi there - I'm using SBT with Lift and I've added the withSources()
classifier to pull in the source. This works fine, but only for the
dependencies I explicitly list. Is it possible for SBT to pull in the
source on implied dependencies too?
For example, I have a project (full listing at the end) which
references....
"net.liftweb" %% "lift-webkit" % liftVersion % "compile->default"
withSources(),
"net.liftweb" %% "lift-mapper" % liftVersion % "compile->default"
withSources(),
"net.liftweb" %% "lift-wizard" % liftVersion % "compile->default"
withSources(),
"net.liftweb" %% "lift-testkit" % liftVersion % "compile->default"
withSources(),
...and it works just great (thank you!). But lift-proto is also
automatically pulled in as a dependent library from one of those four,
but the -sources.jar is not fetched.
The easy work-around is, of course, to just explicitly add that entry
too. That works for me, so no big deal. But I'd assumed SBT would
maintain the withSources flag as it discovered additional
dependencies.
Of course it's more complicated that that. For example, would I
expect further dependencies to include source (commons-codec, commons-
logging, joda-time, and so on...)? I'm not sure, but I thought I'd
ask the question to see if it can be done.
Cheers
Richard
import sbt._
import de.element34.sbteclipsify._
class Project(info: ProjectInfo) extends DefaultWebProject(info) with
Eclipsify {
val snapshots = ScalaToolsSnapshots
val liftVersion = "2.2-M1"
// uncomment the following if you want to use the snapshot repo
val scalatoolsSnapshot = ScalaToolsSnapshots
// If you're using JRebel for Lift development, uncomment
// this line
override def scanDirectories = Nil
override def jettyWebappPath = webappPath
override def libraryDependencies = Set(
"net.liftweb" %% "lift-webkit" % liftVersion % "compile->default"
withSources(),
"net.liftweb" %% "lift-mapper" % liftVersion % "compile->default"
withSources(),
"net.liftweb" %% "lift-wizard" % liftVersion % "compile->default"
withSources(),
"net.liftweb" %% "lift-testkit" % liftVersion % "compile->default"
withSources(),
"org.mortbay.jetty" % "jetty" % "6.1.22" % "test->default",
"junit" % "junit" % "4.5" % "test->default",
"org.scala-tools.testing" %% "specs" % "1.6.5" % "test->default",
"com.h2database" % "h2" % "1.2.138",
"log4j" % "log4j" % "1.2.16",
"org.slf4j" % "slf4j-log4j12" % "1.6.1",
"mysql" % "mysql-connector-java" % "5.1.6"
) ++ super.libraryDependencies