Please always do a "mvn clean" after doing a pull. Charles F. Munat wrote: > Did git reset then git pull, then ran mvn jetty:run -U in > liftweb/sites/example/ and got this: > > [INFO] [compiler:compile] > [INFO] Nothing to compile - all classes are up to date > [INFO] [scala:compile {execution: default}] > [INFO] suggestion: remove the scalaVersion from pom.xml > [INFO] Compiling 2 source files to > /private/var/www/liftweb/sites/example/target/classes > [WARNING] Exception in thread "main" java.lang.RuntimeException: > malformed Scala signature of WikiEntry at 9961; reference type _6 of > <none> refers to nonexisting symbol. > [WARNING] at > scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.errorBadSignature(UnPickler.scala:755) > ... > [INFO] > ------------------------------------------------------------------------ > [ERROR] BUILD FAILURE > [INFO] > ------------------------------------------------------------------------ > [INFO] command line returned non-zero value:1 > > Chas. > > David Pollak wrote: > >> Folks, >> >> I'm made a ton of updates to sitemap.Loc. If you're using sitemap >> generically, these changes will not impact you. However, there are a >> bunch of new features: >> >> * Loc is type-safe in terms of parameters... they're not just >> name-value pairs >> * Links and Text for a given Loc can be generated by passing in the >> appropriate type-safe parameters >> * Re-write rules can be part of Locs and can extract type-safe >> parameters which can be accessed and used in subsequent calls >> * Locs can have page-specific snippets that take as their parameter >> the parameter generated by the Loc during URL re-writing >> >> I'll illustrate with code for a page that does all the wiki stuff: >> >> /** >> * The WikiStuff object that provides menu, URL rewriting, >> * and snippet support for the page that displays wiki contents >> */ >> object WikiStuff extends Loc[WikiLoc] { >> object AllLoc extends WikiLoc("all", false) >> >> // the name of the page >> def name = "wiki" >> >> // the default parameters (used for generating the menu listing) >> def defaultParams = Full(WikiLoc("HomePage", false)) >> >> // no extra parameters >> def stuff = Nil >> >> // is the current page an "edit" or "view" >> def currentEdit = foundParam.is.map(_.edit) openOr false >> >> /** >> * Check for page-specific snippets and >> * do appropriate dispatching >> */ >> override val snippets: SnippetTest = { >> case ("wiki", Full(AllLoc)) => showAll _ >> case ("wiki", Full(wp @ WikiLoc(_ , true))) => editRecord(wp.record) _ >> case ("wiki", Full(wp @ WikiLoc(_ , false))) >> if !wp.record.saved_? => editRecord(wp.record) _ >> >> case ("wiki", Full(wp: WikiLoc)) => displayRecord(wp.record) _ >> } >> >> >> /** >> * Generate a link based on the current page >> */ >> val link = >> new Loc.Link[WikiLoc](List("wiki"), false) { >> override def createLink(in: WikiLoc) = { >> if (in.edit) >> Full(Text("/wiki/edit/"+urlEncode(in.page))) >> else >> Full(Text("/wiki/"+urlEncode(in.page))) >> } >> } >> >> /** >> * What's the text of the link? >> */ >> val text = new Loc.LinkText(calcLinkText _) >> >> >> def calcLinkText(in: WikiLoc): NodeSeq = >> if (in.edit) >> Text("Wiki edit "+in.page) >> else >> Text("Wiki "+in.page) >> >> /** >> * Rewrite the request and emit the type-safe parameter >> */ >> override val rewrite: LocRewrite = >> Full({ >> case RewriteRequest(ParsePath("wiki" :: "edit" :: page :: Nil, _, >> _,_), >> _, _) => >> (RewriteResponse("wiki" :: Nil), WikiLoc(page, true)) >> >> case RewriteRequest(ParsePath("wiki" :: page :: Nil, _, _,_), >> _, _) => >> (RewriteResponse("wiki" :: Nil), WikiLoc(page, false)) >> >> }) >> >> Questions? >> >> Thanks, >> >> David >> >> -- >> Lift, the simply functional web framework http://liftweb.net >> Collaborative Task Management http://much4.us >> Follow me: http://twitter.com/dpp >> Git some: http://github.com/dpp >> >> > > > >
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---