2010-09-10 20 views
0

我已經用SBT構建了Squeryl框架,並試圖將它與Scala 2.8和NetBeans 6.9一起使用。我定義了一個實體模型,因爲它是,但IDE和編譯器抱怨「CustomTypesMode不是包org.squeryl.customtypes的成員」。原因可能是什麼?Squeryl - 「CustomTypesMode不是包org.squeryl.customtypes的成員」?

+0

你能後的代碼?另外,你說你建立了squeryl,當你使用已發佈的版本時,你會遇到同樣的問題嗎? – Synesso 2010-09-10 23:54:13

+0

沒有發佈的版本。只有Maven,一種叫做POM文件的東西,以及一個SBT項目。從這三個我只熟悉SBT。 – Ivan 2010-09-11 12:52:18

回答

2

您不必建立Squeryl,您可以從http://github.com/max-l/Squeryl/downloads下載the jar

如果使用SBT,你可以刪除lib目錄中的jar(我只是嘗試,並能編譯使用import org.squeryl.customtypes.CustomTypesMode._的例子。)

或者你應該能夠此行到您的SBT項目定義:

val squeryl = "org.squeryl" % "squeryl_2.8.0" % "0.9.4beta8" 

然後運行更新:

$ sbt 
[info] Recompiling project definition... 
[info] Source analysis: 1 new/modified, 0 indirectly invalidated, 0 removed. 
[info] Building project test 1.0 against Scala 2.8.0 
[info] using MainProject with sbt 0.7.4 and Scala 2.7.7 
> update 
[info] 
[info] == update == 
[info] downloading http://scala-tools.org/repo-releases/org/squeryl/squeryl_2.8.0/0.9.4beta8/squeryl_2.8.0-0.9.4beta8.jar ... 
[info] [SUCCESSFUL ] org.squeryl#squeryl_2.8.0;0.9.4beta8!squeryl_2.8.0.jar (1425ms) 
[info] downloading http://repo1.maven.org/maven2/cglib/cglib-nodep/2.2/cglib-nodep-2.2.jar ... 
[info] [SUCCESSFUL ] cglib#cglib-nodep;2.2!cglib-nodep.jar (909ms) 
[info] :: retrieving :: test#test_2.8.0 [sync] 
[info] confs: [compile, runtime, test, provided, system, optional, sources, javadoc] 
[info] 2 artifacts copied, 0 already retrieved (1268kB/60ms) 
[info] == update == 
[success] Successful. 
相關問題