title: How to integrate checkstyle and PMD into Play framework Build.scala file
body: <p>I am trying to integrate Checkstyle and PMD into the Play framework. I started by using the giter8 template created by ymasory to produce a sample build.scala file that supports the checkstyle and pmd commands in the sbt console.  This works fine and I've uploaded the resulting project to github:</p>
  
  <p><a href="https://github.com/ics-software-engineering/sbt-example-qa" rel="nofollow">https://github.com/ics-software-engineering/sbt-example-qa</a></p>
  
  <p>The problem occurs when I try to use this code with the Build.scala file created by the Play new command.  The giter8 template integrates checkstyle and pmd using the 'settings' value, as illustrated here (see the actual file for the entire definition):</p>
  
  <pre><code>object ProjectBuild extends Build {
  
    val main = Project(
      "sbt-example-qa",
      new java.io.File("."),
      settings = Defaults.defaultSettings ++ ProjectSettings.all
    )
  }
  </code></pre>
  
  <p>On the other hand, the Build.scala file generated by the 'play new' command has a different structure:</p>
  
  <pre><code>object ApplicationBuild extends Build {
  
    val appName         = "play-example-qa"
    val appVersion      = "1.0-SNAPSHOT"
  
    val appDependencies = Seq(
      // Add your project dependencies here,
      javaCore,
      javaJdbc,
      javaEbean
    )
  
    val main = play.Project(appName, appVersion, appDependencies).settings(
      // Add your own project settings here  
    )
  }
  </code></pre>
  
  <p>Specifically, the Build.scala file created by 'play new' defines a play.Project rather than a Project as create by the giter8 template.</p>
  
  <p>All my attempts to "Add my own project settings here" to get Checkstyle and PMD into the Play projecthave failed with syntax errors such as the following:</p>
  
  <pre><code>[info] Loading project definition from /Users/johnson/projecthosting/github/play-  example-qa/project
  [error] /Users/johnson/projecthosting/github/play-example-qa/project/Build.scala:17:   overloaded method value settings with alternatives:
  [error]   (ss: sbt.Project.Setting[_]*)sbt.Project &lt;and&gt;
  [error]   =&gt; Seq[sbt.Project.Setting[_]]
  [error]  cannot be applied to (settings: Seq[sbt.Project.Setting[_]])
  [error]   val main = play.Project(appName, appVersion, appDependencies).settings(
  [error]                                                                 ^
  [error] one error found
  [error] (compile:compile) Compilation failed
  </code></pre>
  
  <p>For your reference, here is the sample Play project I am trying to create that merges the giter8 template:</p>
  
  <p><a href="https://github.com/ics-software-engineering/play-example-qa" rel="nofollow">https://github.com/ics-software-engineering/play-example-qa</a></p>
  
  <p>Can someone explain how to modify Build.scala in this project so that the Play console can accept the "checkstyle" and "pmd" commands in a manner similar to the giter8 template? Perhaps by forking the play-example-qa project and fixing Build.scala?  I intend to make the working code available to the Play community for future reference. Thanks in advance. </p>