Did they remove the automatic user authentication from liftweb 2.0 snapshot? - lift

I just started a liftweb project and decided to go version 2.0 and it didn't seem to generate. Though I could be missing something.

If you've got SBT ( http://code.google.com/p/simple-build-tool/ ) and Git installed on your machine, try:
dpp#viper:~$ git clone git://github.com/dpp/lift_sbt_prototype.git
dpp#viper:~$ cd lift_sbt_prototype/
dpp#viper:~/lift_sbt_prototype$ sbt update ~jetty-run
Thanks

Related

Scala.js 1.0.0-RC2 tests failing around jsdom

I'm the process of cross-building UnivEq for Scala.JS 1.0.0-RC2. I've got jsdom installed in Travis and tests pass on the 0.6.31 builds, but fail on the 1.0.0-RC2 builds with TypeError: jsdom.createVirtualConsole is not a function.
Full error log: https://travis-ci.org/japgolly/univeq/jobs/636731705#L312
How to fix? Please help.
This happens because we never ported the additional support of jsdom v12 and later from the Scala.js 0.6.x branch (in this commit) to the newer, separate codebase for JSDOMNodeJSEnv at https://github.com/scala-js/scala-js-env-jsdom-nodejs. Apparently we forgot about that.
I have created a pull request at https://github.com/scala-js/scala-js-env-jsdom-nodejs/pull/33 to fix the issue.
Edit: the fix is now published as version 1.0.0-RC3. You can modify your project/plugins.sbt to depend on "org.scala-js" %% "scalajs-env-jsdom-nodejs" % "1.0.0-RC3" instead of ... % scalaJSVersion. It is compatible with Scala.js 1.0.0-RC2.
Obsolete old answer:
You could try using that new version today by checking out the master branch and publishing it locally:
$ git clone https://github.com/scala-js/scala-js-env-jsdom-nodejs.git
$ cd scala-js-env-jsdom-nodejs
$ sbt scalajs-env-jsdom-nodejs/publishLocal
$ cd ..
then using version 1.0.0-SNAPSHOT instead of 1.0.0-RC2 for scalajs-env-jsdom in your project/plugins.sbt

Configure repo for SBT launcher in Travis build

Where can I override the repo URL that SBT uses to fetch its launcher when the SBT instance is provided by Travis-CI?
http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.8/sbt-launch.jar is currently giving 404s and, as a result, the builds are failing on Travis with:
$ sbt clean dependencyUpdates coverage test coverageReport
Detected sbt version 0.13.8
Downloading sbt launcher for 0.13.8:
From http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.8/sbt-launch.jar
To /home/travis/.sbt/launchers/0.13.8/sbt-launch.jar
Download failed. Obtain the jar manually and place it at /home/travis/.sbt/launchers/0.13.8/sbt-launch.jar
I ran into the same problem today, and logged an issue for travis-ci: https://github.com/travis-ci/travis-ci/issues/4527
As a workaround, you can download the sbt-launcher.jar by adding a before_script section to your .travis.yml
before_script:
- mkdir -p $HOME/.sbt/launchers/0.13.8/
- curl -L -o $HOME/.sbt/launchers/0.13.8/sbt-launch.jar http://dl.bintray.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.8/sbt-launch.jar
We just deployed the fix to production. SBT builds should be working now.
Sorry for the inconvenience.
https://github.com/travis-ci/travis-ci/issues/4527#issuecomment-124123880

"Error during sbt execution: No Scala version specified or detected" with SBT from Homebrew

