Android-Maven project

So I have been hacking away today at Android-Maven.

It's far from perfect, and I sure still have a hell of a lot to learn about Maven2 (and Android), but it at least is a starting point - it can build, install in the emulator, and run an Android app.

Right now it basically lets you define the directory layout rather than having to stick to the Android default (and it defaults to the Maven standard), and then builds your R.java resources file, then compiles to Java bytecode, then builds the Dalvik DEX files, then builds an APK file, and finally launches the emulator and installs/runs the app (and of course all of that is configurable if you only want a portion of those steps, via your POM).

To be perfectly honest, Maven is annoying as hell on several fronts, and the Android Eclipse plugin is far more productive than using Android-Maven. That said though, Android-Maven does come in handy for automated builds (continuous integration) and for those that don't use Eclipse ;). Also, relying on the IDE to do magic stuff for you is just not a good habit to be in. F5 should *not* be your build process. To that end I started down this path because I wanted some automated/repeatable process for Android builds, and Maven was the logical choice (not because it's the best, but because it has some good points, and it's what I can throw into Hudson/Cruise/etc). If you don't use Maven, at least use the ant builds the Android creator scripts start you off with.

I will keep banging on this as I go and learn more about both Android and Maven - so hopefully it will get better.

Comments

Android-Maven

Note that there is another Maven 2 droid plugin out there, the one Shane Isbell wrote. That plugin looks pretty damn good to be honest, but I did want to tweak a few things when I looked at it (after I started Android-Maven).

And . . . it's a long story but I don't really subscribe to the ASF "have to get an invite" model, especially when it's a sandbox project that doesn't have a site for contributors to help out (none that I could find anyway). So, I am still keeping Android-Maven around, because it works for me, and I can contribute to it - and I can also allow anyone else who wants to to do the same (without the ASF process).

I put more details about my decision on the Android-Maven site, if anyone cares.

Shane Isbell's plugin

You might like to know that Shane Isbell's plugin, as of release 1.0, is also available as a Google Code project.

I agree that the Masa plugin looks very good. I gave the 1.0 release a spin and found that it unfortunately does not auto-generate the R.java file and it seems to only support the Android directory layout like your plugin does. Other than that it worked like a charm. Maybe you two can pool your resources and come up with something great together?

Masa Android plugin

Thanks for the nod to Masa, I actually did not know it was on gCode now. I posted a note in the forum there, I would be glad to join Masa and kill Android-Maven in order to consolidate efforts - if Shane is agreeable to that.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.