8

我正在尝试在我的游戏中使用Mailer 插件!2 Java 应用程序。
我按照自述文件中的说明进行操作,但该模块未显示在我的应用程序的依赖项中。所以当我尝试编译它时播放!给我一个错误:

object plugin is not a member of package com.typesafe

我尝试重新加载项目并仔细检查/project. 到目前为止没有任何效果。

有没有办法强制播放!检查应用程序的依赖项?

更新:

好的,新的错误消息。我删除了/project/project//project/target//target/。下次我开始玩!获得所有模块花了相当长的时间。它没有下载 Mailer-Plugin。
但现在我得到:

play.api.PlayException: Cannot load plugin [Plugin [com.typesafe.plugin.CommonsMailerPlugin] cannot been instantiated.]

其次是:

Caused by: java.lang.ClassNotFoundException: com.typesafe.plugin.CommonsMailerPlugin

有任何想法吗?

更新 2:
好的,我通过直接从 typesafe 下载 play-plugins- mailer_2.9.1-2.0.4.jar并将其放入/lib. 这绝对不是正确的方法,但至少现在可行。
我的游戏需要的 .jar!2.0.3 项目:http ://repo.typesafe.com/typesafe/releases/com/typesafe/play-plugins-mailer_2.9.1/2.0.4/

更新 3:
相关文件的内容:
Build.scala:

import sbt._
import Keys._
import PlayProject._

object ApplicationBuild extends Build {

    val appName         = "thesis"
    val appVersion      = "0.9"

    val appDependencies = Seq(
        "com.typesafe" %% "play-plugins-mailer" % "2.0.4"
    )

    val main = PlayProject(appName, appVersion, mainLang = JAVA).settings(
        lessEntryPoints <<= baseDirectory(_ / "app" / "assets" / "stylesheets" ** "bootstrap.less"),
        templatesImport += "helper._",
        templatesImport += "views.html.Helpers._"
    )

}

build.properties:

sbt.version=0.11.3

插件.sbt:

// Comment to get more information during initialization
logLevel := Level.Info

// The Typesafe repository
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

// Use the Play sbt plugin for Play projects
addSbtPlugin("play" % "sbt-plugin" % "2.0.3")

conf/play.plugins:

1500:com.typesafe.plugin.CommonsMailerPlugin
4

1 回答 1

0

好吧,为了玩!为了管理我的依赖项,我必须在旧文件(不包括已编译的代码)上创建一个新的项目副本,Build.scala在 play 中编辑并重新加载/编译项目!安慰。
现在它起作用了!Mailer Plugin 被下载、编译并play dependencies列出。

于 2012-08-24T11:54:57.690 回答