我已经使用SBT构建了Squeryl框架,并尝试将其与Scala 2.8和NetBeans 6.9一起使用。我已经定义了一个实体模型,因为它是desctibed in Squeryl intro,但IDE和编译器抱怨“CustomTypesMode不是包org.squeryl.customtypes的成员”。可能是什么原因?
答案 0 :(得分:2)
您无需修建Squeryl,可以从the jar下载http://github.com/max-l/Squeryl/downloads。
如果你使用sbt,你可以将jar放在lib目录中(我刚试过并且能够使用import org.squeryl.customtypes.CustomTypesMode._
编译该示例。)
或者,您应该能够将此行添加到您的sbt项目定义中:
val squeryl = "org.squeryl" % "squeryl_2.8.0" % "0.9.4beta8"
然后运行update:
$ 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.