Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Moved to mongojack

  • Loading branch information...
commit c98a7acb9d8c4ded3b865fd87ec491297853000c 1 parent 34bdb58
@jroper jroper authored
View
24 build.sbt
@@ -1,26 +1,26 @@
// Project info
-name := "play-mongo-jackson-mapper"
+name := "play-mongojack"
-organization := "net.vz.mongodb.jackson"
+organization := "org.mongojack"
// The version comes from version.sbt, and is generated by the release plugin
-scalaVersion := "2.9.1"
+scalaVersion := "2.10.0"
// Dependencies
libraryDependencies ++= Seq(
- "net.vz.mongodb.jackson" % "mongo-jackson-mapper" % "1.4.1",
- "com.fasterxml" % "jackson-module-scala" % "1.9.3",
- "play" %% "play" % "2.0"
+ "org.mongojack" % "mongojack" % "2.0.0-RC1",
+ "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.1.3",
+ "play" %% "play" % "2.1.0" % "provided"
)
// Test dependencies
libraryDependencies ++= Seq(
- "org.specs2" %% "specs2" % "1.8.2" % "test",
- "play" %% "play-test" % "2.0" % "test"
+ "org.specs2" %% "specs2" % "1.13" % "test",
+ "play" %% "play-test" % "2.1.0" % "test"
)
// Configuration required for deploying to sonatype
@@ -40,7 +40,7 @@ pomIncludeRepository := { _ => false }
publishArtifact in Test := false
pomExtra := (
- <url>http://github.com/vznet/play-mongo-jackson-mapper</url>
+ <url>http://github.com/jroper/play-mongojack</url>
<inceptionYear>2012</inceptionYear>
<licenses>
<license>
@@ -51,8 +51,8 @@ pomExtra := (
</license>
</licenses>
<scm>
- <url>git@github.com:vznet/play-mongo-jackson-mapper.git</url>
- <connection>scm:git:git@github.com:vznet/play-mongo-jackson-mapper.git</connection>
+ <url>git@github.com:jroper/play-mongojack.git</url>
+ <connection>scm:git:git@github.com:jroper/play-mongojack.git</connection>
</scm>
<developers>
<developer>
@@ -62,6 +62,6 @@ pomExtra := (
<roles>
<role>Author</role>
</roles>
- <organization>VZ Netzwerke</organization>
+ <organization>Typesafe</organization>
</developer>
</developers>)
View
0  logs/application.log
No changes.
View
1  project/build.properties
@@ -0,0 +1 @@
+sbt.version=0.12.2
View
9 project/plugins.sbt
@@ -1,15 +1,10 @@
resolvers ++= Seq(
DefaultMavenRepository,
- Resolver.url("Play", url("http://download.playframework.org/ivy-releases/"))(Resolver.ivyStylePatterns),
"Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/",
- "Typesafe Other Repository" at "http://repo.typesafe.com/typesafe/repo/",
- "sbt-idea-repo" at "http://mpeltonen.github.com/maven/",
- Resolver.url("sbt-plugin-releases", url("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns),
- "gseitz@github" at "http://gseitz.github.com/maven/"
+ Resolver.url("sbt-plugin-releases", url("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)
)
-addSbtPlugin("com.github.gseitz" % "sbt-release" % "0.4")
addSbtPlugin("com.jsuereth" % "xsbt-gpg-plugin" % "0.6")
-addSbtPlugin("play" % "sbt-plugin" % "2.0")
+addSbtPlugin("play" % "sbt-plugin" % "2.1.0")
View
2  src/main/resources/play.plugins
@@ -1 +1 @@
-1000:play.modules.mongodb.jackson.MongoDBPlugin
+1000:play.modules.mongojack.MongoDBPlugin
View
2  ...ay/modules/mongodb/jackson/KeyTyped.scala → ...ala/play/modules/mongojack/KeyTyped.scala
@@ -1,4 +1,4 @@
-package play.modules.mongodb.jackson
+package play.modules.mongojack
/**
* An object that declares the type of its key. This interface serves to just define the type of the key, so that it
View
10 ...lay/modules/mongodb/jackson/MongoDB.scala → ...cala/play/modules/mongojack/MongoDB.scala
@@ -1,15 +1,15 @@
-package play.modules.mongodb.jackson
+package play.modules.mongojack
import play.Plugin
import java.util.concurrent.ConcurrentHashMap
-import org.codehaus.jackson.map.ObjectMapper
-import net.vz.mongodb.jackson.internal.MongoJacksonMapperModule
import play.api.Application
import com.fasterxml.jackson.module.scala.DefaultScalaModule
-import net.vz.mongodb.jackson.{MongoCollection, JacksonDBCollection}
import java.util.Locale
import java.lang.reflect.ParameterizedType
import com.mongodb.{WriteConcern, Mongo, MongoURI, ServerAddress}
+import org.mongojack.{MongoCollection, JacksonDBCollection}
+import com.fasterxml.jackson.databind.ObjectMapper
+import org.mongojack.internal.MongoJacksonMapperModule
/**
* MongoDB Jackson Mapper module for play framework
@@ -173,7 +173,7 @@ class MongoDBPlugin(val app: Application) extends Plugin {
}
// Configure the default object mapper
- val defaultMapper = MongoJacksonMapperModule.configure(new ObjectMapper).withModule(new DefaultScalaModule)
+ val defaultMapper = MongoJacksonMapperModule.configure(new ObjectMapper).registerModule(new DefaultScalaModule)
val globalMapper = configurer map {
_.configure(defaultMapper)
View
4 ...godb/jackson/ObjectMapperConfigurer.scala → ...es/mongojack/ObjectMapperConfigurer.scala
@@ -1,6 +1,6 @@
-package play.modules.mongodb.jackson
+package play.modules.mongojack
-import org.codehaus.jackson.map.ObjectMapper
+import com.fasterxml.jackson.databind.ObjectMapper
/**
* Configures an ObjectMapper. Implementations must have a no argument constructor.
View
8 .../modules/mongodb/jackson/MongoDBTest.java → ...a/play/modules/mongojack/MongoDBTest.java
@@ -1,9 +1,9 @@
-package paly.modules.mongodb.jackson;
+package play.modules.mongojack;
-import net.vz.mongodb.jackson.JacksonDBCollection;
import org.junit.Test;
-import play.modules.mongodb.jackson.KeyTyped;
-import play.modules.mongodb.jackson.MongoDB;
+import org.mongojack.JacksonDBCollection;
+import play.modules.mongojack.KeyTyped;
+import play.modules.mongojack.MongoDB;
import play.test.FakeApplication;
import javax.persistence.Id;
View
14 ...modules/mongodb/jackson/MongoDBSpec.scala → .../play/modules/mongojack/MongoDBSpec.scala
@@ -1,14 +1,14 @@
-package play.modules.mongodb.jackson
+package play.modules.mongojack
import org.specs2.mutable._
import play.api.test._
import play.api.test.Helpers._
import util.Random
-import reflect.BeanProperty
-import org.codehaus.jackson.annotate.JsonProperty
-import org.codehaus.jackson.map.{DeserializationConfig, ObjectMapper}
-import net.vz.mongodb.jackson.{JacksonDBCollection, MongoCollection, Id}
+import scala.beans.BeanProperty
import com.mongodb.{WriteConcern, BasicDBObject, Mongo}
+import org.mongojack.{MongoCollection, Id}
+import com.fasterxml.jackson.annotation.JsonProperty
+import com.fasterxml.jackson.databind.{DeserializationFeature, ObjectMapper}
case class MongoDBSpec() extends Specification {
@@ -183,7 +183,7 @@ class MockObject(@Id val id: String,
class MockGlobalConfigurer extends ObjectMapperConfigurer {
def configure(defaultMapper: ObjectMapper) =
- defaultMapper.configure(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true)
+ defaultMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true)
def configure(globalMapper: ObjectMapper, collectionName: String, objectType: Class[_], keyType: Class[_]) = globalMapper
}
@@ -192,7 +192,7 @@ class MockPerCollectionConfigurer extends ObjectMapperConfigurer {
def configure(defaultMapper: ObjectMapper) = defaultMapper
def configure(globalMapper: ObjectMapper, collectionName: String, objectType: Class[_], keyType: Class[_]) =
- globalMapper.configure(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true)
+ globalMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true)
}
@MongoCollection(name = "blah")
View
2  version.sbt
@@ -1 +1 @@
-version in ThisBuild := "1.0.1-SNAPSHOT"
+version in ThisBuild := "2.0.0-SNAPSHOT"
Please sign in to comment.
Something went wrong with that request. Please try again.