Created
October 17, 2014 13:49
-
-
Save slorber/6158a1b4716bad1c20ad to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sebastien@sebastien-xps:stample-Phonegap (master $)$ cd ../Stampl;e | |
| bash: cd: ../Stampl: No such file or directory | |
| e: command not found | |
| sebastien@sebastien-xps:stample-Phonegap (master $)$ cd ../Stample | |
| sebastien@sebastien-xps:Stample (master $%)$ ./sbt | |
| ################################################################################### | |
| ### PREPARING SBT OPTIONS | |
| ######################### | |
| Dev: won't send errors by mail | |
| Dev: will start JVM in debug mode on port 9876 | |
| Options are: -Xmx1536M -Xss1M -XX:MaxPermSize=521m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Dfile.encoding=UTF8 -DstampleEnv=dev -Dconfig.resource=application-dev.conf -XX:ErrorFile=stample-logs/jvm_crash_report_%p.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=stample-logs -Dscala.concurrent.context.minThreads=10 -Dscala.concurrent.context.maxThreads=20 -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9876 | |
| ################################################################################### | |
| ### STARTING SBT JVM | |
| ######################### | |
| ERROR: transport error 202: bind failed: Address already in use | |
| ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) | |
| JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:750] | |
| FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197) | |
| Aborted (core dumped) | |
| ################################################################################### | |
| ### Error: will retry without using debug option: -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9876 | |
| ######################### | |
| [info] Loading global plugins from /home/sebastien/.sbt/0.13/plugins | |
| [info] Loading project definition from /home/sebastien/Desktop/Stample/project | |
| [info] Set current project to stample (in build file:/home/sebastien/Desktop/Stample/) | |
| > project stample-web | |
| [info] Set current project to stample-web (in build file:/home/sebastien/Desktop/Stample/) | |
| [stample-web] $ test | |
| [info] AnnotationUtilsTest | |
| [info] | |
| [info] The annotation should | |
| [info] + not be updated when html doesn't change | |
| [info] + not be updated when new html fragment is added at the end | |
| [info] + not be updated when new simple text fragment is added at the end | |
| [info] | |
| [info] Total for specification AnnotationUtilsTest | |
| [info] Finished in 349 ms | |
| [info] 3 examples, 0 failure, 0 error | |
| [info] utils.AnnotationUtilsTest | |
| [info] + utils.AnnotationUtilsTest | |
| [info] + utils.AnnotationUtilsTest | |
| [info] + utils.AnnotationUtilsTest | |
| [info] | |
| [info] | |
| [info] Total for test utils.AnnotationUtilsTest | |
| [info] Finished in 0.017 seconds | |
| [info] 3 tests, 0 failures, 0 errors | |
| [info] UsernameUtilsTest | |
| [info] | |
| [info] The username should | |
| [info] + be valid when only lowercase chars and numbers | |
| [info] + be invalid when having uppercase chars | |
| [info] + be invalid when having too much characters | |
| [info] + be invalid when having too few characters | |
| [info] + be invalid when having space | |
| [info] + be invalid when having diacritics (accents) | |
| [info] | |
| [info] Total for specification UsernameUtilsTest | |
| [info] Finished in 18 ms | |
| [info] 6 examples, 0 failure, 0 error | |
| [info] utils.UsernameUtilsTest | |
| [info] + utils.UsernameUtilsTest | |
| [info] + utils.UsernameUtilsTest | |
| [info] + utils.UsernameUtilsTest | |
| [info] + utils.UsernameUtilsTest | |
| [info] + utils.UsernameUtilsTest | |
| [info] + utils.UsernameUtilsTest | |
| [info] | |
| [info] | |
| [info] Total for test utils.UsernameUtilsTest | |
| [info] Finished in 0.001 seconds | |
| [info] 6 tests, 0 failures, 0 errors | |
| [info] Passed: Total 9, Failed 0, Errors 0, Passed 9 | |
| [success] Total time: 5 s, completed Oct 17, 2014 3:47:28 PM | |
| [stample-web] $ | |
| CHANGES THE DEPENDENCY HERE! | |
| [stample-web] $ reload | |
| [info] Loading global plugins from /home/sebastien/.sbt/0.13/plugins | |
| [info] Loading project definition from /home/sebastien/Desktop/Stample/project | |
| [info] Compiling 1 Scala source to /home/sebastien/Desktop/Stample/project/target/scala-2.10/sbt-0.13/classes... | |
| [warn] there were 6 deprecation warning(s); re-run with -deprecation for details | |
| [warn] one warning found | |
| [info] Set current project to stample-web (in build file:/home/sebastien/Desktop/Stample/) | |
| [stample-web] $ test | |
| [info] Updating {file:/home/sebastien/Desktop/Stample/}stample-web... | |
| [info] Resolving org.fusesource.jansi#jansi;1.4 ... | |
| [info] Done updating. | |
| [info] Compiling 2 Scala sources to /home/sebastien/Desktop/Stample/stample-web/target/scala-2.10/test-classes... | |
| [trace] Stack trace suppressed: run last stample-web/test:definedTests for the full output. | |
| [error] (stample-web/test:definedTests) java.lang.reflect.InvocationTargetException | |
| [error] Total time: 15 s, completed Oct 17, 2014 3:48:09 PM | |
| [stample-web] $ last stample-web/test:definedTests | |
| [debug] Subclass fingerprints: Stream((junit.framework.TestCase,false,sbt.SubclassFingerprintWrapper@419079ba), ?) | |
| [debug] Annotation fingerprints: Stream((org.junit.Test,false,sbt.AnnotatedFingerprintWrapper@7427c3f6), ?) | |
| java.lang.NoSuchMethodError: org.specs2.runner.Fingerprints$.fp1()Lorg/specs2/runner/SpecificationFingerprint; | |
| at org.specs2.runner.Specs2Framework.fingerprints(SbtRunner.scala:23) | |
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) | |
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | |
| at java.lang.reflect.Method.invoke(Method.java:606) | |
| at sbt.TestFramework$.getFingerprints(TestFramework.scala:113) | |
| at sbt.Tests$$anonfun$discover$1.apply(Tests.scala:240) | |
| at sbt.Tests$$anonfun$discover$1.apply(Tests.scala:240) | |
| at scala.collection.immutable.Stream$$anonfun$flatMap$1.apply(Stream.scala:450) | |
| at scala.collection.immutable.Stream$$anonfun$flatMap$1.apply(Stream.scala:450) | |
| at scala.collection.immutable.Stream.append(Stream.scala:237) | |
| at scala.collection.immutable.Stream$$anonfun$append$1.apply(Stream.scala:237) | |
| at scala.collection.immutable.Stream$$anonfun$append$1.apply(Stream.scala:237) | |
| at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1085) | |
| at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1077) | |
| at scala.collection.immutable.Stream.collect(Stream.scala:388) | |
| at scala.collection.immutable.Stream$$anonfun$collectedTail$1.apply(Stream.scala:1153) | |
| at scala.collection.immutable.Stream$$anonfun$collectedTail$1.apply(Stream.scala:1153) | |
| at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1085) | |
| at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1077) | |
| at scala.collection.immutable.Stream$$anonfun$map$1.apply(Stream.scala:376) | |
| at scala.collection.immutable.Stream$$anonfun$map$1.apply(Stream.scala:376) | |
| at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1085) | |
| at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1077) | |
| at scala.collection.immutable.Stream.foreach(Stream.scala:548) | |
| at scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:48) | |
| at scala.collection.mutable.SetBuilder.$plus$plus$eq(SetBuilder.scala:22) | |
| at scala.collection.TraversableLike$class.to(TraversableLike.scala:629) | |
| at scala.collection.AbstractTraversable.to(Traversable.scala:105) | |
| at scala.collection.TraversableOnce$class.toSet(TraversableOnce.scala:267) | |
| at scala.collection.AbstractTraversable.toSet(Traversable.scala:105) | |
| at sbt.Tests$.firsts$1(Tests.scala:250) | |
| at sbt.Tests$.discover(Tests.scala:258) | |
| at sbt.Tests$.discover(Tests.scala:240) | |
| at sbt.Defaults$$anonfun$detectTests$1.apply(Defaults.scala:513) | |
| at sbt.Defaults$$anonfun$detectTests$1.apply(Defaults.scala:512) | |
| at scala.Function3$$anonfun$tupled$1.apply(Function3.scala:35) | |
| at scala.Function3$$anonfun$tupled$1.apply(Function3.scala:34) | |
| at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47) | |
| at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42) | |
| at sbt.std.Transform$$anon$4.work(System.scala:64) | |
| at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237) | |
| at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237) | |
| at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18) | |
| at sbt.Execute.work(Execute.scala:244) | |
| at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237) | |
| at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237) | |
| at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160) | |
| at sbt.CompletionService$$anon$2.call(CompletionService.scala:30) | |
| at java.util.concurrent.FutureTask.run(FutureTask.java:262) | |
| at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) | |
| at java.util.concurrent.FutureTask.run(FutureTask.java:262) | |
| at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) | |
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) | |
| at java.lang.Thread.run(Thread.java:744) | |
| [error] (stample-web/test:definedTests) java.lang.reflect.InvocationTargetException | |
| [stample-web] $ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sbt._ | |
| import sbt.Keys._ | |
| import play.Project._ | |
| import org.sbtidea.SbtIdeaPlugin._ | |
| import com.typesafe.sbt.SbtScalariform._ | |
| object StampleBuild extends Build { | |
| val appVersion = "1.0" | |
| val appDependencies = Seq( | |
| "ws.securesocial" %% "securesocial" % "2.1.3" , | |
| "org.jsoup" % "jsoup" % "1.7.3", | |
| "com.novus" %% "salat" % "1.9.5", | |
| "org.mongodb" %% "casbah" % "2.6.5", | |
| "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.2.0", | |
| "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.3.0", | |
| "com.amazonaws" % "aws-java-sdk" % "1.3.20", | |
| "org.imgscalr" % "imgscalr-lib" % "4.2", | |
| "org.mockito" % "mockito-all" % "1.9.5" % "test,it", | |
| "de.flapdoodle.embed" % "de.flapdoodle.embed.mongo" % "1.42" % "test,it", | |
| // See https://gist.github.com/slorber/83b3b3a672dac9604b6e | |
| "org.specs2" %% "specs2-core" % "2.4.6" % "test,it", | |
| // "org.specs2" %% "specs2" % "2.4.2" % "test,it", | |
| "com.evernote" % "evernote-api" % "1.25.1", | |
| "org.scalaz" %% "scalaz-core" % "7.0.6", | |
| "org.codehaus.janino" % "janino" % "2.6.1", | |
| "nl.rhinofly" %% "play-s3" % "3.3.3", | |
| "com.ecwid" % "ecwid-mailchimp" % "2.0.1.0", | |
| "commons-io" % "commons-io" % "2.4", | |
| "org.apache.pdfbox" % "pdfbox" % "1.8.4", | |
| "org.jcodec" % "jcodec" % "0.1.6-3", | |
| "com.syncthemall" % "enml4j" % "1.1.0", | |
| cache | |
| ) | |
| val buildResolvers = Seq( | |
| "Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository", | |
| "Repo 1" at "http://repo1.maven.org/maven2/", | |
| "repo.novus rels" at "http://repo.novus.com/releases/", | |
| "Scalatools repo" at "http://oss.sonatype.org/content/groups/scala-tools/", | |
| "Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/", | |
| "Sonatype releases" at "http://oss.sonatype.org/content/repositories/releases/", | |
| "Code hale" at "http://repo.codahale.com/", | |
| "Rhinofly Internal Repository" at "http://maven-repository.rhinofly.net:8081/artifactory/libs-release-local", | |
| Resolver.url("sbt-plugin-snapshots", url("http://repo.scala-sbt.org/scalasbt/sbt-plugin-snapshots/"))(Resolver.ivyStylePatterns), | |
| Resolver.url("sbt-plugin-releases", url("http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns) | |
| ) | |
| val ideaFoldersToExclude = Seq(".idea",".idea_modules","target") | |
| val buildSettings = Seq( | |
| resolvers ++= buildResolvers, | |
| scalaVersion := "2.10.3", | |
| ideaExcludeFolders := ideaFoldersToExclude | |
| ) | |
| override lazy val settings = super.settings ++ buildSettings | |
| ///////////////////////////////////////////////////////////////////////////////////// | |
| //////// PROJECT DEFINITIONS | |
| lazy val stampleRootProject = Project(id = "stample",base = file("."),settings = commonSettings) | |
| .aggregate(stampleWebProject) | |
| .settings( | |
| aggregate in run := true | |
| ) | |
| lazy val stampleSearchProject = Project(id = "stample-search",base = file("stample-search"),settings = commonSettings) | |
| .settings( | |
| parallelExecution in Test := false | |
| ) | |
| lazy val stampleWebProject = play.Project("stample-web", appVersion, appDependencies,path = file("stample-web"),settings = playSettings) | |
| .dependsOn(stampleSearchProject) | |
| .settings(defaultScalaSettings:_*) | |
| .settings( | |
| scalacOptions ++= Seq("-Xmax-classfile-name", "140"), | |
| ideaExcludeFolders := ideaFoldersToExclude, | |
| // logBuffered in Test := false, | |
| scalaSource in Test <<= baseDirectory / "test/unit", | |
| javaSource in Test <<= baseDirectory / "test/unit", | |
| sourceDirectory in Test <<= baseDirectory / "test/unit", | |
| parallelExecution in Test := false, // TODO should be removed for unit tests i guess! | |
| testOptions in Test += Tests.Argument("sequential") | |
| //javaOptions in Test += "-Xmx256m -XX:MaxPermSize=256m" | |
| ) | |
| .configs(IntegrationTest) | |
| .settings( Defaults.itSettings : _*) | |
| .settings( | |
| // logBuffered in IntegrationTest := false, | |
| testOptions in IntegrationTest += Tests.Setup( () => StampleBuildTools.setupMongo() ), | |
| testOptions in IntegrationTest += Tests.Cleanup( () => StampleBuildTools.shutdownMongo ), | |
| scalaSource in IntegrationTest <<= baseDirectory / "test/integration", | |
| javaSource in IntegrationTest <<= baseDirectory / "test/integration", | |
| sourceDirectory in IntegrationTest <<= baseDirectory / "test/integration", | |
| parallelExecution in IntegrationTest := false, | |
| testOptions in IntegrationTest += Tests.Argument("sequential") , | |
| routesImport += "_root_.utils.binders._", | |
| routesImport += "org.bson.types.ObjectId" | |
| //javaOptions in IntegrationTest += "-Xmx256m -XX:MaxPermSize=256m" | |
| ) | |
| lazy val batchRootProject = Project(id = "stample",base = file("stample-batch"),settings = commonSettings) | |
| lazy val batchInconsistenciesProject = Project(id = "inconsistencies-fixer",base = file("stample-batch/inconsistencies-fixer"),settings = commonSettings) | |
| .dependsOn(stampleWebProject) | |
| lazy val batchDbMigrationsProject = Project(id = "db-migrations",base = file("stample-batch/db-migrations"),settings = commonSettings) | |
| .dependsOn(stampleWebProject) | |
| def playSettings = playScalaSettings ++ scalariformSettings | |
| def commonSettings = Defaults.defaultSettings ++ scalariformSettings | |
| override def rootProject = Some(stampleRootProject) | |
| } |
So it is sbt 0.13 BTW.
Maybe the wiring between SBT 0.13 and Specs2 has changed and there are some incompatibilities?
I don't know of any change in between recent sbt versions. It's really weird that one class of tests passes ok and not the other. Maybe it could be interesting to minimize your example and submit it to the sbt team?
BTW, I've written a small post on specs2 dependencies here.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can see in dependencies
Notice I do a reload in SBT to switch from specs2 to specs2-core. The 2nd (that failed) was with specs2-core dependency.
Note that both dependencies work fine with it:test, only test is affected strantely. I tried to add both dependencies (in same version) but I got back the Scalaz dependency issue.