I stumbled upon following problem: when packaging a project with lots of files, resulting jar file is perceived as corrupt by java runtime.
Steps to reproduce (on java 7, sbt 0.12.3):
$ # in fresh dir
$ echo "object App{}" > Main.scala
$ mkdir -p src/main/resources/
$ # the following is going to take a while :)
$ for i in {1..70000}; do touch src/main/resources/$i; done
$ sbt package
$ java -jar target/scala-2.9.2/default_*.jar
Error: Invalid or corrupt jarfile target/scala-2.9.2/default-92d531_2.9.2-0.1-SNAPSHOT.jar
The probable cause of this problem could be the 65k file limit of the old ZIP format - but java 7 already uses ZIP64 by default, and 7z reports that the resulting jar file is indeed in 64-bit format. (relevant discussion)
Should I open a bug at github?
The same problem happens with sbt-assembly, by the way (it also uses sbt.Package).