2014-04-15 252 views
0

我正嘗試在我的子項目(NanoKBIndex)中使用主Play項目(NanoKBWeb)中的類。 Play項目「NanoKBWeb」具有以下目錄結構。Play Framework 2.2-使用主項目中的子項目中的類

└── NanoKBWeb 
    ├── NanoKBIndex 
    ├── app 
    │   ├── Global.java 
    │   ├── controllers 
    │   ├── models 
    │   └── views 
    ├── build.sbt 
    ├── conf 
    │   ├── application.conf 
    │   ├── components.xml 
    │   ├── messages 
    │   ├── routes 
    ├── logs 
    │   └── application.log 
    ├── project 
    │   ├── build.properties 
    │   ├── plugins.sbt 
    ├── public 

納米KBWeb具有以下build.sbt。

name := "NanoKBWeb" 

version := "1.0" 

libraryDependencies ++= Seq(javaJdbc, javaEbean, 
"org.springframework" % "spring-context" % "4.0.1.RELEASE", 
"org.apache.lucene" % "lucene-core" % "3.5.0", 
"org.apache.lucene" % "lucene-facet" % "3.5.0", 
"org.apache.lucene" % "lucene-queryparser" % "3.5.0", 
"org.json" % "json" % "20140107" 
) 

playJavaSettings 

lazy val NanoKBIndex = project.in(file("NanoKBIndex")) 

lazy val NanoKBWeb = project.in(file(".")) 
    .aggregate(NanoKBIndex) 
    .dependsOn(NanoKBIndex) 

「NanoKBIndex」具有以下目錄結構。

├── data 
├── lib 
├── build.sbt 
├── src 
│   ├── br 
│   │   └── com 
│   │    └── caelum 
│   │     └── vraptor 
│   │      └── blank 
│   └── org 
│    └── nanokb 
│     ├── api 
│     ├── common 
│     ├── index 
│     ├── integration 
│     ├── interpreter 
│     ├── object 
│     ├── search 
│     └── test 

NanoKBIndex具有以下build.sbt。

name := "NanoKBIndex" 

version:= "1.0" 

libraryDependencies ++= Seq("org.json" % "json" % "20140107", 
        "edu.stanford.nlp" % "stanford-corenlp" % "3.3.1", 
        "edu.stanford.nlp" % "stanford-parser" % "3.3.1", 
        "br.com.caelum" % "vraptor" % "3.5.3" 
) 

play項目(NanoKBWeb)使用子項目(NanoKBIndex)中的許多類。當我爲NanoKBWeb運行「play compile」時,它會從NanoKBIndex中產生錯誤。

[info] Loading project definition from /Users/test/NanoKBWeb/project 
[info] Set current project to NanoKBWeb (in build file:/Users/test/NanoKBWeb/) 
[info] Compiling 10 Scala sources and 13 Java sources to /Users/test/NanoKBWeb/target/scala-2.10/classes... 
[error] /Users/test/NanoKBWeb/app/controllers/Application.java:19: error: package org.nanokb.object does not exist 
[error] import org.nanokb.object.NanoPubProvenance; 
[error]      ^
[error] /Users/test/NanoKBWeb/app/service/NanoPublicationService.java:30: error: package org.nanokb.api does not exist 
[error] import org.nanokb.api.KBInputManager; 
[error]     ^
[error] /Users/test/NanoKBWeb/app/service/NanoPublicationService.java:31: error: package org.nanokb.api does not exist 
[error] import org.nanokb.api.KBQueryEngine; 
[error]     ^
[error] /Users/test/NanoKBWeb/app/service/NanoPublicationService.java:32: error: package org.nanokb.object does not exist 
[error] import org.nanokb.object.Entity; 
[error]      ^
[error] /Users/test/NanoKBWeb/app/service/NanoPublicationService.java:33: error: package org.nanokb.object does not exist 
[error] import org.nanokb.object.NanoPub; 

有人可以指導我在這裏失蹤什麼?

回答

相關問題