first steps with lift

1 view
Skip to first unread message

dany

unread,
Apr 18, 2008, 3:36:25 AM4/18/08
to liftweb
hi
my aim is simple: writing a website with lift saying the two famous
words (h..... w.....).

the problem in short: in don't know really about scala nor do I have
deeper knowledge of setting up the jvm/webserver/database combo for a
java environment.

I could really use a step by step guide ("lift for dummies?"):

the 7 steps to lift:
-----------------------
1. how to set up the jvm (env. vars,...)
2. how to set up scala
3. how to set up a (preferably embedded) webserver
4. how to set up a (preferably embedded) database
5. how to set up a project
6. how to write the simple "hello w." code
7. how to write the same code, but retrieving the greeting from the
database


I would really appreciate it if somebody could respond on these steps.
Links are also OK. Somehow I can't handle all the information, and
presentations and codeexamples, etc. on the wiki. Sorry.
I don't need deeper explanations at first, but I definitely want to
know scala better (but later). It's not very academic I know .... But
you could do me a favour :-)

dany

David Pollak

unread,
Apr 18, 2008, 4:05:35 PM4/18/08
to lif...@googlegroups.com
Dany,

dany wrote:
> hi
> my aim is simple: writing a website with lift saying the two famous
> words (h..... w.....).
>
> the problem in short: in don't know really about scala nor do I have
> deeper knowledge of setting up the jvm/webserver/database combo for a
> java environment.
>
> I could really use a step by step guide ("lift for dummies?"):
>

See http://liftweb.net/index.php/Hello_Darwin


> the 7 steps to lift:
> -----------------------
> 1. how to set up the jvm (env. vars,...)
>

You have to install the JVM (unless you're on Macintosh, in which case,
you've got a JVM installed already) and Maven (
http://maven.apache.org/download.html and
http://liftweb.net/index.php/Maven_Mini_Guide )


> 2. how to set up scala
>

You don't need to, Maven does this for you.


>
> 3. how to set up a (preferably embedded) webserver
>

You don't need to, Maven does this for you.


> 4. how to set up a (preferably embedded) database
>

You don't need to, Maven does this for you.


>
> 5. how to set up a project
>

See the Hello Darwin page... that sets up your project and creates all
the stuff for you.


> 6. how to write the simple "hello w." code
>

See the Hello Darwin page


> 7. how to write the same code, but retrieving the greeting from the
> database
>

Once you're done with the above, please ping the list and we'll be glad
to help.

Erik Engbrecht

unread,
Apr 18, 2008, 4:41:55 PM4/18/08
to lif...@googlegroups.com
Guys,
You might want to check the maven repository or the project files for hellodarwin.  It looks like it can't find jetty.

erik-engbrechts-macbook:hellodarwin eengbrec$ mvn jetty:run
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'jetty'.
[INFO] ------------------------------------------------------------------------
[INFO] Building hellodarwin
[INFO]    task-segment: [jetty:run]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing jetty:run
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [yuicompressor:compress {execution: default}]
[INFO] nb warnings: 0, nb errors: 0
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

No versions are present in the repository for the artifact with a range [6.1.6,)
  org.mortbay.jetty:jetty:jar:null

from the specified remote repositories:

David Bernard

unread,
Apr 19, 2008, 4:20:21 AM4/19/08
to lif...@googlegroups.com
I fix Hello Darwin, first run with jetty is "mvn jetty:run -U" -U option is important and avoid this message.

Thanks for report

/davidB

> scala-tools.org <http://scala-tools.org>

Erik Engbrecht

unread,
Apr 20, 2008, 3:36:38 PM4/20/08
to lif...@googlegroups.com
David,
That works.  Thanks.

Has anyone thought of making a list of useful command-line aliases for common tasks?  

For example: alias startJetty="mvn jetty:run -U"

So just typing startJetty would issue the appropriate command.  Given a small list, people could tailor them to their own tastes.

On a side note, lift, the latest Scala NetBeans plugin (nightly build of both), and the Maven IDE plugin (snapshot build of 3.1, not the released version) seem to work relatively well together.  Deployment to both Tomcat and Glassfish works, debugging works, nice stuff like the HTTP monitor work.  There are stability issues (it is mostly unreleased software, after all), but it's very hopeful.

-Erik

David Bernard

unread,
Apr 20, 2008, 4:06:08 PM4/20/08
to lif...@googlegroups.com
Erik Engbrecht wrote:
> David,
> That works. Thanks.
>
> Has anyone thought of making a list of useful command-line aliases for
> common tasks?
>
> For example: alias startJetty="mvn jetty:run -U"
>
> So just typing startJetty would issue the appropriate command. Given a
> small list, people could tailor them to their own tastes.

see Maven_Mini_Guide in the wiki

> On a side note, lift, the latest Scala NetBeans plugin (nightly build of
> both), and the Maven IDE plugin (snapshot build of 3.1, not the released
> version) seem to work relatively well together. Deployment to both
> Tomcat and Glassfish works, debugging works, nice stuff like the HTTP
> monitor work. There are stability issues (it is mostly unreleased
> software, after all), but it's very hopeful.

Thanks for the info. (my previous test/eval of dev version of Netbeans was a desastreous (nothing work after an update,...), so I'll wait version working on NB 6.1+, before retest)

/davidB

> > scala-tools.org <http://scala-tools.org> <http://scala-tools.org>


> > (http://scala-tools.org/repo-releases)
> >
> > On Fri, Apr 18, 2008 at 4:05 PM, David Pollak <d...@athena.com
> <mailto:d...@athena.com>

Erik Engbrecht

unread,
Apr 20, 2008, 4:11:50 PM4/20/08
to lif...@googlegroups.com
Yes, keeping up-to-date with the Scala plugin for NetBeans can be an enormous pain.  Every time a new update comes out for the plugin, I with a clean install of the nightly build - meaning I kill the stuff in my .netbeans directory so the new version can't pickup stuff from the old version.
--
http://erikengbrecht.blogspot.com/

dany

unread,
Apr 23, 2008, 8:53:21 AM4/23/08
to liftweb
hi

I can't run jetty too - it gives me a FATAL ERROR(*). Any Ideas? I
followed the tutorial http://liftweb.net/index.php/Hello_Darwin

thanks
ben

(*)
$ mvn jetty:run -U

....
[INFO] Ignoring available plugin update: 2.0 as it requires Maven
version 2.0.7
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] The PluginDescriptor for the plugin Plugin [org.scala-
tools:maven-scala-plugin] was not found.
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.IllegalStateException: The PluginDescriptor for the plugin
Plugin [org.scala-tools:maven-scala-plugin] was not found.
at
org.apache.maven.plugin.DefaultPluginManager.addPlugin(DefaultPluginManager.java:
317)
at
org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:
207)
at
org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:
171)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:
1257)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:
1469)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:
386)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:
138)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:
315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:
430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)




