2015-04-03 88 views
0

我遇到Play Framework和sbt-plugins-mailer的問題。Play框架:play-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", 

由於這一變化激活返回未解決的依賴性, 當我嘗試在本地主機上編譯此項目:

[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 

但我仍然有編譯錯誤。

回答

7

"com.typesafe.play" %% "play-mailer" % "2.4.0"試試這個作爲依賴在你的sbt文件中。

+1

感謝好奇,只是好奇你怎麼知道這一點。我在這裏搜索它https://dl.bintray.com/typesafe/maven-releases/com/typesafe/play/並沒有找到它。 – 2015-06-13 12:06:33

相關問題