I am trying to use the Mailer plugin in my game! 2 Java applications.
I followed the instructions in the Readme file, but the module does not appear in my applications. So when I try to compile it, play it! gives me an error:
object plugin is not a member of package com.typesafe
I tried reloading the project and double checking the files in /project . So far nothing has worked.
Is there any way to make it play! to check application dependencies?
Update:
Ok, new error message. I deleted /project/project/ , /project/target/ and /target/ . Next time I started to play! It took quite a while to get all the modules. He did not download the Mailer plugin.
But now I get:
play.api.PlayException: Cannot load plugin [Plugin [com.typesafe.plugin.CommonsMailerPlugin] cannot been instantiated.]
and then:
Caused by: java.lang.ClassNotFoundException: com.typesafe.plugin.CommonsMailerPlugin
Any ideas?
Update 2:
Ok, I fixed this by downloading play-plugins-mailer_2.9.1-2.0.4.jar directly from typesafe and placing it in /lib . This is definitely not the right way, but at least now it works. I needed my game! 2.0.3: http://repo.typesafe.com/typesafe/releases/com/typesafe/play-plugins-mailer_2.9.1/2.0.4/
Update 3:
Contents of relevant files:
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
plugins.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
Hagen
source share