Eclipse, Scala and Lift

4 views
Skip to first unread message

Wormhoudt

unread,
May 26, 2010, 7:28:11 PM5/26/10
to Lift
I am very interested in Scala/Lift from a theoretical stand point, but
am having a crazy difficult time trying to get a functional base
build.

Coming from the .Net world, I am used to New > Project > ASP.NET MVC
Web Project ... and then pressing "play". I am trying to get to this
point with Eclipse, Scala and Lift. I have tried both Eclipse and
Netbeans with varying degrees of success, but nothing approaching a
running project.

I have followed http://liftweb.net/docs/getting_started/mod_master.html
but it does not talk about how to get this configuration running. I
have run down all of the links provided in this document, but have
failed to get a working project.

To be as specific as possible, I am trying to get to a point here I
can press the debug button within Eclipse, and have the Lift Web App
run in the browser. Maybe this use case just doesn't exist outside of
the Visual Studio world.

Anything you could provide would be greatly appreciated.

Thanks in advance
DW

TylerWeir

unread,
May 26, 2010, 8:24:06 PM5/26/10
to Lift
I don't use Eclipse, but Miles, the plug-in author, runs http://www.scala-ide.org/
and the mailing list:
http://groups.google.com/group/scala-ide-user

You may find your answer there.

On May 26, 7:28 pm, Wormhoudt <d...@homeboodle.com> wrote:
> I am very interested in Scala/Lift from a theoretical stand point, but
> am having a crazy difficult time trying to get a functional base
> build.
>
> Coming from the .Net world, I am used to New > Project > ASP.NET MVC
> Web Project ... and then pressing "play". I am trying to get to this
> point with Eclipse, Scala and Lift. I have tried both Eclipse and
> Netbeans with varying degrees of success, but nothing approaching a
> running project.
>

> I have followedhttp://liftweb.net/docs/getting_started/mod_master.html

Lukasz Kuczera

unread,
May 27, 2010, 2:47:47 AM5/27/10
to Lift
To get it running you replace "play" with mvn jetty:run on console. To
set up maven:
1. download
2. unzip
3. set environment: MAVEN_HOME, JAVA_HOME, PATH=$PATH:$MAVEN_HOME/bin
4. cd to project dir
5. mvn jetty:run

In eclipse/netbeans you can either run/debug LiftConsole this will
boot up scala console inside your project or run RunWebApp this will
start embedded jetty both from test folder. Getting back to "play" in
eclipse you can set up maven as external tool Run->External Tools-
>External Tools Configuration there you set up your maven but i found
myself more convenient to use mvn in terminal.

Regarding debugging personally in Scala i prefer println contradictory
to Java where i used debugger extensively.

On May 27, 1:28 am, Wormhoudt <d...@homeboodle.com> wrote:
> I am very interested in Scala/Lift from a theoretical stand point, but
> am having a crazy difficult time trying to get a functional base
> build.
>
> Coming from the .Net world, I am used to New > Project > ASP.NET MVC
> Web Project ... and then pressing "play". I am trying to get to this
> point with Eclipse, Scala and Lift. I have tried both Eclipse and
> Netbeans with varying degrees of success, but nothing approaching a
> running project.
>

> I have followedhttp://liftweb.net/docs/getting_started/mod_master.html

Jeppe Nejsum Madsen

unread,
May 27, 2010, 3:53:57 AM5/27/10
to lif...@googlegroups.com
Wormhoudt <do...@homeboodle.com> writes:

> I am very interested in Scala/Lift from a theoretical stand point, but
> am having a crazy difficult time trying to get a functional base
> build.
>
> Coming from the .Net world, I am used to New > Project > ASP.NET MVC
> Web Project ... and then pressing "play". I am trying to get to this
> point with Eclipse, Scala and Lift. I have tried both Eclipse and
> Netbeans with varying degrees of success, but nothing approaching a
> running project.
>

> I have followed http://liftweb.net/docs/getting_started/mod_master.htmlbut it does not talk about how to get this configuration running. I


> have run down all of the links provided in this document, but have
> failed to get a working project.
>
> To be as specific as possible, I am trying to get to a point here I
> can press the debug button within Eclipse, and have the Lift Web App
> run in the browser. Maybe this use case just doesn't exist outside of
> the Visual Studio world.