I have installed Scala 2.10.3 and SBT 0.13.1. When I execute SBT following Hello, World from the SBT documentation I get the following error message:
"Error during sbt execution: No Scala version specified or detected"
I've tried to add a build.sbt file with the scalaVersion but the error keeps showing up.
Please advise.
I've just downgraded sbt to 0.12.3 and it works ... so what's wrong with 0.13.X ?
Its not an issue with the upgrade of 0.13.* version. Its the repository cache thats causing the issue. There are possibilities where you have broken / no ivys (when only the jar is downloaded through maven repo) for the sbt jars in your cache.
Once upgraded remove your ivy repo cache (or rename the folder) and remove the .sbt/boot folder (removing this will enable to start from the scratch)
Edit your ./sbt/repositories file and provide preference to the ivy repositories. If you are using proxy repositories which includes both ivy and maven style artifacts, the add it as below
[repositories]
local
maven-local
maven-central-ivy: http://<repository url>, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
maven-central: http://<repository url>
This will enable especially (org.scala-sbt/sbt/*) to be download with the Ivys xml from where the version / revision and dependencies are picked up for the builds. If only the jar is downloaded from "maven-central", then the error occurs.
It is the problem of IDE you are using specially the scala plugin in it.
You can get ride of this just go to the folder where the build.sbt is created. Delete the "project" folder and open cmd, run "sbt" command on the folder, a new project folder will be created. Now you can open that in IDE.
It may be that you may find some problem very first in ide, if you build the project once , all the problems will go away.
I did exactly what #Gopi proposed but this is my repositories file content:
[repositories]
local
jcenter: https://jcenter.bintray.com/
maven-central
typesafe-ivy-releases: https://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
sbt-ivy-snapshots: https://repo.scala-sbt.org/scalasbt/ivy-snapshots/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
My SBT Version: 1.1.1
java version 1.8
Windows 10
Hope that helps,
BR. Paul
I've also installed both Scala and SBT on my machine through homebrew and can just run the given simple hello example, so i guess you did something wrong :-)
Please provide a bit more diagnostics, for example:
What is the output of both commands 'which sbt' and 'which scala'?
You should see the results as below:
$ which scala
/usr/local/bin/scala
$ which sbt
/usr/local/bin/sbt
$ ls -laF /usr/local/bin/sbt
lrwxr-xr-x 1 rjk admin 28 Feb 9 13:32 /usr/local/bin/sbt# -> ../Cellar/sbt/0.13.1/bin/sbt
$ ls -laF /usr/local/bin/scala
lrwxr-xr-x 1 rjk admin 32 Feb 9 13:38 /usr/local/bin/scala# -> ../Cellar/scala/2.10.3/bin/scala
And given the directory where you ran the example code from, is it completely empty besides the hw.scala example? Or did you also add the build.sbt or project/build.properties? If that's the case it would be wise to also list that here to spot any problems with them.

i need sbt 0.11.2 to build the mongo auth app for lift

For some reason sbt bails on .11.3 when working with the mongodb-record auth project, and it seems to me that's the only version i can download from the git site.
The idiomatic way is to specify sbt version in build.properties as
sbt.version=0.11.2
But since group id in 0.11.3 was changed from org.scala-tools.sbt to org.scala-sbt, sbt can't resolve older versions. But you still can manually download older version of launcher from typesafe repo.

How do I refresh updated Git dependency artifacts in SBT?

I've configured SBT (0.11.0) to pull in a GitHub project as a dependency, as per my answer on this question here.
It works fine except that I can't seem to get SBT to re-compile my Git dependency when it gets updated. In other words: if I make an update to the dependency, push to Git and reload my project's SBT and run package, then SBT does not recompile the external Git dependency when compiling my project.
I've tried creating a new branch in my Git dependency (say, forcenew) and updating the branch in my SBT project configuration to use this:
lazy val depProject = RootProject(uri("git://github.com/me/dep-project.git#forcenew"))
But even this doesn't force a refresh. I'm a bit stumped - I can't even find where SBT puts the Git project to compile it (it doesn't seem to be in ~/.sbt/ or ~/.ivy2/)...
Any help greatly appreciated!
From: https://github.com/sbt/sbt/issues/335
this should be fixed in 0.12.0, just call "sbt update"
It was fixed in 0.12.0 so sbt update is enough, but got back in 13.0 -- for now, you have to wipe dependency from ~/.sbt/staging/ manually
You likely want to clear out ~/.sbt/staging/
A quick hack you can add to your build.sbt:
def removegit = Command.command("removegit"){state =>
val home = sys.env("HOME")
val k = ("rm -rf "+ home + "/.sbt/0.13/staging/").!
state
}
commands ++= Seq(removegit)
And then sbt removegit will wipe that directory. This doesn't do anything smart like checking commits, which would be a great upgrade... The repos are being stored in ~/.sbt/0.13/staging/ on my machine, you may need to adjust that.