scala - Play framework and sbt: passing credentials to a nexus passowrd protected repo -


i need define dependency following library:

url: http://deploy.cloud.testmx.com:8081/nexus/content/groups/public/

user: testmx

pass: testmx@testmx

groupid: testmx

artifactid: testmxcommons

version: 1.0.0-snapshot

so defined following project/build.scala

import sbt._ import keys._ import playproject._  object applicationbuild extends build {      val appname         = "testmxproject"     val appversion      = "1.0-snapshot"      val appdependencies = seq(       "mysql" % "mysql-connector-java" % "5.1.18",       "testmx" % "testmxcommons" % "1.0.0-snapshot"     )      val main = playproject(appname, appversion, appdependencies, mainlang = scala).settings(       credentials += ("testmx public", "deploy.cloud.testmx.com:8081", "testmx", "testmx@testmx"),       resolvers += "testmx public" @ "http://deploy.cloud.testmx.com:8081/nexus/content/groups/public/"     )  } 

and following error:

[warn]  module not found: testmx#testmxcommons;1.0.0-snapshot  [warn] ==== testmx public: tried [warn]   http://deploy.cloud.testmx.com:8081/nexus/content/groups/public/testmx/textmxcommons/1.0.0-snapshot/textmxcommons-1.0.0-snapshot.pom 

i tried several alternatives give me same error...

i've checked this article , so question

and tried saving user , password on external file, it's explained here , here.

any idea?

-- edit clarify --

i changed real url because it's not public repo i'm working with... real url there , pom sbt trying find exist...

ps: btw.. sbt scaladocs???

you need tell sbt repository want publish to:

publishto := some("testmx public" @ "http://deploy.cloud.testmx.com:8081/nexus") 

additionally if don't want keep credentials in build file, can tell retrieve them locally adding line:

credentials += credentials(path.userhome / ".ivy2" / ".credentials"), 

and in ~/.ivy2 directory create .credentials file this:

realm=sonatype nexus repository manager host=deploy.cloud.testmx.com user=testmx password=testmx@testmx 

see https://github.com/harrah/xsbt/wiki/publishing more


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -