2012-02-13 16 views
0

我是Scala,Lift和Maven的新手,我遇到了一個問題。我創建了一個基於升力JPA原型一個新的JPA項目,具體如下:Lift原型基本JPA 2.9.1不會編譯

mvn archetype:generate -DarchetypeGroupId=net.liftweb -DarchetypeVersion=2.4-M4 -DarchetypeArtifactId=lift-archetype-jpa-basic_2.9.1 -DarchetypeRepository=http://scala-tools.org/repo-releases -DremoteRepositories=http://scala-tools.org/repo-releases -DgroupId=ltest -DartifactId=lift_test -Dversion=1.0 

然後我試圖使用MVN編譯編譯它。我得到了以下錯誤(我認爲這是相關部分):

[INFO] Compiling 9 source files to /lift_test/spa/target/classes at 1329115047063 
[ERROR] /lift_test/spa/src/main/scala/ltest/model/CurrencyUserType.scala:39: error: private value cz escapes its defining scope as part of type java.lang.Class[_ <: CurrencyUserType.this.cz.Currency] 
[INFO] override def returnedClass = cz.CurrencyUnit.getClass 
[INFO]    ^
[ERROR] /lift_test/spa/src/main/scala/ltest/model/Enumv.scala:43: error: value map is not a member of ltest.model.Enumv with Enumeration 
[INFO] def getNameDescriptionList = this.map(v => (v.toString, getDescriptionOrName(v))).toList 
[INFO]         ^
[ERROR] /lift_test/spa/src/main/scala/ltest/model/EnumvType.scala:49: error: value valueOf is not a member of Enumeration with ltest.model.Enumv 
[INFO]  return et.valueOf(value).getOrElse(null) 

(路徑匿名的 - 它不是在我的根目錄)

我真的不知道什麼是錯的。這些都是原型的所有類 - 我沒有向項目添加任何內容。我有一種感覺,我正在做一些非常基本的錯誤,或者我有一些配置錯誤,但我不知道是什麼。唯一我能想到的是我使用的是Maven 3,我認爲這些原型是爲Maven 2設計的。

+0

嘗試maven 2,如果這也失敗了,請嘗試在http://groups.google.com/group/liftweb?pli=1上的郵件列表中詢問 – fmpwizard 2012-02-14 17:59:43

回答

2

看起來像你有一個不受支持的archetypeVersion嘗試2.4-M5或者不指定它並讓maven找到它。