2012-09-17 5 views
1

새로운 플레이 프로젝트 인 xyz를 시작했습니다. customGroupId : customArtifactId : 0.10에 종속성을 추가하고 싶었습니다.이 속성은 호스트 nexus.xyz.com의 nexus 저장소에서 호스팅되지만 사용자 이름과 비밀번호로만 액세스 할 수 있습니다.playframework가 넥서스 서버에 자격 증명으로 이슈를 해결합니다.

그래서, 그럼 난 XYZ에서 실행

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" 
    ) 

} 

와 \ Build.scala의 xyz \ 프로젝트를 편집했다.

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

답변

1

영역 이름이 정확한지 확인 했습니까? 내 넥서스 영역, 예를 들어

Sonatype 넥서스 저장소 관리자

나는 /이 영역이 난을 참조하는 데 사용할 수있는 고유 식별자 아니라는 것을 기억 발견
0

이다 (I 생각은 기본 영역입니다) 서버이지만 인증 할 때 서버가 표시하는 텍스트입니다. 이 경우

영역은 다음과 같다 작동 이제 "PROXY_INTERNET" realm authentication

내 구성입니다. "eessi-releases"는 서버의 영역 또는 ID가 아닙니다.

import sbt._ 
import Keys._ 
import PlayProject._ 
import com.github.play2war.plugin._ 

object ApplicationBuild extends Build { 

    val appName   = "reliable-transport-ui" 
    val appVersion  = "1.0-SNAPSHOT" 
    val bmServerVersion = "0.113" 

    //val mySubProject = Project("transport-server", file("../reliable-transport-server/src/main/java")) 
    //val mySubProject2 = Project("transport-server", file("../reliable-transport-server/src/main/resources")) 


    val appDependencies = Seq(
     javaCore, 
     javaJdbc, 
     // Add your project dependencies here, 
     "commons-io" % "commons-io" % "1.4" 
    ) 

    import com.typesafe.sbteclipse.core.EclipsePlugin._ 

    import play.Project._ 

    val main = play.Project(appName, appVersion, appDependencies).settings(defaultScalaSettings:_*).settings(
     //Subversion is the realm - the text displayed by server when it asks for username/password. Don't change it from <Subversion> 
     credentials += Credentials("Subversion", "webgate.ec.europa.eu", "grigocn", "<pass>") 

     ,resolvers += "eessi-releases" at "https://webgate.ec.europa.eu/CITnet/svn/eessi/maven2/releases" 

     ,resolvers += "eessi-thirdparty" at "https://webgate.ec.europa.eu/CITnet/svn/eessi/maven2/thirdparty" 

     ,resourceDirectory in Test <<= baseDirectory(_/"test-resources") 

     ,EclipseKeys.createSrc := EclipseCreateSrc.Default + EclipseCreateSrc.Resource 

     ,EclipseKeys.withSource := true 
    ) 
) 
관련 문제