
upgrade play2.1-RC2
@bc9e0d94030de5d2e54f26900abe0ad399bb4523
--- .gitignore
+++ .gitignore
... | ... | @@ -18,3 +18,5 @@ |
18 | 18 |
*.iml |
19 | 19 |
uploads |
20 | 20 |
RUNNING_PID |
21 |
+*.db |
|
22 |
+ |
--- app/controllers/Application.java
+++ app/controllers/Application.java
... | ... | @@ -20,7 +20,7 @@ |
20 | 20 |
|
21 | 21 |
public class Application extends Controller { |
22 | 22 |
|
23 |
- @Cached(key = "index") |
|
23 |
+// @Cached(key = "index") |
|
24 | 24 |
public static Result index() { |
25 | 25 |
UserApp.isRememberMe(); |
26 | 26 |
|
--- app/controllers/IssueLabelApp.java
+++ app/controllers/IssueLabelApp.java
... | ... | @@ -19,6 +19,8 @@ |
19 | 19 |
import java.util.ArrayList; |
20 | 20 |
import java.util.HashMap; |
21 | 21 |
|
22 |
+import static play.data.Form.form; |
|
23 |
+ |
|
22 | 24 |
public class IssueLabelApp extends Controller { |
23 | 25 |
|
24 | 26 |
public static Result labels(String userName, String projectName) { |
--- app/controllers/MilestoneApp.java
+++ app/controllers/MilestoneApp.java
... | ... | @@ -8,6 +8,8 @@ |
8 | 8 |
|
9 | 9 |
import java.util.*; |
10 | 10 |
|
11 |
+import static play.data.Form.form; |
|
12 |
+ |
|
11 | 13 |
public class MilestoneApp extends Controller { |
12 | 14 |
|
13 | 15 |
public static class MilestoneCondition { |
--- app/controllers/ProjectApp.java
+++ app/controllers/ProjectApp.java
... | ... | @@ -27,6 +27,8 @@ |
27 | 27 |
import com.avaje.ebean.ExpressionList; |
28 | 28 |
import com.avaje.ebean.Page; |
29 | 29 |
|
30 |
+import static play.data.Form.form; |
|
31 |
+ |
|
30 | 32 |
/** |
31 | 33 |
* @author "Hwi Ahn" |
32 | 34 |
*/ |
--- app/controllers/SearchApp.java
+++ app/controllers/SearchApp.java
... | ... | @@ -5,6 +5,8 @@ |
5 | 5 |
import play.mvc.*; |
6 | 6 |
import views.html.search.*; |
7 | 7 |
|
8 |
+import static play.data.Form.form; |
|
9 |
+ |
|
8 | 10 |
public class SearchApp extends Controller { |
9 | 11 |
|
10 | 12 |
public static class ContentSearchCondition { |
--- app/controllers/SiteApp.java
+++ app/controllers/SiteApp.java
... | ... | @@ -20,6 +20,7 @@ |
20 | 20 |
import views.html.site.projectList; |
21 | 21 |
|
22 | 22 |
import com.avaje.ebean.Page; |
23 |
+import static play.data.Form.form; |
|
23 | 24 |
|
24 | 25 |
public class SiteApp extends Controller { |
25 | 26 |
|
--- app/controllers/UserApp.java
+++ app/controllers/UserApp.java
... | ... | @@ -33,6 +33,8 @@ |
33 | 33 |
import org.codehaus.jackson.node.ObjectNode; |
34 | 34 |
import play.libs.Json; |
35 | 35 |
|
36 |
+import static play.data.Form.form; |
|
37 |
+ |
|
36 | 38 |
public class UserApp extends Controller { |
37 | 39 |
|
38 | 40 |
public static final String SESSION_USERID = "userId"; |
... | ... | @@ -44,7 +46,7 @@ |
44 | 46 |
|
45 | 47 |
public static User anonymous = new User(); |
46 | 48 |
|
47 |
- @Cached(key = "loginForm") |
|
49 |
+// @Cached(key = "loginForm") |
|
48 | 50 |
public static Result loginForm() { |
49 | 51 |
return ok(login.render("title.login", form(User.class))); |
50 | 52 |
} |
... | ... | @@ -57,8 +59,12 @@ |
57 | 59 |
return redirect(routes.Application.index()); |
58 | 60 |
} |
59 | 61 |
|
60 |
- @Cached(key = "login") |
|
62 |
+// @Cached(key = "login") |
|
61 | 63 |
public static Result login() { |
64 |
+ Form<User> userForm = form(User.class).bindFromRequest(); |
|
65 |
+ if(userForm.hasErrors()) { |
|
66 |
+ return badRequest(login.render("title.login", userForm)); |
|
67 |
+ } |
|
62 | 68 |
User sourceUser = form(User.class).bindFromRequest().get(); |
63 | 69 |
|
64 | 70 |
Factory<SecurityManager> factory = new IniSecurityManagerFactory("classpath:shiro.ini"); |
--- app/models/User.java
+++ app/models/User.java
... | ... | @@ -29,7 +29,6 @@ |
29 | 29 |
import com.avaje.ebean.Page; |
30 | 30 |
|
31 | 31 |
import controllers.UserApp; |
32 |
-import sun.security.x509.UniqueIdentity; |
|
33 | 32 |
|
34 | 33 |
@Table(name = "n4user") |
35 | 34 |
@Entity |
... | ... | @@ -50,7 +49,7 @@ |
50 | 49 |
public String password; |
51 | 50 |
public String passwordSalt; |
52 | 51 |
|
53 |
- @Email(message = "user.wrongEmail.alert") @Required |
|
52 |
+ @Email(message = "user.wrongEmail.alert") |
|
54 | 53 |
public String email; |
55 | 54 |
|
56 | 55 |
public String avatarUrl; |
--- app/models/task/Card.java
+++ app/models/task/Card.java
... | ... | @@ -46,7 +46,7 @@ |
46 | 46 |
public String body; |
47 | 47 |
public Date dueDate; |
48 | 48 |
|
49 |
- private static Finder<Long, Card> find = new Finder<Long, Card>(Long.class, |
|
49 |
+ public static Finder<Long, Card> find = new Finder<Long, Card>(Long.class, |
|
50 | 50 |
Card.class); |
51 | 51 |
|
52 | 52 |
public static Card findById(Long id) { |
--- app/utils/Mailer.java
+++ app/utils/Mailer.java
... | ... | @@ -1,6 +1,7 @@ |
1 | 1 |
package utils; |
2 | 2 |
|
3 | 3 |
import java.util.ArrayList; |
4 |
+import java.util.Arrays; |
|
4 | 5 |
import java.util.Collections; |
5 | 6 |
import java.util.HashMap; |
6 | 7 |
import java.util.Iterator; |
... | ... | @@ -17,7 +18,7 @@ |
17 | 18 |
import org.apache.commons.mail.MultiPartEmail; |
18 | 19 |
|
19 | 20 |
import play.Application; |
20 |
-import scala.actors.threadpool.Arrays; |
|
21 |
+//import scala.actors.threadpool.Arrays; |
|
21 | 22 |
|
22 | 23 |
public class Mailer { |
23 | 24 |
private final String smtpHost; |
--- app/views/board/postList.scala.html
+++ app/views/board/postList.scala.html
... | ... | @@ -1,4 +1,4 @@ |
1 |
-@(title:String, project:Project, page:Page[Post], param:BoardApp.SearchCondition) |
|
1 |
+@(title:String, project:Project, page:com.avaje.ebean.Page[Post], param:BoardApp.SearchCondition) |
|
2 | 2 |
|
3 | 3 |
@import utils.TemplateHelper._ |
4 | 4 |
|
--- app/views/issue/issueList.scala.html
+++ app/views/issue/issueList.scala.html
... | ... | @@ -1,4 +1,4 @@ |
1 |
-@(title: String, currentPage: Page[Issue], param:support.SearchCondition, project:Project) |
|
1 |
+@(title: String, currentPage: com.avaje.ebean.Page[Issue], param:support.SearchCondition, project:Project) |
|
2 | 2 |
|
3 | 3 |
@import helper._ |
4 | 4 |
@implicitFieldConstructor = @{ FieldConstructor(twitterBootstrapInput.render) } |
--- app/views/pagination.scala.html
+++ app/views/pagination.scala.html
... | ... | @@ -1,4 +1,4 @@ |
1 |
-@(page:Page[_ <: play.db.ebean.Model], pageNum:Int, divId:String) |
|
1 |
+@(page:com.avaje.ebean.Page[_ <: play.db.ebean.Model], pageNum:Int, divId:String) |
|
2 | 2 |
|
3 | 3 |
@{ |
4 | 4 |
var currentPageNum = page.getPageIndex + 1 |
--- app/views/project/projectList.scala.html
+++ app/views/project/projectList.scala.html
... | ... | @@ -1,4 +1,4 @@ |
1 |
-@(message: String, currentPage: Page[Project], filter:String, state:String) |
|
1 |
+@(message: String, currentPage: com.avaje.ebean.Page[Project], filter:String, state:String) |
|
2 | 2 |
|
3 | 3 |
@home(message, utils.MenuType.PROJECTS) { |
4 | 4 |
<div class="page"> |
--- app/views/search/contentsSearch.scala.html
+++ app/views/search/contentsSearch.scala.html
... | ... | @@ -1,4 +1,4 @@ |
1 |
-@(title: String, project: Project, filter: String, resultIssues: Page[Issue], resultPosts: Page[Post]) |
|
1 |
+@(title: String, project: Project, filter: String, resultIssues: com.avaje.ebean.Page[Issue], resultPosts: com.avaje.ebean.Page[Post]) |
|
2 | 2 |
@import utils.TemplateHelper._ |
3 | 3 |
|
4 | 4 |
@main(title, project, utils.MenuType.NONE) { |
--- app/views/search/issueContentsSearch.scala.html
+++ app/views/search/issueContentsSearch.scala.html
... | ... | @@ -1,4 +1,4 @@ |
1 |
-@(project: Project, resultIssues: Page[Issue]) |
|
1 |
+@(project: Project, resultIssues: com.avaje.ebean.Page[Issue]) |
|
2 | 2 |
@import utils.TemplateHelper._ |
3 | 3 |
|
4 | 4 |
@for(issue <- resultIssues.getList()){ |
--- app/views/search/postContentsSearch.scala.html
+++ app/views/search/postContentsSearch.scala.html
... | ... | @@ -1,4 +1,4 @@ |
1 |
-@(project: Project, resultPosts: Page[Post]) |
|
1 |
+@(project: Project, resultPosts: com.avaje.ebean.Page[Post]) |
|
2 | 2 |
@import utils.TemplateHelper._ |
3 | 3 |
|
4 | 4 |
@for(post <- resultPosts.getList()){ |
--- app/views/site/paginationForUserList.scala.html
+++ app/views/site/paginationForUserList.scala.html
... | ... | @@ -1,4 +1,4 @@ |
1 |
-@(page:Page[_ <: play.db.ebean.Model], pageNum:Int, divId:String) |
|
1 |
+@(page:com.avaje.ebean.Page[_ <: play.db.ebean.Model], pageNum:Int, divId:String) |
|
2 | 2 |
|
3 | 3 |
@{ |
4 | 4 |
var currentPageNum = page.getPageIndex + 1 |
--- app/views/site/projectList.scala.html
+++ app/views/site/projectList.scala.html
... | ... | @@ -1,4 +1,4 @@ |
1 |
-@(message: String, currentPage: Page[Project], filter:String) |
|
1 |
+@(message: String, currentPage: com.avaje.ebean.Page[Project], filter:String) |
|
2 | 2 |
|
3 | 3 |
@siteMngMain(message) { |
4 | 4 |
<div class="row-fluid"> |
--- app/views/site/userList.scala.html
+++ app/views/site/userList.scala.html
... | ... | @@ -1,4 +1,4 @@ |
1 |
-@(message: String, currentPage: Page[User]) |
|
1 |
+@(message: String, currentPage: com.avaje.ebean.Page[User]) |
|
2 | 2 |
|
3 | 3 |
@siteMngMain(message) { |
4 | 4 |
<div class="row-fluid"> |
--- conf/application.conf
+++ conf/application.conf
... | ... | @@ -15,7 +15,7 @@ |
15 | 15 |
# ~~~~~ |
16 | 16 |
# Define the Global object class for this application. |
17 | 17 |
# Default to Global in the root package. |
18 |
-# global=Global |
|
18 |
+ application.global=Global |
|
19 | 19 |
|
20 | 20 |
# Database configuration |
21 | 21 |
# ~~~~~ |
... | ... | @@ -24,10 +24,10 @@ |
24 | 24 |
# |
25 | 25 |
# H2 Configuration |
26 | 26 |
db.default.driver=org.h2.Driver |
27 |
- db.default.url="jdbc:h2:mem:nforge;MODE=PostgreSQL;DB_CLOSE_DELAY=-1" |
|
28 |
-# db.default.url="jdbc:h2:file:nforge;MODE=PostgreSQL" |
|
29 |
- db.default.user=sa |
|
30 |
- db.default.password=sa |
|
27 |
+# db.default.url="jdbc:h2:mem:nforge;MODE=PostgreSQL;DB_CLOSE_DELAY=-1" |
|
28 |
+ db.default.url="jdbc:h2:file:nforge;MODE=PostgreSQL" |
|
29 |
+# db.default.user=sa |
|
30 |
+# db.default.password=sa |
|
31 | 31 |
|
32 | 32 |
# MySQL Configuration |
33 | 33 |
# db.default.driver=com.mysql.jdbc.Driver |
... | ... | @@ -49,18 +49,18 @@ |
49 | 49 |
# You can expose this datasource via JNDI if needed (Useful for JPA) |
50 | 50 |
# db.default.jndiName=DefaultDS |
51 | 51 |
|
52 |
-# Evolutions |
|
53 |
-# ~~~~~ |
|
54 |
-# You can disable evolutions if needed |
|
55 |
-# evolutionplugin=disabled |
|
56 |
- applyEvolutions.default=true |
|
57 |
- |
|
58 | 52 |
# Ebean configuration |
59 | 53 |
# ~~~~~ |
60 | 54 |
# You can declare as many Ebean servers as you want. |
61 | 55 |
# By convention, the default server is named `default` |
62 | 56 |
# |
63 |
-ebean.default="models.*" |
|
57 |
+ ebean.default="models.*" |
|
58 |
+ |
|
59 |
+# Evolutions |
|
60 |
+# ~~~~~ |
|
61 |
+# You can disable evolutions if needed |
|
62 |
+# evolutionplugin=disabled |
|
63 |
+# applyEvolutions.default=true |
|
64 | 64 |
|
65 | 65 |
# Logger |
66 | 66 |
# ~~~~~ |
--- project/Build.scala
+++ project/Build.scala
... | ... | @@ -1,14 +1,17 @@ |
1 | 1 |
import sbt._ |
2 | 2 |
import Keys._ |
3 |
-import PlayProject._ |
|
4 |
-import com.github.play2war.plugin._ |
|
3 |
+import play.Project._ |
|
5 | 4 |
|
6 | 5 |
object ApplicationBuild extends Build { |
7 | 6 |
|
8 |
- val appName = "nforge4" |
|
9 |
- val appVersion = "1.0-SNAPSHOT" |
|
7 |
+ val appName = "nforge4" |
|
8 |
+ val appVersion = "1.0-SNAPSHOT" |
|
10 | 9 |
|
11 |
- val appDependencies = Seq( |
|
10 |
+ val appDependencies = Seq( |
|
11 |
+ // Add your project dependencies here, |
|
12 |
+ javaCore, |
|
13 |
+ javaJdbc, |
|
14 |
+ javaEbean, |
|
12 | 15 |
// Add your project dependencies here, |
13 | 16 |
"mysql" % "mysql-connector-java" % "5.1.18", |
14 | 17 |
"postgresql" % "postgresql" % "9.1-901.jdbc4", |
... | ... | @@ -21,10 +24,10 @@ |
21 | 24 |
// svnkit-dav |
22 | 25 |
"sonia.svnkit" % "svnkit-dav" % "1.7.5-1", |
23 | 26 |
// javahl |
24 |
- "org.tmatesoft.svnkit" % "svnkit-javahl" % "1.3.5", |
|
25 |
- "net.sourceforge.jexcelapi" % "jxl" % "2.6.10", |
|
26 |
- // shiro |
|
27 |
- "org.apache.shiro" % "shiro-core" % "1.2.1", |
|
27 |
+ "org.tmatesoft.svnkit" % "svnkit-javahl" % "1.3.5", |
|
28 |
+ "net.sourceforge.jexcelapi" % "jxl" % "2.6.10", |
|
29 |
+ // shiro |
|
30 |
+ "org.apache.shiro" % "shiro-core" % "1.2.1", |
|
28 | 31 |
// commons-codec |
29 | 32 |
"commons-codec" % "commons-codec" % "1.2", |
30 | 33 |
// apache-mails |
... | ... | @@ -32,25 +35,25 @@ |
32 | 35 |
"commons-lang" % "commons-lang" % "2.6", |
33 | 36 |
"org.apache.tika" % "tika-core" % "1.2", |
34 | 37 |
"commons-io" % "commons-io" % "2.4", |
35 |
- "com.github.julienrf" %% "play-jsmessages" % "1.2.1" |
|
36 |
-// "org.jacoco" % "org.jacoco.core" % "0.6.1-SNAPSHOT", |
|
37 |
-// "org.jacoco" % "org.jacoco.report" % "0.6.1-SNAPSHOT" |
|
38 |
- |
|
39 |
- ) |
|
40 |
- val projectSettings = Play2WarPlugin.play2WarSettings ++ Seq( |
|
38 |
+ "com.github.julienrf" %% "play-jsmessages" % "1.4-SNAPSHOT" |
|
39 |
+ ) |
|
40 |
+ |
|
41 |
+ val projectSettings = Seq( |
|
41 | 42 |
// Add your own project settings here |
42 | 43 |
resolvers += "jgit-repository" at "http://download.eclipse.org/jgit/maven", |
43 | 44 |
resolvers += "svnkit-repository" at "http://maven.tmatesoft.com/content/repositories/releases/", |
44 | 45 |
resolvers += "scm-manager release repository" at "http://maven.scm-manager.org/nexus/content/groups/public", |
45 |
- resolvers += "julienrf.github.com" at "http://julienrf.github.com/repo/", |
|
46 |
+ resolvers += "julienrf.github.com" at "http://julienrf.github.com/repo-snapshots/", |
|
46 | 47 |
templatesImport += "models.enumeration._", |
47 |
- lessEntryPoints <<= baseDirectory(_ / "app" / "assets" / "stylesheets" ** "nforge.less"), |
|
48 |
+ lessEntryPoints <<= baseDirectory(_ / "app" / "assets" / "stylesheets" ** "nforge.less") |
|
48 | 49 |
// jacoco.settings:_*, |
49 |
- Play2WarKeys.servletVersion := "3.0" |
|
50 |
+// Play2WarKeys.servletVersion := "3.0" |
|
50 | 51 |
// Or Play2WarKeys.servletVersion := "2.5" |
51 | 52 |
) |
52 | 53 |
|
53 |
- val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings(projectSettings: _* |
|
54 |
-// parallelExecution in jacoco.Config := false |
|
55 |
- ) |
|
54 |
+ val main = play.Project(appName, appVersion, appDependencies).settings( |
|
55 |
+ projectSettings: _* |
|
56 |
+ // Add your own project settings here |
|
57 |
+ ) |
|
58 |
+ |
|
56 | 59 |
} |
--- project/build.properties
+++ project/build.properties
... | ... | @@ -1,1 +1,1 @@ |
1 |
-sbt.version=0.11.3 |
|
1 |
+sbt.version=0.12.2-RC2(No newline at end of file) |
--- project/plugins.sbt
+++ project/plugins.sbt
... | ... | @@ -2,13 +2,7 @@ |
2 | 2 |
logLevel := Level.Warn |
3 | 3 |
|
4 | 4 |
// The Typesafe repository |
5 |
-resolvers ++= Seq( |
|
6 |
- "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/", |
|
7 |
- "Play2war plugins release" at "http://repository-play-war.forge.cloudbees.com/release/" |
|
8 |
-) |
|
5 |
+resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/" |
|
9 | 6 |
|
10 | 7 |
// Use the Play sbt plugin for Play projects |
11 |
-addSbtPlugin("play" % "sbt-plugin" % "2.0.4") |
|
12 |
- |
|
13 |
-addSbtPlugin("com.github.play2war" % "play2-war-plugin" % "0.7.4") |
|
14 |
- |
|
8 |
+addSbtPlugin("play" % "sbt-plugin" % "2.1-RC2")(No newline at end of file) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?