Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

android

maven

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

like image 833
Jimmy Avatar asked Mar 20 '11 17:03

Jimmy


People also ask

What advantage does Maven have over Ant?

Better dependency management - Maven is superior to Ant when it comes to dependency management. For example: With Maven, you don't have to worry about transitive dependencies. If your project depends on library A, you just add a direct dependency on A and let A worry about its own dependencies.

What is the advantage of Maven project?

Advantages of using Maven:One can easily build their project to jar,war etc. as per their requirements using Maven. Maven makes easy to start project in different environments and one doesn't needs to handle the dependencies injection, builds, processing, etc. Adding a new dependency is very easy.

Why Maven is used in Android?

Maven will do the rest for you when you build (download to local cache if not already existing, fetch dependencies, javadoc etc). Even if you were to copy your project to another PC without the JAR's, delete the JAR's etc, if Maven is present it will re-download them automatically when you build.


1 Answers

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

like image 71
sherif Avatar answered Nov 11 '22 04:11

sherif