It works with Lift & Eclipse as well :-) But it is slightly complicated
to get there :-(

I've got a blog post waiting for this setup, but I've agreed with Miles
(the Scala Plugin author) to wait until it's working with the 2.8
plugin. Lift doesn't yet play well with the latest 2.8 releases.

> Anything you could provide would be greatly appreciated.

Basically, what I do is this:

1) Create the lift project with maven, make sure it works with mvn
jetty:run
2) Install eclipse with the 2.7 scala plugin+m2eclipse
3) Import the maven project to eclipse
4) Add the scala nature and disable the maven builder (I only use maven
for dependencies)
5) Now run the RunWebApp file in the test directory as a Scala
application. This starts the server and you can now browse to
localhost:8080 and see the app

I probably missed some steps along the way.....

/Jeppe

Wormhoudt

unread,
May 27, 2010, 3:22:01 PM5/27/10
to Lift
Wow. Thanks for all the quick responses. I have gotten everything
running with Maven and now also with SBT. It is quite strange to see
the propensity within the Scala community for println type debugging.
In the end it is only about personal preference, but it seems kinda
crazy to me to try to write a large application without a full
debugger. Maybe that is my Windows roots showing through?

I will try Jeppe's suggestions about applying a "Scala Nature" next. I
really don't know what that means, but I am sure Google will tell me.
I'll report back with my findings in the hope that I can ease some
other MS developers transition into Scala/Lift

DW

On May 27, 12:53 am, Jeppe Nejsum Madsen <je...@ingolfs.dk> wrote:


> Wormhoudt <d...@homeboodle.com> writes:
> > I am very interested in Scala/Lift from a theoretical stand point, but
> > am having a crazy difficult time trying to get a functional base
> > build.
>
> > Coming from the .Net world, I am used to New > Project > ASP.NET MVC
> > Web Project ... and then pressing "play". I am trying to get to this
> > point with Eclipse, Scala and Lift. I have tried both Eclipse and
> > Netbeans with varying degrees of success, but nothing approaching a
> > running project.
>

> > I have followedhttp://liftweb.net/docs/getting_started/mod_master.htmlbutit does not talk about how to get this configuration running. I

Lukasz Kuczera

unread,
May 27, 2010, 3:41:10 PM5/27/10
to Lift
Right click on project in eclipse -> Scala -> Add Scala Nature
Thats all :)
Scala is so flexible language that most of the time you work with 5-20
lines of code at the same time, so you exactly know what is going on
and just need this little feedback what is actually over there.

On May 27, 9:22 pm, Wormhoudt <d...@homeboodle.com> wrote:
> Wow. Thanks for all the quick responses. I have gotten everything
> running with Maven and now also with SBT. It is quite strange to see
> the propensity within the Scala community for println type debugging.
> In the end it is only about personal preference, but it seems kinda
> crazy to me to try to write a large application without a full
> debugger. Maybe that is my Windows roots showing through?
>
> I will try Jeppe's suggestions about applying a "Scala Nature" next. I
> really don't know what that means, but I am sure Google will tell me.
> I'll report back with my findings in the hope that I can ease some
> other MS developers transition into Scala/Lift
>
> DW
>
> On May 27, 12:53 am, Jeppe Nejsum Madsen <je...@ingolfs.dk> wrote:
>
>
>
> > Wormhoudt <d...@homeboodle.com> writes:
> > > I am very interested in Scala/Lift from a theoretical stand point, but
> > > am having a crazy difficult time trying to get a functional base
> > > build.
>
> > > Coming from the .Net world, I am used to New > Project > ASP.NET MVC
> > > Web Project ... and then pressing "play". I am trying to get to this
> > > point with Eclipse, Scala and Lift. I have tried both Eclipse and
> > > Netbeans with varying degrees of success, but nothing approaching a
> > > running project.
>

> > > I have followedhttp://liftweb.net/docs/getting_started/mod_master.htmlbutitdoes not talk about how to get this configuration running. I

Naftoli Gugenheim

unread,
Jun 2, 2010, 3:55:28 PM6/2/10
to liftweb
I think the usage of println for debugging is because the IDE debuggers eithers don't, or didn't until not so long ago, work as well with Scala as would be desired. Often it's not worth it to work around them when you can just add a little println, especially when using JRebel - you can be running in regular mode and add and remove printlns on the fly. You don't have to restart in debug mode.


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


Reply all
Reply to author
Forward
0 new messages