On Nov 16, 3:44 pm, David Pollak <[email protected]>
wrote:
> On Mon, Nov 16, 2009 at 8:14 AM, dserodio <[email protected]> wrote:
>
> > I'm a complete Lift (and Scala) newbie, and I'm trying to follow the
> > "Starting with Lift" tutorial.
>
> > I created a blank project and when I create a Todo.scala with the
> > contents of "Listing 2: The ToDo model", I get a "Cannot resolve
> > symbol IdPK". Which package contains this trait ?
>
> Do you have the all of the following lines in your Todo.scala file:
>
> import net.liftweb._
> import mapper._
> import http._
> import SHtml._
> import util._
>
> The mapper package contains the trait.

I had these import statements, but it still wouldn't work. After some
help from 'lopex' on IRC, I concluded that my Lift install was
outdated (the pom.xml referred to Lift 0.8) and broken, so I removed
both the project's and ~/.m2/repository/net/liftweb folders and
started over.

I recreated the project with the following command:

mvn archetype:generate -U -DarchetypeGroupId=net.liftweb -
DarchetypeArtifactId=lift-archetype-basic -DarchetypeVersion=1.0 -
DremoteRepositories=http://scala-tools.org/repo-releases -
DgroupId=com.example -DartifactId=hello -Dversion=0.1-SNAPSHOT

Then I tried to "mvn jetty:run" inside the pristine project, and it
fails because of a missing "smack" dependency:
org.igniterealtime.smack:smack:jar:3.1.0 and
org.igniterealtime.smack:smackx:jar:3.1.0

The more I mess with it, the more I'm reminded of why I don't like
Maven... Can't make a simple "Hello world" app work! Is there any
alternative to using Maven with Lift?

> > Also, are the mapper, http, SHtml and util packages "top-level" (ie,
> > not contained in net.liftweb) ?
>
> No, they are sub-packages of net.liftweb  Scala has a different (and more
> flexible) package resolution mechanism than Java.  By doing import
> net.liftweb._, you are saying, if any subpackage of net.liftweb is mentioned
> (e.g., mapper._), you can resolve that to net.liftweb.mapper._

Ah, now it makes sense. Thanks for the explanation.

Regards,
Daniel Serodio
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to