Play フレームワーク 2.0.4 の上にビルドされたアプリケーションがあります。最新バージョン (現在は 2.2.0) に移行したいと考えています。
したがって、ローカルの Play フレームワークのインストールを更新し、それに応じてすべてのビルド ファイルを更新しました。
build.properties :
sbt.version=0.13.0
Build.scala :
import sbt._
import Keys._
import play.Project._
object ApplicationBuild extends Build {
val appName = "demagog"
val appVersion = "1.0.0"
val appDependencies = Seq(
javaCore,
"com.google.code.morphia" % "morphia" % "0.99",
"com.google.code.morphia" % "morphia-logging-slf4j" % "0.99",
"net.tanesha.recaptcha4j" % "recaptcha4j" % "0.0.7"
)
val main = play.Project(appName, appVersion, appDependencies).settings(
// Add your own project settings here
resolvers += "Morphia repository" at "http://morphia.googlecode.com/svn/mavenrepo/"
)
}
plugins.sbt :
// Comment to get more information during initialization
logLevel := Level.Warn
// The Typesafe repository
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.0")
それから私は自分のプロジェクトを「覆い隠す」ことを試みました。したがって、次の 2 つのコマンドを正確に実行します。
play clean-all
play eclipse
次のような多くのエラーが発生します。
[error] ..\Api.java:11: error: package org.codehaus.jackson does not exist
import org.codehaus.jackson.JsonNode;
これは、移行ガイドで見つけた事実により予想されます。
Jackson をバージョン 2 にアップグレードしました。これは、パッケージ名が org.codehaus.jackson ではなく com.fasterxml.jackson.core になったことを意味します。
しかし、「play eclipse」コマンドの最後に、次のエラーが表示されます。
[error] (compile:compile) javac returned nonzero exit code
[error] Could not create Eclipse project files:
[error] Error evaluating task 'dependencyClasspath': error
そのため、プロジェクトは「Eclipse化」されておらず、Eclipse IDEで使用したり編集したりすることはできません。この Eclipse IDE の外部のバックグラウンドでのコンパイルは本当に苦痛であり、Play フレームワークを使用して生産的に行うことができません :-/