Skip to content

Commit

Permalink
Merge pull request #7 from linkedin/fix-logger
Browse files Browse the repository at this point in the history
Fix method not found error
  • Loading branch information
bbarkley committed May 11, 2016
2 parents bccd689 + cfa7536 commit 0968cff
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
20 changes: 0 additions & 20 deletions plugin/src/main/scala/NGPlugin.scala
Expand Up @@ -22,18 +22,6 @@ object NGPlugin extends Plugin {

def ngSettings: Seq[Setting[_]] = super.settings ++ Seq(
testOptions := Seq(),
testOptions += Tests.Setup { loader =>
val loggerClass = playLoggerClass(loader)
if (loggerClass != null) {
loggerClass.getMethod("init", classOf[java.io.File]).invoke(null, new java.io.File("."))
}
},
testOptions += Tests.Cleanup { loader =>
val loggerClass = playLoggerClass(loader)
if (loggerClass != null) {
loggerClass.getMethod("shutdown").invoke(null)
}
},
//testOptions += Tests.Argument(TestFrameworks.Specs2, "sequential", "true"),
testOptions += Tests.Argument(TestFrameworks.JUnit,"junitxml", "console")
) ++
Expand All @@ -45,12 +33,4 @@ object NGPlugin extends Plugin {
// If changing this, be sure to change in Build.scala also.
"de.johoop" %% "sbt-testng-interface" % "3.0.2" % "test"))
)

private def playLoggerClass(loader: ClassLoader) = {
try {
loader.loadClass("play.api.Logger")
} catch {
case e: ClassNotFoundException => null
}
}
}
2 changes: 1 addition & 1 deletion project/Build.scala
Expand Up @@ -35,6 +35,6 @@ object NGPluginBuild extends Build {
lazy val commonSettings: Seq[Setting[_]] = Project.defaultSettings ++ Seq(
organization := "com.linkedin.play-testng-plugin",
scalaVersion := "2.10.4",
version := "2.4.2"
version := "2.4.3"
)
}

0 comments on commit 0968cff

Please sign in to comment.