2015-04-03 57 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

相关问题