Play Framework: play-plugins-mailer 未解决的依赖
Play Framework: play-plugins-mailer Unresolved dependency
我对 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",
由于此更改激活器 returns 未解决的依赖项,
当我尝试在本地主机上编译这个项目时:
[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
但我仍然有编译错误。
"com.typesafe.play" %% "play-mailer" % "2.4.0"
在你的 sbt 文件中尝试将其作为依赖项。
我对 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",
由于此更改激活器 returns 未解决的依赖项, 当我尝试在本地主机上编译这个项目时:
[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
但我仍然有编译错误。
"com.typesafe.play" %% "play-mailer" % "2.4.0"
在你的 sbt 文件中尝试将其作为依赖项。