views:

111

answers:

2

I'm trying to understand what's the best way to setup a project that is a mix of java and scala and that will use lift. Lift is intended to run embedded by jetty in another application.

I'm comfortable to work in Eclipse and also used to how it works with ant as build tool. I'm a relatively newbie in both scala and lift and get confused about the different build tool and how to set up things. I don't really understand maven and haven't really looked at sbt, but it seem to be the choice of scala developers, but I'm also dependent on quite some javacode.

Any suggestions, links, tutorials or else on how to setup the best environment so I can work comfortably in Eclipse and also build releases quite easily given my scala/java/lift/jetty enrironment?

A: 

This screencast is what I used to get started. It starts with a git repository for an SBT template and then adds the Eclipsify sbt plugin to make it into an Eclipse project.

Ben Lings
Thanks thats a very good start!I can of course inside eclipse add java nature etc., but I still want to be able to compile my stuffalso from commandline (sbt). How do I then add java to this in sbt?Finally how to I add lift to sbt, before or after eclipsifying and how?Finally do people think this is the best way to handöle such a project, anybody have comments on that?
Bjorn J
+1  A: 

I would say that if you are comfortable using Ant as a build tool, Maven should be a piece of cake to use instead. It's main advantage is encouraging conforming to conventions rather than lots of configuration meaning that as long as you follow the standards, setup and usage of any most maven projects is a breeze. I strongly recommend that you invest the time to become familiar with this build tool because it will be very valuable experience/knowledge you can continue to use in your Java career.

With Maven aside, if you are convinced that you and the rest of the project's devs will all be using Eclipse, I would recommend using Eclipse's built in project management infrastructure. It uses Ant under the hood so you will be able to leverage you experience to also run/release from the command-line. All you need to do is set up a eclipse Lift project normally and then to add the scala integration, check out Scala IDE for pretty good IDE support of scala development inside of eclipse.

Good luck!

Gweebz
Thanks for your opinions, I probably need to read up a bit on Mavenbefore discarding it. Coming form a classic approach of simpleold school makefiles and ant scripts, these tools, like mavenand sbt seem overcomplicated to me and I hate when there is magic involved.Given that we develop inside Eclipse, is it easy to export a buildtool to make builds off-eclipse? Also, I want to use stuff like hudson or similar for long term testing etc., and then I need ways to build and run from commandline.Any takes on this?
Bjorn
Maven is definitely worth the effort IMO but I will admit it does do a lot of things for you, a.k.a. "magic". As for eclipse, I have not used it for a couple of years so I can't comment on how to set up builds/releases. I am sure you can find that information out on either the eclipse website or right here on SO. And about using external build tools for CI and testing, anything you can do from a command-line can be executed from Hudson/TeamCity/etc. And for the record, Maven build configurations are automatically supported in both Hudson and TeamCity ;)
Gweebz