LiftをGAE/Jで動かす。
ゆろよろさんのこちらを猛烈に参考。
GAE/JでLift-1.1-Snapshotを動かす方法 - ( ꒪⌓꒪) ゆるよろ日記
mavenでプロジェクトを作る際に、そのままコピペして実行したらエラー発生。
mvn archetype:create -U -DarchetypeGroupId=net.liftweb -DarchetypeArtifactId=lift-archetype-blank -DarchetypeVersion=1.1-SNAPSHOT -DremoteRepositories=http://scala-tools.org/repo-snapshots -DgroupId=com.rktm -DartifactId=lift_gae_test
ちなみに私の環境は以下の通り。
・Windows XP
・Apache Maven 2.2.1 (r801777; 2009-08-07 04:16:01+0900)
・Java version: 1.6.0_16
エラー内容はこんなの。
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] artifact org.apache.maven.plugins:maven-archetype-plugin: checking for updates from central
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [archetype:create] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [archetype:create {execution: default-cli}]
[WARNING] This goal is deprecated. Please use mvn archetype:generate instead
[INFO] Defaulting package to group ID: com.rktm
[INFO] We are using command line specified remote repositories: http://scala-tools.org/repo-snapshots
[INFO] snapshot net.liftweb:lift-archetype-blank:1.1-SNAPSHOT: checking for updates from id0
Downloading: http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-blank/1.1-SNAPSHOT/lift-archetype-blank-1.1-SNAPSHOT.jar
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating OldArchetype: lift-archetype-blank:1.1-SNAPSHOT
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.rktm
[INFO] Parameter: packageName, Value: com.rktm
[INFO] Parameter: package, Value: com.rktm
[INFO] Parameter: artifactId, Value: lift_gae_test
[INFO] Parameter: basedir, Value: D:\Project\Scala\LiftonGAEJ
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error creating from archetypeEmbedded error: The META-INF/maven/archetype.xml descriptor cannot be found.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Fri Dec 04 01:11:04 JST 2009
[INFO] Final Memory: 8M/14M
[INFO] ------------------------------------------------------------------------
[WARNING] This goal is deprecated. Please use mvn archetype:generate instead
↑ここが怪しいと思い、下記の通り書き直したらうまく通りました。
mvn archetype:generate -U -DarchetypeGroupId=net.liftweb -DarchetypeArtifactId=lift-archetype-blank -DarchetypeVersion=1.1-SNAPSHOT -DremoteRepositories=http://scala-tools.org/repo-snapshots -DgroupId=com.rktm -DartifactId=lift_gae_test
あとはゆろよろさんの手順通りでローカル起動まで確認できました。
明日からはLift on GAE/Jで遊ぶぞー。