Install Lift 2.1 in MacOSX Leopard > (4) Create a Lift Project with Maven:
The Apache Maven has become a standard, a standard that is already installed in Mac OS X Leopard by default, and there is no need to installed again. It is also possible to update it.
Once the maven is installed, we can use it to create a Lift Project, you could start the mvn command, and create a project with the following structure.
mvn archetype:generate \ -DarchetypeGroupId=net.liftweb \ -DarchetypeArtifactId=lift-archetype-basic_2.8.0 \ -DarchetypeVersion=2.1 \ -DarchetypeRepository=http://scala-tools.org/repo-releases \ -DremoteRepositories=http://scala-tools.org/repo-releases \ -DgroupId=org.activoricordi.app \ -DartifactId=lift_app_test \ -Dversion=1.0 |
We are going to analyze each of the terms on this archetype:
- archetype:create -U: It indicates the type of archetype we are going to use, there could be others which we will use to build the application or deployed
- -DarchetypeArtifactId can have one of the three values
- – lift-archetype-blank: To create a blank project without any database or ORM.
- – lift-archetype-basic:To create a liftweb project with ORM and derby database, it is good for prototyping a project and help to start with beginners
- – lift-archetype-jpa-basic To create a liftweb project with ORM and jpa database
We modify the following parameters to adjust it to our project:
-DgroupId=org.activoricordi.app \ -DartifactId=lift_app_test \ -Dversion=1.0
Once the execution of the Maven is completed, we execute the following commands:
cd hellodarwin mvn jetty:run
It will immediately show the typical Lift application demo.
You could see an screenscast describing this process on the following video:
Getting Started with the Lift Web Framework Part II from Matt Harrington on Vimeo.
Hey thanks!
I was having problems using the default lift archetype, there were some version numbers that weren’t quite right, but this worked flawlessly!