我遇到Play Framework和sbt-plugins-mailer的问题。
$ activator --version
sbt launcher version 0.13.8-M5
playVersion: 2.3.8
sbtVersion: 0.13.5
scalaVersion: 2.11.1
我想创建在OpenShift云中运行的Play Framework应用程序。 我下载的代码来自: https://github.com/JamesSullivan/play2-openshift-quickstart并使用此模板在Openshift上创建了我自己的应用程序。
这是来自模板的build.sbt文件:
import sbt.Keys._
name := """play2demo"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.11.1"
resolvers += "Typesafe Repo" at "http://repo.typesafe.com/typesafe/releases/"
libraryDependencies ++= Seq(
javaJdbc,
javaEbean,
cache,
"com.typesafe" %% "play-plugins-mailer" % "2.2.0",
javaWs
)
val appDependencies = Seq(
"mysql" % "mysql-connector-java" % "5.1.18"
)
我想发送电子邮件,所以我添加了这一行:
"com.typesafe" %% "play-plugins-mailer" % "2.3.1",
由于此更改激活器返回未解决的依赖关系, 当我尝试在localhost上编译这个项目时:
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.typesafe#play-plugins-mailer_2.11;2.2.0: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
我的plugins.sbt文件包含:
resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/"
// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.8")
// web plugins
addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-mocha" % "1.0.0")
我创建了play.plugins文件:
1500:com.typesafe.plugin.CommonsMailerPlugin
但我仍然有编译错误。
答案 0 :(得分:7)
"com.typesafe.play" %% "play-mailer" % "2.4.0"
尝试将其作为sbt文件中的依赖项。