Jimmy
Jimmy

Reputation: 16428

What benefits does Maven give (over ant) for building android projects?

I've recently been trying to setup maven for building my android projects, using the maven-android-plugin.

Whilst this is a good exercise, I'm not convinced that the benefits will outweigh the frustration in getting it working.

Can anyone give me some pros/cons on using Maven for android? I'm not looking for subjective answers, but the facts on whether its worth the effort.

Regards

Upvotes: 11

Views: 1635

Answers (3)

Ninja
Ninja

Reputation: 2568

Maybe the gradle makes more sense.

Google released an ide called AndroidStudio, it uses gradle. Seems like google will suggest gradle in building an Android project.

I tried to use Maven to build my android project, it's hard to use, finally I changed to gradle.

Another good answer on stackoverflow why-use-gradle-instead-of-ant-or-maven

Upvotes: 1

Jonathan Viccary
Jonathan Viccary

Reputation: 732

My android app shares business objects and other functionality with my back-end server so I pulled this out into a common maven project which both the app and the server (as maven projects) have a dependency on. Maven is perfect for this sort of thing, so its helpful in this instance, but if you are writing fairly straightforward apps, I'm not sure what benefit maven would have, especially when getting the android-maven-plugin to behave took me so long.

Upvotes: 0

sherif
sherif

Reputation: 2332

Well maven is worth it if you are developing a j2ee application to save you from the jar hell when using external apis

So if you are not going to use the maven repositories its not worth it.

I hate maven because of the problems you already mentioned. But it saves a lot time if you need xy jars. Im currently developing a eclipse plugin which can download required jars and dependencies form maven without the maven compiler or pom files. But its far from ready

You can also create a separate maven project and include it in the android project im not sure if it works with android but you can do it in standart jdk

Upvotes: 6

Related Questions