views:

82

answers:

5

Java/Eclipse. Development works fine. We have either Windows or FreeBSD for build server.

To deploy though I would like to do the following (in a very automated way):

1: Pull down everything from source control (perforce)

2: build all source (and all dependency projects) with configurable javac and arguments (we want to see if different compilers will affect performance any)

3: run proguard

4: Package up all resources (.class, "res/" directory, external .jars, etc) into a jar.

5: Create a .jnlp web start

6: Create a native windows installer (any suggestions?)

7) For our android apps 4/5 should be build/sign into deployable android package instead

We've tried ant, but seems very clunky and prone to error. Maybe the best way to do this is to just script it all? Seems like there should already be a good way to do this.

A: 

If you are familiar with Groovy, you might consider Gant... all the power of Ant combined with the coding flexibility of Groovy.

cjstehno
+3  A: 

We use maven for our build process, and Hudson as a Continuous Integeration Server that does our builds for us. To make a Windows Installer, we use NSIS, which has a plugin for Maven, and can even build the installer on a linux box (you have to recompile some libraries for the builder iirc).

As for Android, never done that - so not sure if Maven has appropriate help for it yet. But you can always embed Ant in it if you need to (using the ant plugin for Maven).

In short, like all of those systems, there is some initial setup, but it is often worth it for even mildly large projects, as it quickly pays off in spades.

aperkins
A: 

I'd suggest you reconsider Ant. If there are certain tasks that are awkward, you can either use the exec task to launch a shell or write your own ant tasks in Java. That still lets you use Ant to coordinate the overall build. You can make Ant a little less error prone by defining macros to reduce the cut-and-paste explosion.

Maven has a lot of nice features, but it's easier to set up at the start of a project. It's a lot of work to convert an existing project to use Maven. You can get Maven's dependency management by using Ivy together with Ant.

Don Kirkby
+1  A: 

Consider TeamCity. It's not free but it's good tool for continuous integration.

Victor Sorokin
+1  A: 

We evaluated FinalBuilder for a short while. It is a very powertool to integrate variety of build-release tasks.

We then switched to Hudson, which runs out ant scripts and schell scripts. Having hudson in place will be generally useful to run other tasks -- like running code inspection tools, create VM instance, deploy newly created installer , launch tests etc.

InstallAnywhere lets to you to create native installer for java applications. Not free, though.

Jayan