On Apr 18, 10:41 pm, "Erik Engbrecht" <erik.engbre...@gmail.com>
wrote:
> Guys,You might want to check the maven repository or the project files for
> > Seehttp://liftweb.net/index.php/Hello_Darwin

Tim Perrett

unread,
Apr 23, 2008, 9:03:15 AM4/23/08
to lif...@googlegroups.com
What version of Maven are you using? What platform are you on?

Tim

Jorge Ortiz

unread,
Apr 23, 2008, 9:26:32 AM4/23/08
to lif...@googlegroups.com
Yeah, you need at least Maven version 2.0.7.

dany

unread,
Apr 23, 2008, 11:28:01 AM4/23/08
to liftweb
Maven version: 2.0.6

on mac os x 10.5.2

dany

unread,
Apr 23, 2008, 11:31:12 AM4/23/08
to liftweb

David Pollak

unread,
Apr 23, 2008, 11:41:10 AM4/23/08
to lif...@googlegroups.com
You may have multiple Maven instances on your computer.  Do a 'which mvn' to figure out which Maven is being picked up and see if that's the one you expect to be picked up.
--
Scala lift off unconference, May 10th 2008, San Francisco http://scalaliftoff.com
lift, the secure, simple, powerful web framework http://liftweb.net
Collaborative Task Management http://much4.us

dany

unread,
Apr 23, 2008, 11:40:27 AM4/23/08
to liftweb
I have it. There was something in my /usr/bin called "mvn" (not sure
if that was maven because I never installed it before) that pointed to
a mvn binary. I've redirected that to my maven installation, and now
it seems to work.

Tim Perrett

unread,
Apr 23, 2008, 11:47:59 AM4/23/08
to lif...@googlegroups.com
Yes, maven ships with leopard dev tools. Its an old version however;
Its simplest to just adjust your path variable by prepending the
instal directory overriding any other maven installations.

Cheers

Tim

dany

unread,
Apr 23, 2008, 12:19:15 PM4/23/08
to liftweb
thanks you were right. that was exactly the problem. I had an old
standard maven installation on my mac. I corrected that and now it
works. thanks.

On Apr 23, 5:41 pm, "David Pollak" <feeder.of.the.be...@gmail.com>
wrote:
> You may have multiple Maven instances on your computer.  Do a 'which mvn' to
> figure out which Maven is being picked up and see if that's the one you
> expect to be picked up.
>
>
>
> On Wed, Apr 23, 2008 at 8:28 AM, dany <daniel.au...@gmail.com> wrote:
>
> > Maven version: 2.0.6
>
> > on mac os x 10.5.2
>
> > On Apr 23, 3:03 pm, Tim Perrett <he...@timperrett.com> wrote:
> > > What version of Maven are you using? What platform are you on?
>
> > > Tim
>
> > > On 23 Apr 2008, at 13:53, dany wrote:
>
> > > > [INFO] Ignoring available plugin update: 2.0 as it requires Maven
> > > > version 2.0.7
>
> --
> Scala lift off unconference, May 10th 2008, San Franciscohttp://scalaliftoff.com
Reply all
Reply to author
Forward
0 new messages