Liftサンプル動かす時のメモ

移転しました。

以下ページからサンプルを落とし、mvn jetty:runやった時にエラーが発生したので、解決方法をめもっとく。
※ただし正しいやり方かはいまいちよ〜わからん

エラー内容

$ mvn install
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/net/liftweb/lift-examples-parent/0.9/lift-examples-parent-0.9.pom
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

GroupId: net.liftweb
ArtifactId: lift-examples-parent
Version: 0.9

Reason: Unable to download the artifact from any repository

  net.liftweb:lift-examples-parent:pom:0.9

from the specified remote repositories:
  central (http://repo1.maven.org/maven2)


[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Cannot find parent: net.liftweb:lift-examples-parent for project: null:lift-example:war:null for project null:lift-example:war:null

解決方法

解凍したサンプルプロジェクトのpom.xml先頭あたりに以下を加える

 14   <repositories>
 15     <repository>
 16       <id>scala-tools.org</id>
 17       <name>Scala-Tools Maven2 Repository</name>
 18       <url>http://scala-tools.org/repo-releases</url>
 19     </repository>
 20   </repositories>
 21 
 22   <pluginRepositories>
 23     <pluginRepository>
 24       <id>scala-tools.org</id>
 25       <name>Scala-Tools Maven2 Repository</name>
 26       <url>http://scala-tools.org/repo-releases</url>
 27     </pluginRepository>
 28   </pluginRepositories>

その後、mvn install して、mvn jetty:run やればオK
eclipseプロジェクトする時は、mvn eclipse:eclipse する。