2016-08-11 20 views
1

의 서브 모듈에 의존하는 방법을 나는에 따라 프로젝트가 :SBT : 자식 프로젝트

"com.github.haifengl" % "smile-core" % "1.1.0", 
"com.github.haifengl" % "smile-scala_2.11" % "1.1.0", 

및 GitHub의에서 같은 프로젝트의 최신 마스터를 사용하는 SBT를 수정하려는.

나는이 같은 다른 프로젝트로 이런 짓을했습니다 좀 의미가

unresolved dependency: default#smile_2.11;0.1-SNAPSHOT: not found 

:

lazy val myProject = Project("myProject", file(".")) 
    .settings(commonSettings: _*) 
    .dependsOn(smileProject) 


lazy val smileProject = RootProject(uri("https://github.com/haifengl/smile")) 

그러나,이 실패합니다. this example

lazy val smileProject = ProjectRef(uri("https://github.com/haifengl/smile"), "smile-core") 

에 따라 내가 얻을 :

[error] No project 'smile-core' in 'https://github.com/haifengl/smile'. 
[error] Valid project IDs: smile 

smile-core은 바로 이름처럼 보인다.

는 업데이트 : .git 확장자를 추가

lazy val smileProject = ProjectRef(uri("https://github.com/haifengl/smile.git"), "smile-core") 

도 제공합니다

[error] No project 'smile-core' in 'https://github.com/haifengl/smile.git'. 
[error] Valid project IDs: benchmark, core, data, demo, graph, interpolation, math, nlp, plot, root, scala, shell 

을 ...

+0

URL에서'.git' 확장자가 누락 된 것 같습니다 :'ProjectRef (uri ("https://github.com/haifengl/smile.git"), "smile-core")' –

+0

도움 안됨 . 질문을 업데이트했습니다. – user48956

+1

아 - 도와 줬어. 모듈 이름이 잘못되었습니다. – user48956

답변

1

당신은 2015 년이 "Git Subproject Compile-time Dependencies in Sbt"여부를 확인 할 수있는 개선처럼 보인다 일할 수있다 :

lazy val root = Project("root", sbt.file(".")).dependsOn(smileProject, ...) 
lazy val smileProject = ProjectRef(uri("https://github.com/haifengl/smile.git"), "core") 
+0

차이점 없음 : 'https://github.com/haifengl/smile.git'에 'smile-core'프로젝트가 없습니다. " – user48956

+0

아 - .git 확장자와 "smile-core"-> "core"모듈이 필요합니다. – user48956