Generally, the module can look after its own concerns (for instance lift rules 
dispatching). However, the main wire up must be completed by the consumer 
rather than any classpath magic. Yes, LiftRules does support multiple add to 
package calls. I would put the addToPackage call in your module, and have a 
surrounding "init" method that just gets called in your consuming boot.scala 
meaning that your consuming code only has:

MyHelpfulModule.init

in its Boot.boot method - nice and tidy.

Cheers, Tim


On 14 Feb 2010, at 11:21, Jonathan Ferguson wrote:

> I was more concerned with the package structure being different between the 
> common module and the projects consuming it.  The snippets for the common 
> module would be in, say com.mycompany.common.snippet where as the projects 
> consuming the common module would likely have the package structure 
> com.mycompany.nextbigthing.snippet 
> 
> Does LiftRules support multiple addToPackage call?  Is there a nice way to 
> have the common module look after it's own interaction with LiftRules or 
> should the consumer of the module look after it? 
> 
> Jono
> 
> 
> 
> 
> 
> On 14 February 2010 21:13, ngocdaothanh <ngocdaoth...@gmail.com> wrote:
> I think you could install your modules into Maven's repository, then
> use them from projects as dependencies.
> 
> 
> On Feb 14, 6:32 pm, Jonathan Ferguson <j...@spiralarm.com> wrote:
> > Sorry for a bit of a vague Sunday night question.
> >
> > We now have several lift projects floating round that have common snippets
> > and potentially model objects, which would be nice to reuse without cut &
> > paste. Is there documentation on how to do this or best practices?
> >
> > Cheers
> >
> > Jono
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to 
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to 
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to