0

我已经用 SBT 构建了 Squeryl 框架,并试图将它与 Scala 2.8 和 NetBeans 6.9 一起使用。我已经定义了一个实体模型,因为它在 Squeryl intro 中被描述,但是 IDE 和编译器抱怨“CustomTypesMode 不是包 org.squeryl.customtypes 的成员”。可能是什么原因?

4

1 回答 1

2

您不必构建 Squeryl,您可以从http://github.com/max-l/Squeryl/downloads下载jar

如果您使用 sbt,您可以将 jar 放到 lib 目录中(我刚刚尝试过并且能够使用 . 编译示例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.
于 2010-09-11T20:22:24.817 回答