我開始了一個新的播放項目:xyz。我想添加對customGroupId的依賴關係:customArtifactId:0.10託管在主機nexus.xyz.com上的nexus存儲庫中,但只能通過用戶名和密碼訪問。playframework解決工件與證書到nexus服務器
所以,我編輯XYZ \項目\ Build.scala與
import sbt._
import Keys._
import PlayProject._
object ApplicationBuild extends Build {
val appName = "xyz"
val appVersion = "1.0-SNAPSHOT"
val appDependencies = Seq(
"customGroupId" % "customArtifactId" % "0.10"
)
val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings(
credentials += Credentials("realm1", "nexus.xyz.com", "myUser", "myPassword"),
resolvers += "realm1" at "https://nexus.xyz.com/svn/eessi/maven2/releases"
)
}
然後,我在某某跑了。
play
run
我得到
play! 2.0.3, http://www.playframework.org
[xyz] $ run
[info] Updating {file:/C:/Users/grigocn/work/xyz/}xyz...
[warn] module not found: customGroupId#customArtifactId;0.10
[warn] ==== local: tried
[warn] c:\Users\grigocn\apps\play\framework\..\repository/local/customGroupId/customArtifactId/0.10/ivys/ivy.xml
[warn] ==== Typesafe Releases Repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/customGroupId/customArtifactId/0.10/customArtifactId-0.10.pom
[warn] ==== realm1: tried
[warn] https://webgate.ec.europa.eu/CITnet/svn/eessi/maven2/releases/customGroupId/customArtifactId/0.10/customArtifactId-0.10.pom
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/customGroupId/customArtifactId/0.10/customArtifactId-0.10.pom
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
...
PS。我試圖按照這個,但沒有工作:Play framework and sbt: passing credentials to a nexus passowrd protected repo