Playframework 如何在sonatype nexus存储库上发布sbt.zip文件?

Playframework 如何在sonatype nexus存储库上发布sbt.zip文件?,playframework,sbt,Playframework,Sbt,我在sbt项目的target>universal文件夹中有一个zip文件,为了在nexus存储库中发布这个zip文件,我在下面添加了代码 import com.typesafe.config._ import play.Project._ import play.PlayJava //在这里,我将sbt属性外部化 val conf = ConfigFactory.parseFile(new File("conf/application.conf")).resolve() name := co

我在sbt项目的target>universal文件夹中有一个zip文件,为了在nexus存储库中发布这个zip文件,我在下面添加了代码

import com.typesafe.config._
import play.Project._
import play.PlayJava
//在这里,我将sbt属性外部化

val conf = ConfigFactory.parseFile(new File("conf/application.conf")).resolve()

name := conf.getString("name_prop")

version := conf.getString("version_prop")

scalaVersion := conf.getString("scala_version")

val nexusProperty = conf.getString("nexus_prop")

val snapRelNo = conf.getString("Snapshot_Release_NO")

lazy val root = (project in file(".")).enablePlugins(PlayScala);

libraryDependencies ++= Seq(jdbc, anorm, cache, ws)

resolvers ++= Seq(
"Sonatype Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/",
"snapshots" at "http://localhost:8081/nexus/content/repositories/snapshots/"
)

libraryDependencies ++= Seq(
//此处指定了依赖项 ) 释放设置

credentials += Credentials(file(".") / "project" / ".credentials")

lazy val dist = com.typesafe.sbt.SbtNativePackager.NativePackagerKeys.dist

  val publishDist = TaskKey[sbt.File]("publish-dist", "publish the dist artifact")

  lazy val publishSettings = sbtrelease.ReleasePlugin.releaseSettings ++ Seq(
    publishArtifact in (Compile, packageDoc) := false,
    publishArtifact in (Compile, packageSrc) := false,
    publishArtifact in (Compile, packageBin) := false,
    publish <<= (publish) dependsOn dist,
    publishLocal <<= (publishLocal) dependsOn dist,
    artifact in publishDist ~= {
      (art: Artifact) => art.copy(`type` = "zip", extension = "zip")
    },
    // disable using the Scala version in output paths and artifacts
    crossPaths := false,
    // publish to Artefactory
    organization := nexusProperty,
    publishMavenStyle := true,
    pomIncludeRepository := {
      x => false
    },
    publishDist <<= (target in Universal, normalizedName, version) map { (targetDir, id, version) =>
      val packageName = "%s-%s" format(id, version)
      targetDir / (packageName + ".zip")
    },
    publishTo <<= version {
      (v: String) =>
        val repo = nexusProperty;// FILL IN HERE
        if (v.trim.endsWith("SNAPSHOT"))
         Some("snapshots" at repo + "libs-snapshot-local")
        else
         Some("releases" at repo + "libs-release-local")
    }
  ) ++ addArtifact(artifact in publishDist, publishDist)

  val main = play.Project(appName,
    dependencies = appDependencies,
    settings = playScalaSettings ++ publishSettings
  ).settings(
    version <<= version in ThisBuild 
  )


Its giving me error for play object as "error: object Project is not a member of package play import play.Project._" and if I remove this then error for this appears "val main = play.Project(appName,"

Please let us know the solution for this.
Thanks in advance.                 ^
credentials+=凭证(文件(“.”/“项目”/.credentials”)
lazy val dist=com.typesafe.sbt.SbtNativePackager.NativePackagerKeys.dist
val publishDist=TaskKey[sbt.File](“发布dist”,“发布dist工件”)
lazy val publishSettings=sbtrelease.ReleasePlugin.releaseSettings++Seq(
publishArtifact in(Compile,packageDoc):=false,
publishArtifact in(Compile,packageSrc):=false,
publishArtifact in(Compile,packageBin):=false,
你看了吗?