简体   繁体   中英

I used `sbt-buildinfo` in my project, but it doesn't generate the BuildInfo.scala file

I followed the readme of this sbt plugin: https://github.com/sbt/sbt-buildinfo , but my project doesn't generate any BuildInfo.scala , and no errors occurred.

I created a very simple sbt project to show my code: https://github.com/freewind/sbt-buildinfo-test

You can clone it and have a try. I'm not sure what do I miss.

BuildInfo.scala is generated in target/scala-2.11/src_managed/main/sbt-buildinfo :

package hello

import java.io.File
import java.net.URL

/** This object was generated by sbt-buildinfo. */
case object BuildInfo {
  /** The value is "sbt-buildinfo-test". */
  val name: String = "sbt-buildinfo-test"
  /** The value is "1.0". */
  val version: String = "1.0"
  /** The value is "2.11.6". */
  val scalaVersion: String = "2.11.6"
  override val toString: String = "name: %s, version: %s, scalaVersion: %s" format (name, version, scalaVersion)
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM