Skip to content
Browse files

Change dependency to com.github.jmkgreen.morphia

  • Loading branch information...
1 parent d22ff89 commit 8a9d2649db553794c26a621b18751f99e821eec2 @fredericpatin fredericpatin committed Dec 16, 2012
View
22 project/Build.scala
@@ -12,11 +12,11 @@ object Play2MorphiaPluginBuild extends Build {
file("."),
settings = buildSettings ++ Seq(
libraryDependencies := runtime ++ test,
- publishMavenStyle := true,
+ publishMavenStyle := false,
publishTo := Some(githubRepository),
scalacOptions ++= Seq("-Xlint","-deprecation", "-unchecked","-encoding", "utf8"),
- javacOptions ++= Seq("-encoding", "utf8", "-g"),
- resolvers ++= Seq(DefaultMavenRepository, Resolvers.typesafeRepository, Resolvers.morphiaRepository),
+ javacOptions ++= Seq("-encoding", "utf8", "-g", "-source", "1.6", "-target", "1.6"),
+ resolvers ++= Seq(DefaultMavenRepository, Resolvers.typesafeRepository),//, Resolvers.morphiaRepository),
checksums := Nil // To prevent proxyToys downloding fails https://github.com/leodagdag/play2-morphia-plugin/issues/11
)
).settings()
@@ -25,16 +25,18 @@ object Play2MorphiaPluginBuild extends Build {
val githubRepository = Resolver.file("GitHub Repository", Path.userHome / "dev" / "leodagdag.github.com" / "repository" asFile)(Resolver.ivyStylePatterns)
val dropboxRepository = Resolver.file("Dropbox Repository", Path.userHome / "Dropbox" / "Public" / "repository" asFile)(Resolver.ivyStylePatterns)
val typesafeRepository = "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
- val morphiaRepository = "Morphia Repository" at "http://morphia.googlecode.com/svn/mavenrepo/"
+ //val morphiaRepository = "Morphia Repository" at "http://morphia.googlecode.com/svn/mavenrepo/"
}
object Dependencies {
val runtime = Seq(
- "com.google.code.morphia" % "morphia" % "1.00-SNAPSHOT",
- "com.google.code.morphia" % "morphia-logging-slf4j" % "0.99",
- "com.google.code.morphia" % "morphia-validation" % "0.99",
- "cglib" % "cglib" % "[2.1_3,)",
- "com.thoughtworks.proxytoys" % "proxytoys" % "1.0",
+ "com.github.jmkgreen.morphia" % "morphia" % "1.2.2",
+ ("com.github.jmkgreen.morphia" % "morphia-logging-slf4j" % "1.2.2" % "compile" notTransitive())
+ .exclude("org.slf4j","slf4j-simple")
+ .exclude("org.slf4j","slf4j-jdk14"),
+ ("com.github.jmkgreen.morphia" % "morphia-validation" % "1.2.2" % "compile" notTransitive())
+ .exclude("org.slf4j","slf4j-simple")
+ .exclude("org.slf4j","slf4j-jdk14"),
"play" %% "play" % "2.0.4" % "compile" notTransitive(),
("org.springframework" % "spring-core" % "3.0.7.RELEASE" % "compile" notTransitive())
.exclude("org.springframework", "spring-asm")
@@ -49,7 +51,7 @@ object Play2MorphiaPluginBuild extends Build {
object BuildSettings {
val buildOrganization = "leodagdag"
- val buildVersion = "0.0.12"
+ val buildVersion = "0.0.13"
val buildScalaVersion = "2.9.1"
val buildSbtVersion = "0.11.3"
val buildSettings = Defaults.defaultSettings ++ Seq (
View
2 src/main/java/leodagdag/play2morphia/Blob.java
@@ -1,6 +1,6 @@
package leodagdag.play2morphia;
-import com.google.code.morphia.annotations.Transient;
+import com.github.jmkgreen.morphia.annotations.Transient;
import com.mongodb.BasicDBObject;
import com.mongodb.DBObject;
import com.mongodb.gridfs.GridFSDBFile;
View
8 src/main/java/leodagdag/play2morphia/Model.java
@@ -1,9 +1,9 @@
package leodagdag.play2morphia;
-import com.google.code.morphia.annotations.Id;
-import com.google.code.morphia.annotations.Transient;
-import com.google.code.morphia.mapping.Mapper;
-import com.google.code.morphia.query.QueryImpl;
+import com.github.jmkgreen.morphia.annotations.Id;
+import com.github.jmkgreen.morphia.annotations.Transient;
+import com.github.jmkgreen.morphia.mapping.Mapper;
+import com.github.jmkgreen.morphia.query.QueryImpl;
import com.mongodb.gridfs.GridFSDBFile;
import org.springframework.beans.BeanWrapperImpl;
import play.Logger;
View
23 src/main/java/leodagdag/play2morphia/MorphiaPlugin.java
@@ -1,12 +1,14 @@
package leodagdag.play2morphia;
-import com.google.code.morphia.AbstractEntityInterceptor;
-import com.google.code.morphia.Datastore;
-import com.google.code.morphia.Morphia;
-import com.google.code.morphia.logging.MorphiaLoggerFactory;
-import com.google.code.morphia.logging.slf4j.SLF4JLogrImplFactory;
-import com.google.code.morphia.mapping.Mapper;
-import com.google.code.morphia.validation.MorphiaValidation;
+import com.github.jmkgreen.morphia.AbstractEntityInterceptor;
+import com.github.jmkgreen.morphia.Datastore;
+import com.github.jmkgreen.morphia.Morphia;
+import com.github.jmkgreen.morphia.annotations.Embedded;
+import com.github.jmkgreen.morphia.annotations.Entity;
+import com.github.jmkgreen.morphia.logging.MorphiaLoggerFactory;
+import com.github.jmkgreen.morphia.logging.slf4j.SLF4JLogrImplFactory;
+import com.github.jmkgreen.morphia.mapping.Mapper;
+import com.github.jmkgreen.morphia.validation.ValidationExtension;
import com.mongodb.*;
import com.mongodb.gridfs.GridFS;
import leodagdag.play2morphia.utils.*;
@@ -79,8 +81,7 @@ public void onStart() {
morphia.getMapper().getOptions().objectFactory = new PlayCreator();
}
// Configure validator
- MorphiaValidation morphiaValidation = new MorphiaValidation();
- morphiaValidation.applyTo(morphia);
+ new ValidationExtension(morphia);
//Check if credentials parameters are present
String username = morphiaConf.getString(ConfigKey.DB_USERNAME.getKey());
@@ -151,8 +152,8 @@ public boolean enabled() {
private void mapClasses() throws ClassNotFoundException {
// Register all models.Class
Set<String> classes = new HashSet<String>();
- classes.addAll(application.getTypesAnnotatedWith("models", com.google.code.morphia.annotations.Entity.class));
- classes.addAll(application.getTypesAnnotatedWith("models", com.google.code.morphia.annotations.Embedded.class));
+ classes.addAll(application.getTypesAnnotatedWith("models", Entity.class));
+ classes.addAll(application.getTypesAnnotatedWith("models", Embedded.class));
for (String clazz : classes) {
MorphiaLogger.debug("mapping class: %1$s", clazz);
morphia.map(Class.forName(clazz, true, application.classloader()));
View
2 src/main/java/leodagdag/play2morphia/utils/PlayCreator.java
@@ -1,6 +1,6 @@
package leodagdag.play2morphia.utils;
-import com.google.code.morphia.mapping.DefaultCreator;
+import com.github.jmkgreen.morphia.mapping.DefaultCreator;
import com.mongodb.DBObject;
import play.Play;
View
2 src/main/java/leodagdag/play2morphia/utils/StringUtils.java
@@ -18,7 +18,7 @@ public static boolean isBlank(String str) {
return true;
}
for (int i = 0; i < strLen; i++) {
- if ((Character.isWhitespace(str.charAt(i)) == false)) {
+ if ((!Character.isWhitespace(str.charAt(i)))) {
return false;
}
}
View
2 src/test/java/leodagdag/play2morphia/test/ModelTest.java
@@ -1,6 +1,6 @@
package leodagdag.play2morphia.test;
-import com.google.code.morphia.query.Query;
+import com.github.jmkgreen.morphia.query.Query;
import leodagdag.play2morphia.MorphiaPlugin;
import leodagdag.play2morphia.test.models.*;
import leodagdag.play2morphia.test.utils.TestConfig;
View
6 src/test/java/leodagdag/play2morphia/test/models/Cra.java
@@ -1,8 +1,8 @@
package leodagdag.play2morphia.test.models;
-import com.google.code.morphia.annotations.Embedded;
-import com.google.code.morphia.annotations.Entity;
-import com.google.code.morphia.annotations.Reference;
+import com.github.jmkgreen.morphia.annotations.Embedded;
+import com.github.jmkgreen.morphia.annotations.Entity;
+import com.github.jmkgreen.morphia.annotations.Reference;
import com.google.common.collect.Lists;
import leodagdag.play2morphia.Model;
import org.bson.types.ObjectId;
View
8 src/test/java/leodagdag/play2morphia/test/models/Day.java
@@ -1,9 +1,9 @@
package leodagdag.play2morphia.test.models;
-import com.google.code.morphia.annotations.Embedded;
-import com.google.code.morphia.annotations.PostLoad;
-import com.google.code.morphia.annotations.PrePersist;
-import com.google.code.morphia.annotations.Transient;
+import com.github.jmkgreen.morphia.annotations.Embedded;
+import com.github.jmkgreen.morphia.annotations.PostLoad;
+import com.github.jmkgreen.morphia.annotations.PrePersist;
+import com.github.jmkgreen.morphia.annotations.Transient;
import org.joda.time.DateTime;
import java.util.Date;
View
4 src/test/java/leodagdag/play2morphia/test/models/Employee.java
@@ -1,7 +1,7 @@
package leodagdag.play2morphia.test.models;
-import com.google.code.morphia.annotations.Entity;
-import com.google.code.morphia.annotations.Reference;
+import com.github.jmkgreen.morphia.annotations.Entity;
+import com.github.jmkgreen.morphia.annotations.Reference;
import org.bson.types.ObjectId;
/**
View
4 src/test/java/leodagdag/play2morphia/test/models/HalfDay.java
@@ -1,7 +1,7 @@
package leodagdag.play2morphia.test.models;
-import com.google.code.morphia.annotations.Embedded;
-import com.google.code.morphia.annotations.Reference;
+import com.github.jmkgreen.morphia.annotations.Embedded;
+import com.github.jmkgreen.morphia.annotations.Reference;
import com.google.common.collect.Lists;
import java.util.List;
View
2 src/test/java/leodagdag/play2morphia/test/models/Manager.java
@@ -1,6 +1,6 @@
package leodagdag.play2morphia.test.models;
-import com.google.code.morphia.annotations.Entity;
+import com.github.jmkgreen.morphia.annotations.Entity;
import org.bson.types.ObjectId;
/**
View
4 src/test/java/leodagdag/play2morphia/test/models/Mission.java
@@ -1,7 +1,7 @@
package leodagdag.play2morphia.test.models;
-import com.google.code.morphia.annotations.Entity;
-import com.google.code.morphia.annotations.Id;
+import com.github.jmkgreen.morphia.annotations.Entity;
+import com.github.jmkgreen.morphia.annotations.Id;
import leodagdag.play2morphia.Model;
import org.bson.types.ObjectId;
View
2 src/test/java/leodagdag/play2morphia/test/models/Period.java
@@ -1,6 +1,6 @@
package leodagdag.play2morphia.test.models;
-import com.google.code.morphia.annotations.*;
+import com.github.jmkgreen.morphia.annotations.*;
import org.joda.time.DateTime;
import org.joda.time.LocalTime;
View
4 src/test/java/leodagdag/play2morphia/test/models/Post.java
@@ -1,7 +1,7 @@
package leodagdag.play2morphia.test.models;
-import com.google.code.morphia.annotations.Entity;
-import com.google.code.morphia.annotations.Id;
+import com.github.jmkgreen.morphia.annotations.Entity;
+import com.github.jmkgreen.morphia.annotations.Id;
import leodagdag.play2morphia.Model;
import org.bson.types.ObjectId;
View
4 src/test/java/leodagdag/play2morphia/test/models/Role.java
@@ -1,7 +1,7 @@
package leodagdag.play2morphia.test.models;
-import com.google.code.morphia.annotations.Entity;
-import com.google.code.morphia.annotations.Id;
+import com.github.jmkgreen.morphia.annotations.Entity;
+import com.github.jmkgreen.morphia.annotations.Id;
import leodagdag.play2morphia.Model;
import org.bson.types.ObjectId;
View
4 src/test/java/leodagdag/play2morphia/test/models/User.java
@@ -1,7 +1,7 @@
package leodagdag.play2morphia.test.models;
-import com.google.code.morphia.annotations.Entity;
-import com.google.code.morphia.annotations.Id;
+import com.github.jmkgreen.morphia.annotations.Entity;
+import com.github.jmkgreen.morphia.annotations.Id;
import leodagdag.play2morphia.Model;
import org.bson.types.ObjectId;

0 comments on commit 8a9d264

Please sign in to comment.
Something went wrong with that request. Please try again.